[Zope-CVS] CVS: Products/CompositePage - composite.py:1.20 element.py:1.4 interfaces.py:1.11

Gary Poster gary at zope.com
Thu Apr 1 18:20:38 EST 2004


Update of /cvs-repository/Products/CompositePage
In directory cvs.zope.org:/tmp/cvs-serv15591

Modified Files:
	composite.py element.py interfaces.py 
Log Message:
change interface of two element methods so that slot_class_name can be passed as an optimization by getManifest.




=== Products/CompositePage/composite.py 1.19 => 1.20 ===
--- Products/CompositePage/composite.py:1.19	Thu Mar 25 15:42:22 2004
+++ Products/CompositePage/composite.py	Thu Apr  1 18:20:37 2004
@@ -251,8 +251,9 @@
                 templates = ()
                 try:
                     ob = element.dereference()
-                    template = element.queryInlineTemplate()
-                    templates = element.listAllowableInlineTemplates()
+                    template = element.queryInlineTemplate(spec['class_name'])
+                    templates = element.listAllowableInlineTemplates(
+                        spec['class_name'])
                 except:
                     error = formatException(self, editing=1)
                     ob = FailedElement().__of__(self)


=== Products/CompositePage/element.py 1.3 => 1.4 ===
--- Products/CompositePage/element.py:1.3	Wed Mar  3 11:00:16 2004
+++ Products/CompositePage/element.py	Thu Apr  1 18:20:37 2004
@@ -74,7 +74,7 @@
             return obj()
         return str(obj)
 
-    def queryInlineTemplate(self):
+    def queryInlineTemplate(self, slot_class_name=None):
         """Returns the name of the inline template this object uses.
         """
         return self.template_name
@@ -84,7 +84,7 @@
         """
         self.template_name = str(template_name)
 
-    def listAllowableInlineTemplates(self):
+    def listAllowableInlineTemplates(self, slot_class_name=None):
         """Returns a list of inline template names allowable for this object.
         """
         tool = aq_get(self, "composite_tool", None, 1)


=== Products/CompositePage/interfaces.py 1.10 => 1.11 ===
--- Products/CompositePage/interfaces.py:1.10	Fri Mar  5 16:41:04 2004
+++ Products/CompositePage/interfaces.py	Thu Apr  1 18:20:37 2004
@@ -101,20 +101,24 @@
         """Returns a representation of this object as a string.
         """
 
-    def queryInlineTemplate():
+    def queryInlineTemplate(slot_class_name=None):
         """Returns the name of the inline template this object uses.
 
         Returns None if none has been chosen and there is no default.
+        
+        The slot_class_name may be provided as an optimization.
         """
 
     def setInlineTemplate(template):
         """Sets the inline template for this object.
         """
 
-    def listAllowableInlineTemplates():
+    def listAllowableInlineTemplates(slot_class_name=None):
         """Returns a list of templates allowable for this object.
 
         Returns a list of (template_name, template_object).
+        
+        The slot_class_name may be provided as an optimization.
         """
 
     def dereference():




More information about the Zope-CVS mailing list