[CMF-checkins] CVS: CMF/CMFDefault - SkinnedFolder.py:1.16.2.1
Yvo Schubbe
schubbe at web.de
Fri Dec 19 09:41:57 EST 2003
Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv7812/CMFDefault
Modified Files:
Tag: yuppie-collector025-branch
SkinnedFolder.py
Log Message:
- updated SkinnedFolder to provide the new creator methods
=== CMF/CMFDefault/SkinnedFolder.py 1.16 => 1.16.2.1 ===
--- CMF/CMFDefault/SkinnedFolder.py:1.16 Mon Dec 1 08:55:43 2003
+++ CMF/CMFDefault/SkinnedFolder.py Fri Dec 19 09:41:56 2003
@@ -22,10 +22,13 @@
from Products.CMFCore.CMFCatalogAware import CMFCatalogAware
from Products.CMFCore.CMFCorePermissions import ListFolderContents
from Products.CMFCore.CMFCorePermissions import ManageProperties
+from Products.CMFCore.CMFCorePermissions import ModifyPortalContent
from Products.CMFCore.CMFCorePermissions import View
from Products.CMFCore.PortalFolder import PortalFolder
from Products.CMFCore.utils import _getViewFor
+from DublinCore import DefaultDublinCoreImpl
+
factory_type_information = (
{ 'id' : 'Skinned Folder'
, 'meta_type' : 'Skinned Folder'
@@ -64,7 +67,7 @@
class SkinnedFolder(CMFCatalogAware, PortalFolder):
- """
+ """ Skinned Folder class.
"""
meta_type = 'Skinned Folder'
@@ -87,16 +90,29 @@
index_html = None # This special value informs ZPublisher to use __call__
- security.declareProtected(View, 'Creator')
- def Creator( self ):
- """
- Return the ID of our owner.
+ # XXX: maybe we should subclass from DefaultDublinCoreImpl or refactor it
+
+ security.declarePrivate('notifyModified')
+ def notifyModified(self):
+ """ Take appropriate action after the resource has been modified.
+
+ Update creators.
"""
- return self.getOwner( info=1 )[1]
+ self.addCreator()
+
+ security.declareProtected(ModifyPortalContent, 'addCreator')
+ addCreator = DefaultDublinCoreImpl.addCreator.im_func
+
+ security.declareProtected(View, 'listCreators')
+ listCreators = DefaultDublinCoreImpl.listCreators.im_func
+
+ security.declareProtected(View, 'Creator')
+ Creator = DefaultDublinCoreImpl.Creator.im_func
# We derive from CMFCatalogAware first, so we are cataloged too.
InitializeClass( SkinnedFolder )
+
def addSkinnedFolder( self, id, title='', description='', REQUEST=None ):
"""
More information about the CMF-checkins
mailing list