Support the synchronize() call in the list API.
authorGunnar Wrobel <p@rdus.de>
Mon, 3 Jan 2011 13:41:35 +0000 (14:41 +0100)
committerGunnar Wrobel <p@rdus.de>
Tue, 4 Jan 2011 07:54:23 +0000 (08:54 +0100)
framework/Kolab_Storage/lib/Horde/Kolab/Storage/List.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Base.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php
framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Log.php

index e29c002..b444dd5 100644 (file)
@@ -49,4 +49,11 @@ extends Horde_Kolab_Storage_Queriable
      *               folder type as values.
      */
     public function listFolderTypes();
+
+    /**
+     * Synchronize the list information with the information from the backend.
+     *
+     * @return NULL
+     */
+    public function synchronize();
 }
index 793e511..187e1d6 100644 (file)
@@ -79,4 +79,13 @@ implements Horde_Kolab_Storage_List
             '/shared/vendor/kolab/folder-type'
         );
     }
+
+    /**
+     * Synchronize the list information with the information from the backend.
+     *
+     * @return NULL
+     */
+    public function synchronize()
+    {
+    }
 }
\ No newline at end of file
index 2b4bba0..481407d 100644 (file)
@@ -155,6 +155,8 @@ implements Horde_Kolab_Storage_List
      */
     public function synchronize()
     {
+        $this->_list->synchronize();
+
         $this->_cache->storeListData(
             $this->_list->getConnectionId(),
             self::QUERIES,
index d2816ea..7bab527 100644 (file)
@@ -115,4 +115,20 @@ implements Horde_Kolab_Storage_List
         );
         return $result;
     }
+
+    /**
+     * Synchronize the list information with the information from the backend.
+     *
+     * @return NULL
+     */
+    public function synchronize()
+    {
+        $this->_list->synchronize();
+        $this->_logger->info(
+            sprintf(
+                'Synchronized folder list for %s.',
+                $this->getConnectionId()
+            )
+        );
+    }
 }
\ No newline at end of file