[CMF-checkins] CVS: CMF/CMFDefault - DublinCore.py:1.32

Yvo Schubbe y.2004_ at wcm-solutions.de
Wed Feb 4 12:34:58 EST 2004


Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv4798/CMFDefault

Modified Files:
	DublinCore.py 
Log Message:
- changed setModificationDate permission
- some docstring cleanup


=== CMF/CMFDefault/DublinCore.py 1.31 => 1.32 ===
--- CMF/CMFDefault/DublinCore.py:1.31	Thu Jan  1 07:08:06 2004
+++ CMF/CMFDefault/DublinCore.py	Wed Feb  4 12:34:57 2004
@@ -36,8 +36,7 @@
 
 
 class DefaultDublinCoreImpl( PropertyManager ):
-    """
-        Mix-in class which provides Dublin Core methods
+    """ Mix-in class which provides Dublin Core methods.
     """
     __implements__ = DublinCore, CatalogableDublinCore, MutableDublinCore
 
@@ -98,12 +97,11 @@
         if creator and not creator in self.listCreators():
             self.creators = self.creators + (creator, )
 
-    # XXX Could this be simply protected by ModifyPortalContent ?
-    security.declarePrivate('setModificationDate')
+    security.declareProtected(ModifyPortalContent, 'setModificationDate')
     def setModificationDate(self, modification_date=None):
-        """
-            Set the date when the resource was last modified.
-            When called without an argument, sets the date to now.
+        """ Set the date when the resource was last modified.
+
+        When called without an argument, sets the date to now.
         """
         if modification_date is None:
             self.modification_date = DateTime()
@@ -247,8 +245,7 @@
     #  DublinCore utility methods
     #
     def content_type( self ):
-        """
-            WebDAV needs this to do the Right Thing (TM).
+        """ WebDAV needs this to do the Right Thing (TM).
         """
         return self.Format()
 
@@ -256,8 +253,7 @@
 
     security.declareProtected(View, 'isEffective')
     def isEffective( self, date ):
-        """
-            Is the date within the resource's effective range?
+        """ Is the date within the resource's effective range?
         """
         pastEffective = ( self.effective_date is None
                        or self.effective_date <= date )
@@ -407,8 +403,7 @@
                      , language=_marker
                      , rights=_marker
                      ):
-        """
-            Update the editable metadata for this resource.
+        """ Update the editable metadata for this resource.
         """
         if title is not _marker:
             self.setTitle( title )
@@ -445,8 +440,7 @@
                            , rights
                            , REQUEST
                            ):
-        """
-            Update metadata from the ZMI.
+        """ Update metadata from the ZMI.
         """
         self._editMetadata( title, subject, description, contributors
                           , effective_date, expiration_date




More information about the CMF-checkins mailing list