[CMF-checkins] CVS: CMF/CMFUid - UniqueIdAnnotationTool.py:1.5
Grégoire Weber
zope.org at incept.ch
Thu Aug 5 18:08:19 EDT 2004
Update of /cvs-repository/CMF/CMFUid
In directory cvs.zope.org:/tmp/cvs-serv686
Modified Files:
UniqueIdAnnotationTool.py
Log Message:
- make properties available through the properties tab
=== CMF/CMFUid/UniqueIdAnnotationTool.py 1.4 => 1.5 ===
--- CMF/CMFUid/UniqueIdAnnotationTool.py:1.4 Thu Aug 5 12:07:46 2004
+++ CMF/CMFUid/UniqueIdAnnotationTool.py Thu Aug 5 18:08:18 2004
@@ -21,6 +21,7 @@
from AccessControl import ClassSecurityInfo
from Acquisition import Implicit, aq_base
+from OFS.PropertyManager import PropertyManager
from OFS.SimpleItem import SimpleItem
from Products.CMFCore.utils import getToolByName, UniqueObject
@@ -104,12 +105,19 @@
InitializeClass(UniqueIdAnnotation)
-class UniqueIdAnnotationTool(UniqueObject, SimpleItem, ActionProviderBase):
+class UniqueIdAnnotationTool(UniqueObject, SimpleItem, PropertyManager, ActionProviderBase):
__doc__ = __doc__ # copy from module
__implements__ = (
- SimpleItem.__implements__,
IUniqueIdAnnotationManagement,
+ ActionProviderBase.__implements__,
+ SimpleItem.__implements__,
+ )
+
+ manage_options = (
+ PropertyManager.manage_options +
+ ActionProviderBase.manage_options +
+ SimpleItem.manage_options
)
id = 'portal_uidannotation'
@@ -118,9 +126,14 @@
security = ClassSecurityInfo()
- # XXX make Zope properties out of those:
remove_on_add = True
- remove_on_clone = True # caution when setting this to False!!!
+ remove_on_clone = True
+ _properties = (
+ {'id': 'remove_on_add', 'type': 'boolean', 'mode': 'w',
+ 'label': "Remove the objects unique id on add (and import)"},
+ {'id': 'remove_on_clone', 'type': 'boolean', 'mode': 'w',
+ 'label': 'Remove the objects unique id on clone (CAUTION !!!)'},
+ )
security.declareProtected(ManagePortal, '__call__')
def __call__(self, obj, id):
More information about the CMF-checkins
mailing list