From 4ee0e41575be6057fc02980a3bc03db0f5661b97 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Mon, 3 Jan 2011 14:41:35 +0100 Subject: [PATCH] Support the synchronize() call in the list API. --- framework/Kolab_Storage/lib/Horde/Kolab/Storage/List.php | 7 +++++++ .../Kolab_Storage/lib/Horde/Kolab/Storage/List/Base.php | 9 +++++++++ .../lib/Horde/Kolab/Storage/List/Decorator/Cache.php | 2 ++ .../lib/Horde/Kolab/Storage/List/Decorator/Log.php | 16 ++++++++++++++++ 4 files changed, 34 insertions(+) diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List.php index e29c00204..b444dd5f8 100644 --- a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List.php +++ b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List.php @@ -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(); } diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Base.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Base.php index 793e511bc..187e1d6b5 100644 --- a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Base.php +++ b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Base.php @@ -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 diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php index 2b4bba0f1..481407dd4 100644 --- a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php +++ b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php @@ -155,6 +155,8 @@ implements Horde_Kolab_Storage_List */ public function synchronize() { + $this->_list->synchronize(); + $this->_cache->storeListData( $this->_list->getConnectionId(), self::QUERIES, diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Log.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Log.php index d2816ea4f..7bab527fc 100644 --- a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Log.php +++ b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Log.php @@ -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 -- 2.11.0