[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services - auth.py:1.3.4.2 interfaces.py:1.9.2.1 query.py:1.6.2.1

Sidnei da Silva sidnei@x3ng.com.br
Tue, 11 Feb 2003 09:41:51 -0500


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

Modified Files:
      Tag: paris-copypasterename-branch
	auth.py interfaces.py query.py 
Log Message:
Updating from HEAD to make sure everything still works before merging

=== Zope3/src/zope/app/interfaces/services/auth.py 1.3.4.1 => 1.3.4.2 ===
--- Zope3/src/zope/app/interfaces/services/auth.py:1.3.4.1	Wed Feb  5 06:00:34 2003
+++ Zope3/src/zope/app/interfaces/services/auth.py	Tue Feb 11 09:41:20 2003
@@ -25,7 +25,7 @@
         """Get the login for the user."""
 
     def validate(pw):
-        """Seee whether the password is valid."""
+        """See whether the password is valid."""
 
 
 class IWriteUser(Interface):
@@ -41,7 +41,10 @@
         """Set login of User."""
 
     def setRoles(roles):
-        """Set roles of User."""
+        """Set roles of User.
+
+        Roles should be a sequence of role ids.
+        """
 
     def setPassword(password):
         """Set password of User."""


=== Zope3/src/zope/app/interfaces/services/interfaces.py 1.9 => 1.9.2.1 ===
--- Zope3/src/zope/app/interfaces/services/interfaces.py:1.9	Sat Jan 25 08:28:54 2003
+++ Zope3/src/zope/app/interfaces/services/interfaces.py	Tue Feb 11 09:41:20 2003
@@ -114,9 +114,9 @@
 class IViewConfiguration(IConfiguration, IViewConfigurationInfo):
 
     def getView(object, request):
-        """Return an adapter for the object
+        """Return a view for the object
 
-        The adapter is computed by passing the object to the
+        The view is computed by passing the object to the
         registered factory.
         """
 
@@ -160,6 +160,12 @@
         required = False,
         readonly = True,
         type = IZPTTemplate,
+        )
+
+    attribute = TextLine(
+        title = u"Class attribute",
+        required = False,
+        readonly = True,
         )
 
 class IPageConfiguration(IConfiguration, IPageConfigurationInfo):


=== Zope3/src/zope/app/interfaces/services/query.py 1.6 => 1.6.2.1 ===
--- Zope3/src/zope/app/interfaces/services/query.py:1.6	Tue Jan  7 14:51:26 2003
+++ Zope3/src/zope/app/interfaces/services/query.py	Tue Feb 11 09:41:20 2003
@@ -22,6 +22,7 @@
 from zope.app.interfaces.services.configuration import INamedConfiguration
 from zope.app.component.interfacefield import InterfacesField
 from zope.schema.interfaces import ITuple
+# There's another import further down
 
 class IQueryProcessorsField(ITuple):
     """Field for entering a pipeline of query processors."""
@@ -48,7 +49,7 @@
     def listQueries():
         '''Returns a list of query registrations.
 
-        (query_id, permission_id, input_interface, output_interface)'''
+        Each element of the list is an IQueryListItem.'''
 
     def processQuery(query_id, input):
         '''Processes the input, using the query registered with query_id.
@@ -56,14 +57,37 @@
         The input must be adaptable to the input interfaces registered for
         the query_id.'''
 
+class IQueryListItem(Interface):
+
+    id = Attribute('The id of this query.')
+    #permission = Attribute('Permission required to run the query.'
+    #                       ' An object, not an id.')
+    #inputInterfaces = Attribute('Sequence of interfaces the input must be'
+    #                            ' adaptable to.')
+    #outputInterfaces = Attribute('Sequence of interfaces the output must be'
+    #                             ' adaptable to.')
+    permission = PermissionField(title=u'Required permission', required=False)
+
+    inputInterfaces = InterfacesField(title=u'Input interfaces',
+                                      basetype=None)
+    outputInterfaces = InterfacesField(title=u'Output interfaces',
+                                       basetype=None)
+
+# The import is here to avoid circular imports
+from zope.app.services.queryfield import QueryProcessorsField
+
 class IQueryConfigurationInfo(INamedConfigurationInfo):
 
-    permission = PermissionField(title=u'Required permission')
+    permission = PermissionField(title=u'Required permission', required=False)
     inputInterfaces = InterfacesField(title=u'Input interfaces',
                                       basetype=None)
     outputInterfaces = InterfacesField(title=u'Output interfaces',
                                        basetype=None)
+    processors = QueryProcessorsField(title=u'Query processors',
+                                      required=False)
 
 class IQueryConfiguration(IQueryConfigurationInfo, INamedConfiguration):
-    pass
+
+    def getProcessors():
+        'Returns a sequence of query processor objects.'