[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services - menu.py:1.1.2.2 menu.pyc:1.1.2.3

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Aug 15 09:44:10 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/interfaces/services
In directory cvs.zope.org:/tmp/cvs-serv31241/interfaces/services

Modified Files:
      Tag: dreamcatcher-ttwschema-branch
	menu.py menu.pyc 
Log Message:
Finished Local Browser Menus:

- Interfaces are complete and documented.

- Implementation complete.

- Tests for testing the implementation of the local browser menu service.
  (I am almost amozed about the type of bugs found during these tests.)


=== Zope3/src/zope/app/interfaces/services/menu.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/interfaces/services/menu.py:1.1.2.1	Thu Aug 14 13:58:02 2003
+++ Zope3/src/zope/app/interfaces/services/menu.py	Fri Aug 15 08:43:35 2003
@@ -36,20 +36,42 @@
 
 
 class ILocalBrowserMenuService(IBrowserMenuService):
+    """A persistent (local) browser menu service that can be fully managed.
+
+    It is very useful to think about locally defined and inherited menus for
+    local menu services. For this reason we provide several methods that allow
+    specifically to query only locally or look through the entire path.
+    """
 
     def getAllLocalMenus():
-        pass
+        """Returns a list of all local menus."""
 
     def getLocalMenu(menu_id):
-        pass
+        """Get a local menu by id.
+
+        If there is no such menu found locally, this method needs to raise a
+        ComponentLookupError.
+        """
 
     def queryLocalMenu(menu_id, default=None):
-        pass
+        """Get a local menu by id.
+
+        If no menu was found, the default value is returned.
+        """
 
     def getInheritedMenu(menu_id, canBeLocal=False):
-        pass
+        """Tries to get the first available menu.
+
+        If canBeLocal is True, then it also looks locally for a matching
+        menu. This method should return a ComponentLookupError, if the menu
+        was not found.
+        """
+
+    def queryInheritedMenu(menu_id, canBeLocal=False, default=None):
+        """Tries to get the first available menu.
 
-    def queryInheritedMenu(menu_id, canBeLocal=False):
-        pass
+        If canBeLocal is True, then it also looks locally for a matching
+        menu. If no menu was ound, default is returned.
+        """
 
 


=== Zope3/src/zope/app/interfaces/services/menu.pyc 1.1.2.2 => 1.1.2.3 ===




More information about the Zope3-Checkins mailing list