[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services - query.py:1.3

Steve Alexander steve@cat-box.net
Mon, 30 Dec 2002 13:43:08 -0500


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

Modified Files:
	query.py 
Log Message:
Implemented InterfacesField to select several interfaces.
Refined the query interfaces.


=== Zope3/src/zope/app/interfaces/services/query.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/interfaces/services/query.py:1.2	Wed Dec 25 09:13:02 2002
+++ Zope3/src/zope/app/interfaces/services/query.py	Mon Dec 30 13:43:08 2002
@@ -11,21 +11,21 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""XXX short summary goes here.
-
-XXX longer description goes here.
+"""
 
 $Id$
 """
 
 from zope.interface import Interface, Attribute
+from zope.app.security.permission import PermissionField
+from zope.app.interfaces.services.configuration \
+    import INamedConfigurationInfo, INamedConfiguration
+from zope.app.component.interfacefield import InterfacesField
 
 class IQueryProcessor(Interface):
 
-    input_interface = Attribute("The __implements__-like specification "
-                                "for the input interfaces.")
-    output_interface = Attribute("The __implements__-like specification "
-                                 "for the output interfaces.")
+    inputInterfaces = Attribute("Sequence of input interfaces")
+    outputInterfaces = Attribute("Sequence of output interfaces")
 
     def __call__(query):
         """Processes the query returning the result.
@@ -35,15 +35,6 @@
            output_interface.
         """
 
-
-"""XXX short summary goes here.
-
-XXX longer description goes here.
-
-$Id$
-"""
-from zope.interface import Interface
-
 class IQueryService(Interface):
 
     def listQueries():
@@ -54,5 +45,16 @@
     def processQuery(query_id, input):
         '''Processes the input, using the query registered with query_id.
 
-        The input is adapted to the input interface that is registered for
+        The input must be adaptable to the input interfaces registered for
         the query_id.'''
+
+class IQueryConfigurationInfo(INamedConfigurationInfo):
+
+    permission = PermissionField(title=u'Required permission')
+    inputInterfaces = InterfacesField(title=u'Input interfaces')
+    outputInterfaces = InterfacesField(title=u'Output interfaces')
+
+class IQueryConfiguration(IQueryConfigurationInfo, INamedConfiguration):
+
+    pass
+