[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services - configuration.py:1.3.6.1

Tim Peters tim.one@comcast.net
Mon, 24 Feb 2003 15:33:29 -0500


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

Modified Files:
      Tag: use-config-branch
	configuration.py 
Log Message:
New interface IUseConfiguration and new adapter UseConfiguration, for
a project that will become clearer later.


=== Zope3/src/zope/app/interfaces/services/configuration.py 1.3 => 1.3.6.1 ===
--- Zope3/src/zope/app/interfaces/services/configuration.py:1.3	Thu Dec 26 13:55:35 2002
+++ Zope3/src/zope/app/interfaces/services/configuration.py	Mon Feb 24 15:32:58 2003
@@ -252,3 +252,29 @@
         an active configuration, and if so, returns its component.  Otherwise
         returns default.
         """
+
+class IUseConfiguration(Interface):
+    """An object that can keep track of its configured uses.
+
+    The object need not implement this functionality itself, but must at
+    least support doing so via an adapter.
+    """
+
+    def addUsage(location):
+        """Add a usage by location.
+
+        The location is the physical path to the configuration object that
+        configures the usage.
+        """
+    def removeUsage(location):
+        """Remove a usage by location.
+
+        The location is the physical path to the configuration object that
+        configures the usage.
+        """
+    def usages():
+        """Return a sequence of locations.
+
+        A location is a physical path to a configuration object that
+        configures a usage.
+        """