[Zope-CMF] Publishable Folder....
Heimo Laukkanen
huima@fountainpark.org
Wed, 05 Jun 2002 15:02:10 +0300
Hi all,
I was just wondering why in the first place the Portal Folder-product is
not workflow like, meaning there is no way to publish or keep Folders
private - for example until all the content is ready inside the Folder.
If pne would like to do thiskind of behaviour - meaning workflow aware
folder, what would it need? Only to create manage_afterAdd and
manage_beforeDelete like in the CMF Article( see below)?
-huima
#
# Workflow interaction
#
security.declarePrivate('manage_afterAdd')
def manage_afterAdd(self, item, container):
" Add self to the workflow and catalog. "
# Recurse in the children (ObjectManager)
PortalFolder.manage_afterAdd(self, item, container)
# Add self to workflow and catalog
PortalContent.manage_afterAdd(self, item, container)
# remember to move the initial sorting here
security.declarePrivate('manage_beforeDelete')
def manage_beforeDelete(self, item, container):
" Remove self from the workflow and catalog. "
# We don't call PortalContent.manage_beforeDelete because
# it deals with talkbacks which are subobjects...
# Remove self from catalog
if aq_base(container) is not aq_base(self):
self.unindexObject()
# Then recurse in the children (ObjectManager)
PortalFolder.manage_beforeDelete(self, item, container)