Actually add the files.
authorGunnar Wrobel <p@rdus.de>
Mon, 3 Jan 2011 16:13:25 +0000 (17:13 +0100)
committerGunnar Wrobel <p@rdus.de>
Tue, 4 Jan 2011 07:54:24 +0000 (08:54 +0100)
framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Query.php [new file with mode: 0644]
framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Query/Decorator/Cache.php [new file with mode: 0644]

diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Query.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Query.php
new file mode 100644 (file)
index 0000000..f63cf72
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+/**
+ * The interface of the basic list query.
+ *
+ * PHP version 5
+ *
+ * @category Kolab
+ * @package  Kolab_Storage
+ * @author   Gunnar Wrobel <wrobel@pardus.de>
+ * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link     http://pear.horde.org/index.php?package=Kolab_Storage
+ */
+
+/**
+ * The interface of the basic list query.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @category Kolab
+ * @package  Kolab_Storage
+ * @author   Gunnar Wrobel <wrobel@pardus.de>
+ * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link     http://pear.horde.org/index.php?package=Kolab_Storage
+ */
+interface Horde_Kolab_Storage_List_Query
+extends Horde_Kolab_Storage_Query
+{
+    /**
+     * Returns the folder types as associative array.
+     *
+     * @return array The list folder types with the folder names as key and the
+     *               type as values.
+     */
+    public function listTypes();
+
+    /**
+     * Returns the folder type annotation as associative array.
+     *
+     * @return array The list folder types with the folder names as key and the
+     *               type handler as values.
+     */
+    public function listFolderTypeAnnotations();
+
+    /**
+     * List all folders of a specific type.
+     *
+     * @param string $type The folder type the listing should be limited to.
+     *
+     * @return array The list of folders.
+     */
+    public function listByType($type);
+}
\ No newline at end of file
diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Query/Decorator/Cache.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Query/Decorator/Cache.php
new file mode 100644 (file)
index 0000000..1d52dfb
--- /dev/null
@@ -0,0 +1,106 @@
+<?php
+/**
+ * The cached list query.
+ *
+ * PHP version 5
+ *
+ * @category Kolab
+ * @package  Kolab_Storage
+ * @author   Gunnar Wrobel <wrobel@pardus.de>
+ * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link     http://pear.horde.org/index.php?package=Kolab_Storage
+ */
+
+/**
+ * The cached list query.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @category Kolab
+ * @package  Kolab_Storage
+ * @author   Gunnar Wrobel <wrobel@pardus.de>
+ * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link     http://pear.horde.org/index.php?package=Kolab_Storage
+ */
+class Horde_Kolab_Storage_List_Query_Decorator_Cache
+implements Horde_Kolab_Storage_List_Query
+{
+    /**
+     * The queriable list.
+     *
+     * @var Horde_Kolab_Storage_Queriable
+     */
+    private $_queriable;
+
+    /**
+     * The factory for generating additional resources.
+     *
+     * @var Horde_Kolab_Storage_Factory
+     */
+    private $_factory;
+
+    /**
+     * Constructor.
+     *
+     * @param Horde_Kolab_Storage_Queriable $queriable The queriable list.
+     */
+    public function __construct(Horde_Kolab_Storage_Queriable $queriable)
+    {
+        $this->_queriable = $queriable;
+    }
+
+    /**
+     * Inject the factory.
+     *
+     * @param Horde_Kolab_Storage_Factory $factory The factory.
+     *
+     * @return NULL
+     */
+    public function setFactory(Horde_Kolab_Storage_Factory $factory)
+    {
+        $this->_factory = $factory;
+    }
+
+    /**
+     * Returns the folder types as associative array.
+     *
+     * @return array The list folder types with the folder names as key and the
+     *               type as values.
+     */
+    public function listTypes()
+    {
+    }
+
+    /**
+     * Returns the folder type annotation as associative array.
+     *
+     * @return array The list folder types with the folder names as key and the
+     *               type handler as values.
+     */
+    public function listFolderTypeAnnotations()
+    {
+    }
+
+    /**
+     * List all folders of a specific type.
+     *
+     * @param string $type The folder type the listing should be limited to.
+     *
+     * @return array The list of folders.
+     */
+    public function listByType($type)
+    {
+    }
+
+    /**
+     * Synchronize the query data with the information from the backend.
+     *
+     * @return NULL
+     */
+    public function synchronize()
+    {
+    }
+}
\ No newline at end of file