[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces - utilities.py:1.1.2.5

Sidnei da Silva sidnei at x3ng.com.br
Wed Aug 13 11:42:46 EDT 2003


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

Modified Files:
      Tag: dreamcatcher-ttwschema-branch
	utilities.py 
Log Message:
Half-workiing schemaPermissions plus some whitespace here and there

=== Zope3/src/zope/app/interfaces/utilities.py 1.1.2.4 => 1.1.2.5 ===
--- Zope3/src/zope/app/interfaces/utilities.py:1.1.2.4	Wed Aug 13 09:51:13 2003
+++ Zope3/src/zope/app/interfaces/utilities.py	Wed Aug 13 10:42:12 2003
@@ -15,7 +15,7 @@
 
 $Id$
 """
-from zope.interface import Interface
+from zope.interface import Interface, Attribute
 from zope.interface.interfaces import IInterface
 from zope.schema import TextLine
 from zope.app.interfaces.container import IAdding
@@ -23,15 +23,19 @@
 
 class ISchemaUtility(Interface):
 
-    getName = TextLine(title=u'Schema Name',
-                    description=u"Schema Name")
+    schemaPermissions = Attribute(u"A dictionary that maps set/get permissions"
+                                  u"on the schema's fields. Entries looks as"
+                                  u"follows: {fieldname:(set_perm, get_perm)}")
 
 class ISchemaAdding(IAdding):
     pass
 
 class IMutableSchema(IInterface):
     """This object represents an interface/schema that can be edited by
-    managing the fields it contains.""" 
+    managing the fields it contains."""
+
+    def getName(name):
+        """Get the name of the schema."""
 
     def setName(name):
         """Set the name of the schema."""
@@ -55,14 +59,14 @@
         """Insert a field with a given name at the specified position.
 
         If the position does not make sense, i.e. a negative number of a
-        number larger than len(self), then an error is raised. 
+        number larger than len(self), then an error is raised.
         """
 
     def moveField(name, position):
         """Move a field (given by its name) to a particular position.
 
         If the position does not make sense, i.e. a negative number of a
-        number larger than len(self), then an error is raised. 
+        number larger than len(self), then an error is raised.
         """
 
 class IMutableSchemaField(IInterfaceField):




More information about the Zope3-Checkins mailing list