[CMF-checkins] CVS: CMF/CMFCore/interfaces - CachingPolicyManager.py:1.3.18.2 ContentTypeRegistry.py:1.4.50.1 Contentish.py:1.4.50.2

Yvo Schubbe schubbe@web.de
Fri, 20 Dec 2002 11:39:12 -0500


Update of /cvs-repository/CMF/CMFCore/interfaces
In directory cvs.zope.org:/tmp/cvs-serv21258/CMFCore/interfaces

Modified Files:
      Tag: yuppie-collector096-branch
	CachingPolicyManager.py ContentTypeRegistry.py Contentish.py 
Log Message:
more interface cleanups:
- added interface tests and made them pass

=== CMF/CMFCore/interfaces/CachingPolicyManager.py 1.3.18.1 => 1.3.18.2 ===
--- CMF/CMFCore/interfaces/CachingPolicyManager.py:1.3.18.1	Thu Dec 19 17:08:52 2002
+++ CMF/CMFCore/interfaces/CachingPolicyManager.py	Fri Dec 20 11:39:12 2002
@@ -10,7 +10,7 @@
 # FOR A PARTICULAR PURPOSE
 # 
 ##############################################################################
-""" Caching tool interface.
+""" Caching policies tool interface.
 
 $Id$
 """


=== CMF/CMFCore/interfaces/ContentTypeRegistry.py 1.4 => 1.4.50.1 ===
--- CMF/CMFCore/interfaces/ContentTypeRegistry.py:1.4	Wed Nov 28 14:06:24 2001
+++ CMF/CMFCore/interfaces/ContentTypeRegistry.py	Fri Dec 20 11:39:12 2002
@@ -10,15 +10,28 @@
 # FOR A PARTICULAR PURPOSE
 # 
 ##############################################################################
-"""
-Declare interfaces for MIMEtype <-> Type object registry objects.
+""" Putfactory registration tool interface.
+
+$Id$
 """
 
-from Interface import Attribute, Base
+try:
+    from Interface import Interface
+except ImportError:
+    # for Zope versions before 2.6.0
+    from Interface import Base as Interface
+
+
+class ContentTypeRegistryPredicate(Interface):
+    """ Express a rule for matching a given name/typ/body.
+
+    predicateWidget -- Return a snipped of HTML suitable for editing the
+        predicate; the snippet should arrange for values to be marshalled by
+        ZPublisher as a ':record', with the ID of the predicate as the name of
+        the record.
 
-class ContentTypeRegistryPredicate(Base):
-    """\
-    Express a rule for matching a given name/typ/body.
+    The registry will call the predictate's 'edit' method, passing the fields
+    of the record.
     """
 
     def __call__(name, typ, body):
@@ -26,22 +39,9 @@
 
     def getTypeLabel():
         """ Return a human-readable label for the predicate type. """
-    
-    def edit(**kw):
-        """ Update the predicate. """
-
-    def predicateWidget():
-        """\
-        Return a snipped of HTML suitable for editing the
-        predicate;  the snippet should arrange for values
-        to be marshalled by ZPublisher as a ':record', with
-        the ID of the predicate as the name of the record.
-        
-        The registry will call the predictate's 'edit' method,
-        passing the fields of the record.
-        """
 
-class ContentTypeRegistry(Base):
+
+class ContentTypeRegistry(Interface):
     """ Registry for rules which map PUT args to a CMF Type Object. """
 
     def findTypeName(name, typ, body):


=== CMF/CMFCore/interfaces/Contentish.py 1.4.50.1 => 1.4.50.2 ===
--- CMF/CMFCore/interfaces/Contentish.py:1.4.50.1	Wed Dec 18 16:42:35 2002
+++ CMF/CMFCore/interfaces/Contentish.py	Fri Dec 20 11:39:12 2002
@@ -10,9 +10,19 @@
 # FOR A PARTICULAR PURPOSE
 # 
 ##############################################################################
-import Interface
+""" Contentish type interface.
 
-class Contentish(Interface.Base):
+$Id$
+"""
+
+try:
+    from Interface import Interface
+except ImportError:
+    # for Zope versions before 2.6.0
+    from Interface import Base as Interface
+
+
+class Contentish(Interface):
     """
     General interface for "contentish" items.
 
@@ -22,21 +32,6 @@
     PortalContent implements this interface.
     """
     
-    def getIcon(relative_to_portal=0):
-        """
-        This method returns the path to an object's icon. It is used 
-        in the folder_contents view to generate an appropriate icon 
-        for the items found in the folder.
-
-        If the content item does not define an attribute named "icon"
-        this method will return the path "/misc_/dtmldoc.gif", which is 
-        the icon used for DTML Documents.
-
-        If 'relative_to_portal' is true, return only the portion of
-        the icon's URL which finds it "within" the portal;  otherwise,
-        return it as an absolute URL.
-        """
-
     def SearchableText():
         """
         SearchableText is called to provide the Catalog with textual 
@@ -44,10 +39,4 @@
         by concatenating the string attributes of your content class. This
         string can then be used by the catalog to index your document and
         make it findable through the catalog.
-        """
-
-    def allowedRolesAndUsers(permission='View'):
-        """
-        Return a list of roles and users with View permission.
-        Used by PortalCatalog to filter out items you're not allowed to see.
         """