I'm looking at ZOPE to be used to act a version control for some documents. I have used the Version object in Zope but unable to satisfy my requirements. Couple of questions regarding that, 1) Does a new Version object needs to be created, everytime a change has to be made? 2) How can I list all the version changes undergone by a zope object? 3) Can I view a previous version of a document without undoing to that version. Even if ZOPE does not provide these functionalities directly, please provide me with the Classes and Modules which should be extended. Thanks in advance.
IMO, Zope doesn't even come close to doing what you want. I haven't even seen any practical ideas for how to use version control *with* Zope, much less use Zope *for* version control. -jfarr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hi! I'm a signature virus. Copy me into your .sig to join the fun! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Version control (as opposed to versions) in Zope would be a wonderfull thing. Reading through the ZODB UML docs, my guess would be that it _is_ possible, given that object revisions are appended to the database as opposed to completely replacing old objects. Given this appending mechanismn, it should be possible to access the old objects somehow. No doubt the Undo operation is using this facility. What is needed is the ability to examine all the versions of an object, to differentiate between objects under version control from those not under version control (so that packing the database doesnt throw out old versions of version controlled objects), and optionally some kind of compression scheme (so that keeping old object versions isnt too resource draining). Mind you, all this _may_ require some hacking of the ZODB source, although Im guessing that it wouldnt involve enormous changes.
From: Jonothan Farr Sent: Tuesday, February 29, 2000 7:34 PM
IMO, Zope doesn't even come close to doing what you want. I haven't even seen any practical ideas for how to use version control *with* Zope, much less use Zope *for* version control.
-jfarr
Heres my first stab at a routine to display all the attributes and methods of a given object (in a given path). It doesnt as yet support acquisition, but if I happen across any enlightenment, or if anyone has any to share, I will certainly include it when and if I acquire it. Next I think I will add an ignore list for ignoring certain classes (such as 'webdav.*') which dont interest me. Any other suggestions will be welcomed. If nothing else, just seeing the set of methods and attributes of a fairly stock-standard object has been very interesting to me. I should also try sorting them on the classpath to see them grouped by class. Hope it doesnt crash my monitor. --------------------------- browse.py ----------------------------------- def collect_dict(d, src, attrs): for k,v in d.items(): if not attrs.has_key(k): attrs[k] = (v, src) def collect_class(c, attrs, classes): if hasattr(c, '__module__'): name = c.__module__ + '.' + c.__name__ else: name = c.__name__ if not classes.has_key(name): classes[name] = 1 collect_dict(c.__dict__, name, attrs) if hasattr(c, '__bases__'): for b in c.__bases__: collect_class(b, attrs, classes) def collect(obj): attrs = {} classes = {} collect_dict(obj.__dict__, 'self', attrs) if hasattr(obj, '__class__'): collect_class(obj.__class__, attrs, classes) items = attrs.items() items.sort() for k,v in items: print k, v # for some reason 'print k, v[0], v[1]' crashes the monitor ------------------------------------------------------------------------- In the monitor, do this
import Zope app = Zope.app() import browse browse.collect(app.Stuff) COPY (<function COPY at 99bf60>, 'webdav.Resource.Resource') DELETE (<function DELETE at 9ceab0>, 'webdav.Collection.Collection') DELETE__roles__ (<PermissionRole instance at 009CE9B0>, 'webdav.Collection.Collection') HEAD (<function HEAD at 9ce990>, 'webdav.Collection.Collection') HEAD__roles__ (<PermissionRole instance at 009CEF70>, 'webdav.Collection.Collection') LOCK (<function LOCK at 99b2a0>, 'webdav.Resource.Resource') MKCOL (<function MKCOL at 99bf40>, 'webdav.Resource.Resource') MOVE (<function MOVE at 99bf80>, 'webdav.Resource.Resource') OPTIONS (<function OPTIONS at 99bb30>, 'webdav.Resource.Resource') OPTIONS__roles__ (None, 'webdav.Resource.Resource') PROPFIND (<function PROPFIND at 99bf00>, 'webdav.Resource.Resource') PROPFIND__roles__ (<PermissionRole instance at 009CE7F0>, 'webdav.Collection.Collection') PROPPATCH (<function PROPPATCH at 99bf20>, 'webdav.Resource.Resource') PROPPATCH__roles__ (<PermissionRole instance at 009CEEA0>, 'webdav.Collection.Collection') PUT (<function PUT at 9cea90>, 'webdav.Collection.Collection') SectionClass (<MWp instance at 012CAE10>, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') SectionClass_add (<MWp instance at 012C9AB0>, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') SectionClass_addForm (<MWp instance at 012CA1F0>, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') SectionClass_factory (<MWp instance at 012C9910>, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') TRACE (<function TRACE at 99bb50>, 'webdav.Resource.Resource') TRACE__roles__ (None, 'webdav.Resource.Resource') UNLOCK (<function UNLOCK at 99b370>, 'webdav.Resource.Resource') __ac_local_roles__ (None, 'AccessControl.Role.RoleManager') __ac_permissions__ ((('Add Stuff objects', (), ('Manager',)),), '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') __ac_roles__ (('Manager', 'Owner', 'Anonymous'), 'AccessControl.Role.RoleManager') __basicnew__ (<CMethod object at 848550>, 'Base') __changed__ (<CMethod object at 8d4cb0>, 'App.PersistentExtra.Persistent') __class_init__ (<function __class_init__ at a05bf0>, 'ZClasses.ZClass.PersistentClass') __dav_collection__ (1, 'webdav.Collection.Collection') __dav_resource__ (1, 'webdav.Resource.Resource') __doc__ ('StuffClass', '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') __getattr__ (<CMethod object at 8d4910>, 'App.PersistentExtra.Persistent') __getitem__ (<function __getitem__ at 9cf3c0>, 'OFS.ObjectManager.ObjectManager') __getstate__ (<CMethod object at 8d4ef0>, 'App.PersistentExtra.Persistent') __http_methods__ (('GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'TRACE', 'PROPFIND', 'PROPPATCH', 'MKCOL', 'COPY', 'MOVE'), 'w ebdav.Resource.Resource') __len__ (<function __len__ at 9a3f10>, 'OFS.SimpleItem.Item') __module__ ('*qSM8LUzKd3T5Bl1BzEwsLQ==', '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') __name__ (<ComputedAttribute object at 9a2830>, 'OFS.SimpleItem.Item') __of__ (<Python Method object at 929330>, 'Acquisition.Acquirer') __propsets__ ((), 'OFS.SimpleItem.Item') __reduce__ (<Python Method object at 848450>, 'Base') __roles__ (<PermissionRole instance at 00986D50>, 'ZClasses.ObjectManager.ObjectManager') __setattr__ (<CMethod object at 8d4b20>, 'App.PersistentExtra.Persistent') __setstate__ (<CMethod object at 8d4130>, 'App.PersistentExtra.Persistent') _addRole (<function _addRole at 9bd700>, 'AccessControl.Role.RoleManager') _canCopy (<function _canCopy at 991890>, 'OFS.CopySupport.CopySource') _checkId (<function _checkId at 9cf8e0>, 'OFS.ObjectManager.ObjectManager') _delOb (<function _delOb at 9cf920>, 'OFS.ObjectManager.ObjectManager') _delObject (<function _delObject at 9cf9f0>, 'OFS.ObjectManager.ObjectManager') _delRoles (<function _delRoles at 9bd8a0>, 'AccessControl.Role.RoleManager') _getCopy (<function _getCopy at 991bf0>, 'OFS.CopySupport.CopySource') _getOb (<function _getOb at 9cf940>, 'OFS.ObjectManager.ObjectManager') _get_id (<function _get_id at 982650>, 'OFS.CopySupport.CopyContainer') _has_user_defined_role (<function _has_user_defined_role at 9bd930>, 'AccessControl.Role.RoleManager') _isBeingUsedAsAMethod (<function _isBeingUsedAsAMethod at 9bc800>, 'AccessControl.PermissionMapping.RoleManager') _manage_editedDialog (<HTMLFile instance at 009A3BC0>, 'OFS.SimpleItem.Item') _notifyOfCopyTo (<function _notifyOfCopyTo at 9918c0>, 'OFS.CopySupport.CopySource') _objects ((), 'OFS.ObjectManager.ObjectManager') _p_changed (None, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') _p_deactivate (<CMethod object at 8d4e70>, 'App.PersistentExtra.Persistent') _p_jar (<ZODB.Connection.Connection instance at 12bbd30>, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') _p_oid ('\000\000\000\000\000\000\016\220', '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') _p_serial ('\0032\262\356\273\355\372D', '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') _postCopy (<function _postCopy at 991c90>, 'OFS.CopySupport.CopySource') _setId (<function _setId at 991cb0>, 'OFS.CopySupport.CopySource') _setOb (<function _setOb at 9cf900>, 'OFS.ObjectManager.ObjectManager') _setObject (<function _setObject at 9cf970>, 'OFS.ObjectManager.ObjectManager') _setRoles (<function _setRoles at 9bd980>, 'AccessControl.Role.RoleManager') _subobject_permissions (<function _subobject_permissions at 9cf720>, 'OFS.ObjectManager.ObjectManager') _v_dav_lock (None, 'webdav.Resource.Resource') _verifyObjectPaste (<function _verifyObjectPaste at 98fd20>, 'OFS.CopySupport.CopyContainer') _zclass_method_meta_types (({'permission': 'Add Section objects', 'name': 'Section object', 'product': 'methods', 'action': 'Section Class_factory'},), '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') absolute_url (<function absolute_url at 9a3f30>, 'OFS.SimpleItem.Item') ac_inherited_permissions (<function ac_inherited_permissions at 9bcfc0>, 'AccessControl.Role.RoleManager') ac_inherited_permissions__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') access_debug_info (<function access_debug_info at 9bd590>, 'AccessControl.Role.RoleManager') aclAChecked ('', 'AccessControl.Role.RoleManager') aclEChecked ('', 'AccessControl.Role.RoleManager') aclPChecked ('', 'AccessControl.Role.RoleManager') acquiredRolesAreUsedBy (<function acquiredRolesAreUsedBy at 9bde30>, 'AccessControl.Role.RoleManager') acquiredRolesAreUsedBy__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') all_meta_types (<function all_meta_types at a6ca90>, 'ZClasses.ObjectManager.ObjectManager') bobobase_modification_time (<function bobobase_modification_time at 9466f0>, 'App.PersistentExtra.Persistent') cb_dataItems (<function cb_dataItems at 98fcf0>, 'OFS.CopySupport.CopyContainer') cb_dataValid (<function cb_dataValid at 98fcd0>, 'OFS.CopySupport.CopyContainer') cb_isCopyable (<function cb_isCopyable at 991d10>, 'OFS.CopySupport.CopySource') cb_isMoveable (<function cb_isMoveable at 993d30>, 'OFS.CopySupport.CopySource') dav__genlocktoken (<function dav__genlocktoken at 99bfa0>, 'webdav.Resource.Resource') dav__init (<function dav__init at 9ce970>, 'webdav.Collection.Collection') dav__validate (<function dav__validate at 99b940>, 'webdav.Resource.Resource') fake_lock_xml ('<?xml version="1.0" encoding="utf-8" ?>\012<d:prop xmlns:d="DAV:">\012 <d:lockdiscovery>\012 <d:activelock>\012 <d:locktype><d:write/></d:locktype>\012 <d:lockscope><d:exclusive/></d:lockscope>\012 <d:depth>0</d:depth>\012 <d:owner>you</d:owner>\012 <d:timeout>Second-120</d:timeout>\012 <d:locktoken>\012 <d:href>locktoken:%s</d:href>\012 </d:locktoken>\012 </d:activelock>\012 </d:lockdiscovery>\012</d:prop>', 'webdav.Resource.Resource') filtered_manage_options (<function filtered_manage_options at 976d50>, 'App.Management.Tabs') filtered_manage_options__roles__ (None, 'App.Management.Tabs') filtered_meta_types (<function filtered_meta_types at 9cf8c0>, 'OFS.ObjectManager.ObjectManager') getAttribute (<function getAttribute at 99dcc0>, 'OFS.ZDOM.Element') getAttributeNode (<function getAttributeNode at 99ecd0>, 'OFS.ZDOM.Element') getAttributes (<function getAttributes at 996810>, 'OFS.ZDOM.Node') getChildNodes (<function getChildNodes at 99c6f0>, 'OFS.ZDOM.Element') getElementsByTagName (<function getElementsByTagName at 99ecf0>, 'OFS.ZDOM.Element') getFirstChild (<function getFirstChild at 99dc40>, 'OFS.ZDOM.Element') getLastChild (<function getLastChild at 99dc60>, 'OFS.ZDOM.Element') getNextSibling (<function getNextSibling at 99dca0>, 'OFS.ZDOM.Element') getNodeName (<function getNodeName at 99c630>, 'OFS.ZDOM.Element') getNodeType (<function getNodeType at 99c6b0>, 'OFS.ZDOM.Element') getNodeValue (<function getNodeValue at 995120>, 'OFS.ZDOM.Node') getOwnerDocument (<function getOwnerDocument at 996ac0>, 'OFS.ZDOM.Node') getParentNode (<function getParentNode at 99c6d0>, 'OFS.ZDOM.Element') getPreviousSibling (<function getPreviousSibling at 99dc80>, 'OFS.ZDOM.Element') getTagName (<function getTagName at 99c5d0>, 'OFS.ZDOM.Element') get_local_roles (<function get_local_roles at 9bd1f0>, 'AccessControl.Role.RoleManager') get_local_roles_for_userid (<function get_local_roles_for_userid at 9bd320>, 'AccessControl.Role.RoleManager') get_request_var_or_attr (<function get_request_var_or_attr at 9c78e0>, 'App.Undo.UndoSupport') get_valid_userids (<function get_valid_userids at 9bd300>, 'AccessControl.Role.RoleManager') hasChildNodes (<function hasChildNodes at 9982f0>, 'OFS.ZDOM.Node') has_local_roles (<function has_local_roles at 9bd1b0>, 'AccessControl.Role.RoleManager') icon ('', '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') id ('', 'OFS.SimpleItem.Item') inheritedAttribute (<CMethod object at 8484d0>, 'Base') isAnObjectManager (1, 'OFS.ObjectManager.ObjectManager') isPrincipiaFolderish (1, 'OFS.ObjectManager.ObjectManager') isTopLevelPrincipiaApplicationObject (0, 'OFS.SimpleItem.Item') locked_in_version (<function locked_in_version at 946740>, 'App.PersistentExtra.Persistent') manage (<HTMLFile instance at 00977A10>, 'App.Management.Navigation') manage_CopyContainerFirstItem (<function manage_CopyContainerFirstItem at 9823c0>, 'OFS.CopySupport.CopyContainer') manage_CopyContainerFirstItem__roles__ (('Manager',), 'OFS.CopySupport.CopyContainer') manage_FTPlist (<function manage_FTPlist at 9cf380>, 'OFS.ObjectManager.ObjectManager') manage_FTPlist__roles__ (<PermissionRole instance at 009D7F30>, 'ZClasses.ObjectManager.ObjectManager') manage_FTPstat (<function manage_FTPstat at 9cf3a0>, 'OFS.ObjectManager.ObjectManager') manage_FTPstat__roles__ (<PermissionRole instance at 009D7F30>, 'ZClasses.ObjectManager.ObjectManager') manage_UndoForm (<HTMLFile instance at 009C73A0>, 'App.Undo.UndoSupport') manage_UndoForm__roles__ (<PermissionRole instance at 009C7EB0>, 'App.Undo.UndoSupport') manage__roles__ (<PermissionRole instance at 00977790>, 'App.Management.Navigation') manage_access (<function manage_access at 9bdb40>, 'AccessControl.Role.RoleManager') manage_access__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_acquiredForm (<HTMLFile instance at 009BD3A0>, 'AccessControl.Role.RoleManager') manage_acquiredForm__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_acquiredPermissions (<function manage_acquiredPermissions at 9bd7c0>, 'AccessControl.Role.RoleManager') manage_acquiredPermissions__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_addDTMLDocument (<function addDTMLDocument at a6a400>, 'OFS.ObjectManager.ObjectManager') manage_addDTMLDocument__roles__ (<PermissionRole instance at 011EFBF0>, 'OFS.ObjectManager.ObjectManager') manage_addDTMLMethod (<function addDTMLMethod at 965db0>, 'OFS.ObjectManager.ObjectManager') manage_addDTMLMethod__roles__ (<PermissionRole instance at 011F2EB0>, 'OFS.ObjectManager.ObjectManager') manage_addDocument (<function addDTMLMethod at 965db0>, 'OFS.ObjectManager.ObjectManager') manage_addDocument__roles__ (<PermissionRole instance at 011F2EB0>, 'OFS.ObjectManager.ObjectManager') manage_addFile (<function manage_addFile at 9f5480>, 'OFS.ObjectManager.ObjectManager') manage_addFile__roles__ (<PermissionRole instance at 01200B40>, 'OFS.ObjectManager.ObjectManager') manage_addFolder (<function manage_addFolder at 9d97d0>, 'OFS.ObjectManager.ObjectManager') manage_addFolder__roles__ (<PermissionRole instance at 012015B0>, 'OFS.ObjectManager.ObjectManager') manage_addImage (<function manage_addImage at 9f7740>, 'OFS.ObjectManager.ObjectManager') manage_addImage__roles__ (<PermissionRole instance at 011F0CA0>, 'OFS.ObjectManager.ObjectManager') manage_addLocalRoles (<function manage_addLocalRoles at 9bd340>, 'AccessControl.Role.RoleManager') manage_addLocalRoles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_addMailHost (<function add at a591d0>, 'OFS.ObjectManager.ObjectManager') manage_addMailHost__roles__ (<PermissionRole instance at 011F3A30>, 'OFS.ObjectManager.ObjectManager') manage_addMailHost_form (<HTMLFile instance at 00A597F0>, 'OFS.ObjectManager.ObjectManager') manage_addMailHost_form__roles__ (<PermissionRole instance at 011F3A30>, 'OFS.ObjectManager.ObjectManager') manage_addProduct (<ProductDispatcher instance at 009CFC10>, 'OFS.ObjectManager.ObjectManager') manage_addUserFolder (<function manage_addUserFolder at 9e4f30>, 'OFS.ObjectManager.ObjectManager') manage_addUserFolder__roles__ (<PermissionRole instance at 012028C0>, 'OFS.ObjectManager.ObjectManager') manage_afterAdd (<function manage_afterAdd at 9cf990>, 'OFS.ObjectManager.ObjectManager') manage_afterAdd__roles__ (('Manager',), 'OFS.ObjectManager.ObjectManager') manage_afterClone (<function manage_afterClone at 9cf9b0>, 'OFS.ObjectManager.ObjectManager') manage_afterClone__roles__ (('Manager',), 'OFS.ObjectManager.ObjectManager') manage_beforeDelete (<function manage_beforeDelete at 9cf9d0>, 'OFS.ObjectManager.ObjectManager') manage_beforeDelete__roles__ (('Manager',), 'OFS.ObjectManager.ObjectManager') manage_changePermissions (<function manage_changePermissions at 9bddd0>, 'AccessControl.Role.RoleManager') manage_changePermissions__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_clone (<function manage_clone at 98fcb0>, 'OFS.CopySupport.CopyContainer') manage_clone__roles__ (None, 'OFS.CopySupport.CopyContainer') manage_copyObjects (<function manage_copyObjects at 982630>, 'OFS.CopySupport.CopyContainer') manage_copyObjects__roles__ (<PermissionRole instance at 00991DD0>, 'OFS.CopySupport.CopyContainer') manage_copyright (<HTMLFile instance at 00977630>, 'App.Management.Navigation') manage_copyright__roles__ (None, 'App.Management.Navigation') manage_cutObjects (<function manage_cutObjects at 982470>, 'OFS.CopySupport.CopyContainer') manage_cutObjects__roles__ (<PermissionRole instance at 00991DD0>, 'OFS.CopySupport.CopyContainer') manage_defined_roles (<function manage_defined_roles at 9bd6c0>, 'AccessControl.Role.RoleManager') manage_defined_roles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_delLocalRoles (<function manage_delLocalRoles at 9bd560>, 'AccessControl.Role.RoleManager') manage_delLocalRoles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_delObjects (<function manage_delObjects at 9cfc50>, 'OFS.ObjectManager.ObjectManager') manage_delObjects__roles__ (<PermissionRole instance at 009D4FF0>, 'ZClasses.ObjectManager.ObjectManager') manage_editLocalRoles (<HTMLFile instance at 009BD870>, 'AccessControl.Role.RoleManager') manage_editLocalRoles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_editRoles (<function manage_editRoles at 9bd960>, 'AccessControl.Role.RoleManager') manage_editRoles__roles__ (('Manager',), 'AccessControl.Role.RoleManager') manage_editedDialog (<function manage_editedDialog at 9a3350>, 'OFS.SimpleItem.Item') manage_editedDialog__roles__ (('Manager',), 'OFS.SimpleItem.Item') manage_exportHack (<function manage_exportHack at 9cfc90>, 'OFS.ObjectManager.ObjectManager') manage_exportHack__roles__ (('Manager',), 'OFS.ObjectManager.ObjectManager') manage_exportObject (<function manage_exportObject at 9cfcf0>, 'OFS.ObjectManager.ObjectManager') manage_exportObject__roles__ (<PermissionRole instance at 00A4D890>, 'ZClasses.ObjectManager.ObjectManager') manage_getPermissionMapping (<function manage_getPermissionMapping at 9bc750>, 'AccessControl.PermissionMapping.RoleManager') manage_help (<function manage_help at 976fe0>, 'App.Management.Tabs') manage_help__roles__ ((), 'App.Management.Tabs') manage_importExportForm (<HTMLFile instance at 009CFD10>, 'OFS.ObjectManager.ObjectManager') manage_importExportForm__roles__ (<PermissionRole instance at 00A4D890>, 'ZClasses.ObjectManager.ObjectManager') manage_importHack (<function manage_importHack at 9cfcc0>, 'OFS.ObjectManager.ObjectManager') manage_importHack__roles__ (('Manager',), 'OFS.ObjectManager.ObjectManager') manage_importObject (<function manage_importObject at 9cf360>, 'OFS.ObjectManager.ObjectManager') manage_importObject__roles__ (<PermissionRole instance at 00A4D890>, 'ZClasses.ObjectManager.ObjectManager') manage_listLocalRoles (<HTMLFile instance at 009BDE50>, 'AccessControl.Role.RoleManager') manage_listLocalRoles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_main (<HTMLFile instance at 009CF160>, 'OFS.ObjectManager.ObjectManager') manage_main__roles__ (<PermissionRole instance at 00980DF0>, 'ZClasses.ObjectManager.ObjectManager') manage_menu (<HTMLFile instance at 00977E30>, 'App.Management.Navigation') manage_menu__roles__ (<PermissionRole instance at 00980DF0>, 'ZClasses.ObjectManager.ObjectManager') manage_options (({'label': 'Contents', 'action': 'manage_main'},), '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') manage_pasteObjects (<function manage_pasteObjects at 982980>, 'OFS.CopySupport.CopyContainer') manage_pasteObjects__roles__ (<PermissionRole instance at 00991DD0>, 'OFS.CopySupport.CopyContainer') manage_permission (<function manage_permission at 9bdc00>, 'AccessControl.Role.RoleManager') manage_permissionForm (<HTMLFile instance at 009BD7E0>, 'AccessControl.Role.RoleManager') manage_permissionForm__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_permission__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_renameForm (<HTMLFile instance at 00982B40>, 'OFS.CopySupport.CopyContainer') manage_renameForm__roles__ (<PermissionRole instance at 00991DD0>, 'OFS.CopySupport.CopyContainer') manage_renameObject (<function manage_renameObject at 9844c0>, 'OFS.CopySupport.CopyContainer') manage_renameObject__roles__ (<PermissionRole instance at 00991DD0>, 'OFS.CopySupport.CopyContainer') manage_role (<function manage_role at 9bd380>, 'AccessControl.Role.RoleManager') manage_roleForm (<HTMLFile instance at 009BC2E0>, 'AccessControl.Role.RoleManager') manage_roleForm__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_role__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_setLocalRoles (<function manage_setLocalRoles at 9bd400>, 'AccessControl.Role.RoleManager') manage_setLocalRoles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_setPermissionMapping (<function manage_setPermissionMapping at 9bc7c0>, 'AccessControl.PermissionMapping.RoleManager') manage_tabs (<HTMLFile instance at 00976920>, 'App.Management.Tabs') manage_tabs__roles__ (('Anonymous',), 'App.Management.Tabs') manage_undo_transactions (<function manage_undo_transactions at 9c7980>, 'App.Undo.UndoSupport') manage_undo_transactions__roles__ (<PermissionRole instance at 009C7EB0>, 'App.Undo.UndoSupport') manage_workspace (<function manage_workspace at 976d70>, 'App.Management.Tabs') manage_workspace__roles__ (('Anonymous',), 'App.Management.Tabs') meta_type ('Stuff object', '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') meta_types ((), 'ZClasses.ObjectManager.ObjectManager') modified_in_version (<function modified_in_version at 946760>, 'App.PersistentExtra.Persistent') objectIds (<function objectIds at 9cfa20>, 'OFS.ObjectManager.ObjectManager') objectIds__roles__ (<PermissionRole instance at 00986D50>, 'ZClasses.ObjectManager.ObjectManager') objectIds_d (<function objectIds_d at 9cfad0>, 'OFS.ObjectManager.ObjectManager') objectItems (<function objectItems at 9cfa80>, 'OFS.ObjectManager.ObjectManager') objectItems__roles__ (<PermissionRole instance at 00986D50>, 'ZClasses.ObjectManager.ObjectManager') objectItems_d (<function objectItems_d at 9cfb30>, 'OFS.ObjectManager.ObjectManager') objectMap (<function objectMap at 9cfab0>, 'OFS.ObjectManager.ObjectManager') objectMap_d (<function objectMap_d at 9cfb60>, 'OFS.ObjectManager.ObjectManager') objectValues (<function objectValues at 9cfa50>, 'OFS.ObjectManager.ObjectManager') objectValues__roles__ (<PermissionRole instance at 00986D50>, 'ZClasses.ObjectManager.ObjectManager') objectValues_d (<function objectValues_d at 9cfb00>, 'OFS.ObjectManager.ObjectManager') permissionMappingPossibleValues ('<Special Object Used to Force Acquisition>', 'AccessControl.Role.RoleManager') permission_settings (<function permission_settings at 9bc280>, 'AccessControl.Role.RoleManager') permission_settings__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') permissionsOfRole (<function permissionsOfRole at 9bddf0>, 'AccessControl.Role.RoleManager') permissionsOfRole__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') possible_permissions (<function possible_permissions at 9bd9c0>, 'AccessControl.Role.RoleManager') propertysheets (<StuffClass_PropertySheetsClass instance at 012CACB0>, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') raise_standardErrorMessage (<function raise_standardErrorMessage at 9a3e20>, 'OFS.SimpleItem.Item') rolesOfPermission (<function rolesOfPermission at 9bde10>, 'AccessControl.Role.RoleManager') rolesOfPermission__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') selectedRoles ('', 'AccessControl.Role.RoleManager') smallRolesWidget ('', 'AccessControl.Role.RoleManager') superValues (<function superValues at 9cfb90>, 'OFS.ObjectManager.ObjectManager') tabs_path_info (<function tabs_path_info at 976ec0>, 'App.Management.Tabs') this (<function this at 9a3970>, 'OFS.SimpleItem.Item') title ('', 'OFS.SimpleItem.Item') title_and_id (<function title_and_id at 9a3950>, 'OFS.SimpleItem.Item') title_or_id (<function title_or_id at 9a38d0>, 'OFS.SimpleItem.Item') tpURL (<function tpURL at 9a3990>, 'OFS.SimpleItem.Item') tpValues (<function tpValues at 9cfc70>, 'OFS.ObjectManager.ObjectManager') undoable_transactions (<function undoable_transactions at 9c7900>, 'App.Undo.UndoSupport') undoable_transactions__roles__ (<PermissionRole instance at 009C7EB0>, 'App.Undo.UndoSupport') userdefined_roles (<function userdefined_roles at 9bd670>, 'AccessControl.Role.RoleManager') userdefined_roles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') validClipData (<function cb_dataValid at 98fcd0>, 'OFS.CopySupport.CopyContainer') validRoles (<function valid_roles at 9bd5b0>, 'AccessControl.Role.RoleManager') valid_roles (<function valid_roles at 9bd5b0>, 'AccessControl.Role.RoleManager') validate_roles (<function validate_roles at 9bd5f0>, 'AccessControl.Role.RoleManager')
Hmm, maybe Im acquiring some zen. Would recursively traversing the acquisition path using obj.aq_parent and then grabbing the attributes and methods in the inheritance tree of each object be sufficient for seeing all the attributes and methods of a given object (in a given path, through inheritance and acquisition). --------------------------- browse.py ----------------------------------- def collect_dict(d, path, src, attrs): for k,v in d.items(): if not attrs.has_key(k): attrs[k] = (v, path, src) def collect_class(c, path, attrs, classes): if hasattr(c, '__module__'): name = str(c.__module__) + '.' + str(c.__name__) else: name = str(c.__name__) if not classes.has_key(name): classes[name] = 1 collect_dict(c.__dict__, path, name, attrs) if hasattr(c, '__bases__'): for b in c.__bases__: collect_class(b, path, attrs, classes) def collect_obj(obj, path, attrs, classes): path = '/' + str(obj.__name__) + path collect_dict(obj.__dict__, path, 'self', attrs) if hasattr(obj, '__class__'): collect_class(obj.__class__, path, attrs, classes) # collect inherited attributes if hasattr(obj, 'aq_parent'): collect_obj(obj.aq_parent, path, attrs, classes) # collect acquired attributes def collect(obj): attrs = {} classes = {} collect_obj(obj, '', attrs, classes) items = attrs.items() items.sort() for k,v in items: print k, v
From: Damian Morton Subject: [Zope-dev] Object browser - heres a first stab at it
Heres my first stab at a routine to display all the attributes and methods of a given object (in a given path). It doesnt as yet support acquisition, but if I happen across any enlightenment, or if anyone has any to share, I will certainly include it when and if I acquire it.
Next I think I will add an ignore list for ignoring certain classes (such as 'webdav.*') which dont interest me. Any other suggestions will be welcomed.
If nothing else, just seeing the set of methods and attributes of a fairly stock-standard object has been very interesting to me. I should also try sorting them on the classpath to see them grouped by class. Hope it doesnt crash my monitor.
--------------------------- browse.py -----------------------------------
def collect_dict(d, src, attrs): for k,v in d.items(): if not attrs.has_key(k): attrs[k] = (v, src)
def collect_class(c, attrs, classes): if hasattr(c, '__module__'): name = c.__module__ + '.' + c.__name__ else: name = c.__name__ if not classes.has_key(name): classes[name] = 1 collect_dict(c.__dict__, name, attrs) if hasattr(c, '__bases__'): for b in c.__bases__: collect_class(b, attrs, classes)
def collect(obj): attrs = {} classes = {} collect_dict(obj.__dict__, 'self', attrs) if hasattr(obj, '__class__'): collect_class(obj.__class__, attrs, classes) items = attrs.items() items.sort() for k,v in items: print k, v # for some reason 'print k, v[0], v[1]' crashes the monitor
------------------------------------------------------------------------- In the monitor, do this
import Zope app = Zope.app() import browse browse.collect(app.Stuff) COPY (<function COPY at 99bf60>, 'webdav.Resource.Resource') DELETE (<function DELETE at 9ceab0>, 'webdav.Collection.Collection') DELETE__roles__ (<PermissionRole instance at 009CE9B0>, 'webdav.Collection.Collection') HEAD (<function HEAD at 9ce990>, 'webdav.Collection.Collection') HEAD__roles__ (<PermissionRole instance at 009CEF70>, 'webdav.Collection.Collection') LOCK (<function LOCK at 99b2a0>, 'webdav.Resource.Resource') MKCOL (<function MKCOL at 99bf40>, 'webdav.Resource.Resource') MOVE (<function MOVE at 99bf80>, 'webdav.Resource.Resource') OPTIONS (<function OPTIONS at 99bb30>, 'webdav.Resource.Resource') OPTIONS__roles__ (None, 'webdav.Resource.Resource') PROPFIND (<function PROPFIND at 99bf00>, 'webdav.Resource.Resource') PROPFIND__roles__ (<PermissionRole instance at 009CE7F0>, 'webdav.Collection.Collection') PROPPATCH (<function PROPPATCH at 99bf20>, 'webdav.Resource.Resource') PROPPATCH__roles__ (<PermissionRole instance at 009CEEA0>, 'webdav.Collection.Collection') PUT (<function PUT at 9cea90>, 'webdav.Collection.Collection') SectionClass (<MWp instance at 012CAE10>, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') SectionClass_add (<MWp instance at 012C9AB0>, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') SectionClass_addForm (<MWp instance at 012CA1F0>, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') SectionClass_factory (<MWp instance at 012C9910>, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') TRACE (<function TRACE at 99bb50>, 'webdav.Resource.Resource') TRACE__roles__ (None, 'webdav.Resource.Resource') UNLOCK (<function UNLOCK at 99b370>, 'webdav.Resource.Resource') __ac_local_roles__ (None, 'AccessControl.Role.RoleManager') __ac_permissions__ ((('Add Stuff objects', (), ('Manager',)),), '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') __ac_roles__ (('Manager', 'Owner', 'Anonymous'), 'AccessControl.Role.RoleManager') __basicnew__ (<CMethod object at 848550>, 'Base') __changed__ (<CMethod object at 8d4cb0>, 'App.PersistentExtra.Persistent') __class_init__ (<function __class_init__ at a05bf0>, 'ZClasses.ZClass.PersistentClass') __dav_collection__ (1, 'webdav.Collection.Collection') __dav_resource__ (1, 'webdav.Resource.Resource') __doc__ ('StuffClass', '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') __getattr__ (<CMethod object at 8d4910>, 'App.PersistentExtra.Persistent') __getitem__ (<function __getitem__ at 9cf3c0>, 'OFS.ObjectManager.ObjectManager') __getstate__ (<CMethod object at 8d4ef0>, 'App.PersistentExtra.Persistent') __http_methods__ (('GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'TRACE', 'PROPFIND', 'PROPPATCH', 'MKCOL', 'COPY', 'MOVE'), 'w ebdav.Resource.Resource') __len__ (<function __len__ at 9a3f10>, 'OFS.SimpleItem.Item') __module__ ('*qSM8LUzKd3T5Bl1BzEwsLQ==', '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') __name__ (<ComputedAttribute object at 9a2830>, 'OFS.SimpleItem.Item') __of__ (<Python Method object at 929330>, 'Acquisition.Acquirer') __propsets__ ((), 'OFS.SimpleItem.Item') __reduce__ (<Python Method object at 848450>, 'Base') __roles__ (<PermissionRole instance at 00986D50>, 'ZClasses.ObjectManager.ObjectManager') __setattr__ (<CMethod object at 8d4b20>, 'App.PersistentExtra.Persistent') __setstate__ (<CMethod object at 8d4130>, 'App.PersistentExtra.Persistent') _addRole (<function _addRole at 9bd700>, 'AccessControl.Role.RoleManager') _canCopy (<function _canCopy at 991890>, 'OFS.CopySupport.CopySource') _checkId (<function _checkId at 9cf8e0>, 'OFS.ObjectManager.ObjectManager') _delOb (<function _delOb at 9cf920>, 'OFS.ObjectManager.ObjectManager') _delObject (<function _delObject at 9cf9f0>, 'OFS.ObjectManager.ObjectManager') _delRoles (<function _delRoles at 9bd8a0>, 'AccessControl.Role.RoleManager') _getCopy (<function _getCopy at 991bf0>, 'OFS.CopySupport.CopySource') _getOb (<function _getOb at 9cf940>, 'OFS.ObjectManager.ObjectManager') _get_id (<function _get_id at 982650>, 'OFS.CopySupport.CopyContainer') _has_user_defined_role (<function _has_user_defined_role at 9bd930>, 'AccessControl.Role.RoleManager') _isBeingUsedAsAMethod (<function _isBeingUsedAsAMethod at 9bc800>, 'AccessControl.PermissionMapping.RoleManager') _manage_editedDialog (<HTMLFile instance at 009A3BC0>, 'OFS.SimpleItem.Item') _notifyOfCopyTo (<function _notifyOfCopyTo at 9918c0>, 'OFS.CopySupport.CopySource') _objects ((), 'OFS.ObjectManager.ObjectManager') _p_changed (None, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') _p_deactivate (<CMethod object at 8d4e70>, 'App.PersistentExtra.Persistent') _p_jar (<ZODB.Connection.Connection instance at 12bbd30>, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') _p_oid ('\000\000\000\000\000\000\016\220', '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') _p_serial ('\0032\262\356\273\355\372D', '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') _postCopy (<function _postCopy at 991c90>, 'OFS.CopySupport.CopySource') _setId (<function _setId at 991cb0>, 'OFS.CopySupport.CopySource') _setOb (<function _setOb at 9cf900>, 'OFS.ObjectManager.ObjectManager') _setObject (<function _setObject at 9cf970>, 'OFS.ObjectManager.ObjectManager') _setRoles (<function _setRoles at 9bd980>, 'AccessControl.Role.RoleManager') _subobject_permissions (<function _subobject_permissions at 9cf720>, 'OFS.ObjectManager.ObjectManager') _v_dav_lock (None, 'webdav.Resource.Resource') _verifyObjectPaste (<function _verifyObjectPaste at 98fd20>, 'OFS.CopySupport.CopyContainer') _zclass_method_meta_types (({'permission': 'Add Section objects', 'name': 'Section object', 'product': 'methods', 'action': 'Section Class_factory'},), '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') absolute_url (<function absolute_url at 9a3f30>, 'OFS.SimpleItem.Item') ac_inherited_permissions (<function ac_inherited_permissions at 9bcfc0>, 'AccessControl.Role.RoleManager') ac_inherited_permissions__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') access_debug_info (<function access_debug_info at 9bd590>, 'AccessControl.Role.RoleManager') aclAChecked ('', 'AccessControl.Role.RoleManager') aclEChecked ('', 'AccessControl.Role.RoleManager') aclPChecked ('', 'AccessControl.Role.RoleManager') acquiredRolesAreUsedBy (<function acquiredRolesAreUsedBy at 9bde30>, 'AccessControl.Role.RoleManager') acquiredRolesAreUsedBy__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') all_meta_types (<function all_meta_types at a6ca90>, 'ZClasses.ObjectManager.ObjectManager') bobobase_modification_time (<function bobobase_modification_time at 9466f0>, 'App.PersistentExtra.Persistent') cb_dataItems (<function cb_dataItems at 98fcf0>, 'OFS.CopySupport.CopyContainer') cb_dataValid (<function cb_dataValid at 98fcd0>, 'OFS.CopySupport.CopyContainer') cb_isCopyable (<function cb_isCopyable at 991d10>, 'OFS.CopySupport.CopySource') cb_isMoveable (<function cb_isMoveable at 993d30>, 'OFS.CopySupport.CopySource') dav__genlocktoken (<function dav__genlocktoken at 99bfa0>, 'webdav.Resource.Resource') dav__init (<function dav__init at 9ce970>, 'webdav.Collection.Collection') dav__validate (<function dav__validate at 99b940>, 'webdav.Resource.Resource') fake_lock_xml ('<?xml version="1.0" encoding="utf-8" ?>\012<d:prop xmlns:d="DAV:">\012 <d:lockdiscovery>\012 <d:activelock>\012 <d:locktype><d:write/></d:locktype>\012 <d:lockscope><d:exclusive/></d:lockscope>\012 <d:depth>0</d:depth>\012 <d:owner>you</d:owner>\012 <d:timeout>Second-120</d:timeout>\012 <d:locktoken>\012 <d:href>locktoken:%s</d:href>\012 </d:locktoken>\012 </d:activelock>\012 </d:lockdiscovery>\012</d:prop>', 'webdav.Resource.Resource') filtered_manage_options (<function filtered_manage_options at 976d50>, 'App.Management.Tabs') filtered_manage_options__roles__ (None, 'App.Management.Tabs') filtered_meta_types (<function filtered_meta_types at 9cf8c0>, 'OFS.ObjectManager.ObjectManager') getAttribute (<function getAttribute at 99dcc0>, 'OFS.ZDOM.Element') getAttributeNode (<function getAttributeNode at 99ecd0>, 'OFS.ZDOM.Element') getAttributes (<function getAttributes at 996810>, 'OFS.ZDOM.Node') getChildNodes (<function getChildNodes at 99c6f0>, 'OFS.ZDOM.Element') getElementsByTagName (<function getElementsByTagName at 99ecf0>, 'OFS.ZDOM.Element') getFirstChild (<function getFirstChild at 99dc40>, 'OFS.ZDOM.Element') getLastChild (<function getLastChild at 99dc60>, 'OFS.ZDOM.Element') getNextSibling (<function getNextSibling at 99dca0>, 'OFS.ZDOM.Element') getNodeName (<function getNodeName at 99c630>, 'OFS.ZDOM.Element') getNodeType (<function getNodeType at 99c6b0>, 'OFS.ZDOM.Element') getNodeValue (<function getNodeValue at 995120>, 'OFS.ZDOM.Node') getOwnerDocument (<function getOwnerDocument at 996ac0>, 'OFS.ZDOM.Node') getParentNode (<function getParentNode at 99c6d0>, 'OFS.ZDOM.Element') getPreviousSibling (<function getPreviousSibling at 99dc80>, 'OFS.ZDOM.Element') getTagName (<function getTagName at 99c5d0>, 'OFS.ZDOM.Element') get_local_roles (<function get_local_roles at 9bd1f0>, 'AccessControl.Role.RoleManager') get_local_roles_for_userid (<function get_local_roles_for_userid at 9bd320>, 'AccessControl.Role.RoleManager') get_request_var_or_attr (<function get_request_var_or_attr at 9c78e0>, 'App.Undo.UndoSupport') get_valid_userids (<function get_valid_userids at 9bd300>, 'AccessControl.Role.RoleManager') hasChildNodes (<function hasChildNodes at 9982f0>, 'OFS.ZDOM.Node') has_local_roles (<function has_local_roles at 9bd1b0>, 'AccessControl.Role.RoleManager') icon ('', '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') id ('', 'OFS.SimpleItem.Item') inheritedAttribute (<CMethod object at 8484d0>, 'Base') isAnObjectManager (1, 'OFS.ObjectManager.ObjectManager') isPrincipiaFolderish (1, 'OFS.ObjectManager.ObjectManager') isTopLevelPrincipiaApplicationObject (0, 'OFS.SimpleItem.Item') locked_in_version (<function locked_in_version at 946740>, 'App.PersistentExtra.Persistent') manage (<HTMLFile instance at 00977A10>, 'App.Management.Navigation') manage_CopyContainerFirstItem (<function manage_CopyContainerFirstItem at 9823c0>, 'OFS.CopySupport.CopyContainer') manage_CopyContainerFirstItem__roles__ (('Manager',), 'OFS.CopySupport.CopyContainer') manage_FTPlist (<function manage_FTPlist at 9cf380>, 'OFS.ObjectManager.ObjectManager') manage_FTPlist__roles__ (<PermissionRole instance at 009D7F30>, 'ZClasses.ObjectManager.ObjectManager') manage_FTPstat (<function manage_FTPstat at 9cf3a0>, 'OFS.ObjectManager.ObjectManager') manage_FTPstat__roles__ (<PermissionRole instance at 009D7F30>, 'ZClasses.ObjectManager.ObjectManager') manage_UndoForm (<HTMLFile instance at 009C73A0>, 'App.Undo.UndoSupport') manage_UndoForm__roles__ (<PermissionRole instance at 009C7EB0>, 'App.Undo.UndoSupport') manage__roles__ (<PermissionRole instance at 00977790>, 'App.Management.Navigation') manage_access (<function manage_access at 9bdb40>, 'AccessControl.Role.RoleManager') manage_access__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_acquiredForm (<HTMLFile instance at 009BD3A0>, 'AccessControl.Role.RoleManager') manage_acquiredForm__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_acquiredPermissions (<function manage_acquiredPermissions at 9bd7c0>, 'AccessControl.Role.RoleManager') manage_acquiredPermissions__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_addDTMLDocument (<function addDTMLDocument at a6a400>, 'OFS.ObjectManager.ObjectManager') manage_addDTMLDocument__roles__ (<PermissionRole instance at 011EFBF0>, 'OFS.ObjectManager.ObjectManager') manage_addDTMLMethod (<function addDTMLMethod at 965db0>, 'OFS.ObjectManager.ObjectManager') manage_addDTMLMethod__roles__ (<PermissionRole instance at 011F2EB0>, 'OFS.ObjectManager.ObjectManager') manage_addDocument (<function addDTMLMethod at 965db0>, 'OFS.ObjectManager.ObjectManager') manage_addDocument__roles__ (<PermissionRole instance at 011F2EB0>, 'OFS.ObjectManager.ObjectManager') manage_addFile (<function manage_addFile at 9f5480>, 'OFS.ObjectManager.ObjectManager') manage_addFile__roles__ (<PermissionRole instance at 01200B40>, 'OFS.ObjectManager.ObjectManager') manage_addFolder (<function manage_addFolder at 9d97d0>, 'OFS.ObjectManager.ObjectManager') manage_addFolder__roles__ (<PermissionRole instance at 012015B0>, 'OFS.ObjectManager.ObjectManager') manage_addImage (<function manage_addImage at 9f7740>, 'OFS.ObjectManager.ObjectManager') manage_addImage__roles__ (<PermissionRole instance at 011F0CA0>, 'OFS.ObjectManager.ObjectManager') manage_addLocalRoles (<function manage_addLocalRoles at 9bd340>, 'AccessControl.Role.RoleManager') manage_addLocalRoles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_addMailHost (<function add at a591d0>, 'OFS.ObjectManager.ObjectManager') manage_addMailHost__roles__ (<PermissionRole instance at 011F3A30>, 'OFS.ObjectManager.ObjectManager') manage_addMailHost_form (<HTMLFile instance at 00A597F0>, 'OFS.ObjectManager.ObjectManager') manage_addMailHost_form__roles__ (<PermissionRole instance at 011F3A30>, 'OFS.ObjectManager.ObjectManager') manage_addProduct (<ProductDispatcher instance at 009CFC10>, 'OFS.ObjectManager.ObjectManager') manage_addUserFolder (<function manage_addUserFolder at 9e4f30>, 'OFS.ObjectManager.ObjectManager') manage_addUserFolder__roles__ (<PermissionRole instance at 012028C0>, 'OFS.ObjectManager.ObjectManager') manage_afterAdd (<function manage_afterAdd at 9cf990>, 'OFS.ObjectManager.ObjectManager') manage_afterAdd__roles__ (('Manager',), 'OFS.ObjectManager.ObjectManager') manage_afterClone (<function manage_afterClone at 9cf9b0>, 'OFS.ObjectManager.ObjectManager') manage_afterClone__roles__ (('Manager',), 'OFS.ObjectManager.ObjectManager') manage_beforeDelete (<function manage_beforeDelete at 9cf9d0>, 'OFS.ObjectManager.ObjectManager') manage_beforeDelete__roles__ (('Manager',), 'OFS.ObjectManager.ObjectManager') manage_changePermissions (<function manage_changePermissions at 9bddd0>, 'AccessControl.Role.RoleManager') manage_changePermissions__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_clone (<function manage_clone at 98fcb0>, 'OFS.CopySupport.CopyContainer') manage_clone__roles__ (None, 'OFS.CopySupport.CopyContainer') manage_copyObjects (<function manage_copyObjects at 982630>, 'OFS.CopySupport.CopyContainer') manage_copyObjects__roles__ (<PermissionRole instance at 00991DD0>, 'OFS.CopySupport.CopyContainer') manage_copyright (<HTMLFile instance at 00977630>, 'App.Management.Navigation') manage_copyright__roles__ (None, 'App.Management.Navigation') manage_cutObjects (<function manage_cutObjects at 982470>, 'OFS.CopySupport.CopyContainer') manage_cutObjects__roles__ (<PermissionRole instance at 00991DD0>, 'OFS.CopySupport.CopyContainer') manage_defined_roles (<function manage_defined_roles at 9bd6c0>, 'AccessControl.Role.RoleManager') manage_defined_roles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_delLocalRoles (<function manage_delLocalRoles at 9bd560>, 'AccessControl.Role.RoleManager') manage_delLocalRoles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_delObjects (<function manage_delObjects at 9cfc50>, 'OFS.ObjectManager.ObjectManager') manage_delObjects__roles__ (<PermissionRole instance at 009D4FF0>, 'ZClasses.ObjectManager.ObjectManager') manage_editLocalRoles (<HTMLFile instance at 009BD870>, 'AccessControl.Role.RoleManager') manage_editLocalRoles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_editRoles (<function manage_editRoles at 9bd960>, 'AccessControl.Role.RoleManager') manage_editRoles__roles__ (('Manager',), 'AccessControl.Role.RoleManager') manage_editedDialog (<function manage_editedDialog at 9a3350>, 'OFS.SimpleItem.Item') manage_editedDialog__roles__ (('Manager',), 'OFS.SimpleItem.Item') manage_exportHack (<function manage_exportHack at 9cfc90>, 'OFS.ObjectManager.ObjectManager') manage_exportHack__roles__ (('Manager',), 'OFS.ObjectManager.ObjectManager') manage_exportObject (<function manage_exportObject at 9cfcf0>, 'OFS.ObjectManager.ObjectManager') manage_exportObject__roles__ (<PermissionRole instance at 00A4D890>, 'ZClasses.ObjectManager.ObjectManager') manage_getPermissionMapping (<function manage_getPermissionMapping at 9bc750>, 'AccessControl.PermissionMapping.RoleManager') manage_help (<function manage_help at 976fe0>, 'App.Management.Tabs') manage_help__roles__ ((), 'App.Management.Tabs') manage_importExportForm (<HTMLFile instance at 009CFD10>, 'OFS.ObjectManager.ObjectManager') manage_importExportForm__roles__ (<PermissionRole instance at 00A4D890>, 'ZClasses.ObjectManager.ObjectManager') manage_importHack (<function manage_importHack at 9cfcc0>, 'OFS.ObjectManager.ObjectManager') manage_importHack__roles__ (('Manager',), 'OFS.ObjectManager.ObjectManager') manage_importObject (<function manage_importObject at 9cf360>, 'OFS.ObjectManager.ObjectManager') manage_importObject__roles__ (<PermissionRole instance at 00A4D890>, 'ZClasses.ObjectManager.ObjectManager') manage_listLocalRoles (<HTMLFile instance at 009BDE50>, 'AccessControl.Role.RoleManager') manage_listLocalRoles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_main (<HTMLFile instance at 009CF160>, 'OFS.ObjectManager.ObjectManager') manage_main__roles__ (<PermissionRole instance at 00980DF0>, 'ZClasses.ObjectManager.ObjectManager') manage_menu (<HTMLFile instance at 00977E30>, 'App.Management.Navigation') manage_menu__roles__ (<PermissionRole instance at 00980DF0>, 'ZClasses.ObjectManager.ObjectManager') manage_options (({'label': 'Contents', 'action': 'manage_main'},), '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') manage_pasteObjects (<function manage_pasteObjects at 982980>, 'OFS.CopySupport.CopyContainer') manage_pasteObjects__roles__ (<PermissionRole instance at 00991DD0>, 'OFS.CopySupport.CopyContainer') manage_permission (<function manage_permission at 9bdc00>, 'AccessControl.Role.RoleManager') manage_permissionForm (<HTMLFile instance at 009BD7E0>, 'AccessControl.Role.RoleManager') manage_permissionForm__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_permission__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_renameForm (<HTMLFile instance at 00982B40>, 'OFS.CopySupport.CopyContainer') manage_renameForm__roles__ (<PermissionRole instance at 00991DD0>, 'OFS.CopySupport.CopyContainer') manage_renameObject (<function manage_renameObject at 9844c0>, 'OFS.CopySupport.CopyContainer') manage_renameObject__roles__ (<PermissionRole instance at 00991DD0>, 'OFS.CopySupport.CopyContainer') manage_role (<function manage_role at 9bd380>, 'AccessControl.Role.RoleManager') manage_roleForm (<HTMLFile instance at 009BC2E0>, 'AccessControl.Role.RoleManager') manage_roleForm__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_role__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_setLocalRoles (<function manage_setLocalRoles at 9bd400>, 'AccessControl.Role.RoleManager') manage_setLocalRoles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') manage_setPermissionMapping (<function manage_setPermissionMapping at 9bc7c0>, 'AccessControl.PermissionMapping.RoleManager') manage_tabs (<HTMLFile instance at 00976920>, 'App.Management.Tabs') manage_tabs__roles__ (('Anonymous',), 'App.Management.Tabs') manage_undo_transactions (<function manage_undo_transactions at 9c7980>, 'App.Undo.UndoSupport') manage_undo_transactions__roles__ (<PermissionRole instance at 009C7EB0>, 'App.Undo.UndoSupport') manage_workspace (<function manage_workspace at 976d70>, 'App.Management.Tabs') manage_workspace__roles__ (('Anonymous',), 'App.Management.Tabs') meta_type ('Stuff object', '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') meta_types ((), 'ZClasses.ObjectManager.ObjectManager') modified_in_version (<function modified_in_version at 946760>, 'App.PersistentExtra.Persistent') objectIds (<function objectIds at 9cfa20>, 'OFS.ObjectManager.ObjectManager') objectIds__roles__ (<PermissionRole instance at 00986D50>, 'ZClasses.ObjectManager.ObjectManager') objectIds_d (<function objectIds_d at 9cfad0>, 'OFS.ObjectManager.ObjectManager') objectItems (<function objectItems at 9cfa80>, 'OFS.ObjectManager.ObjectManager') objectItems__roles__ (<PermissionRole instance at 00986D50>, 'ZClasses.ObjectManager.ObjectManager') objectItems_d (<function objectItems_d at 9cfb30>, 'OFS.ObjectManager.ObjectManager') objectMap (<function objectMap at 9cfab0>, 'OFS.ObjectManager.ObjectManager') objectMap_d (<function objectMap_d at 9cfb60>, 'OFS.ObjectManager.ObjectManager') objectValues (<function objectValues at 9cfa50>, 'OFS.ObjectManager.ObjectManager') objectValues__roles__ (<PermissionRole instance at 00986D50>, 'ZClasses.ObjectManager.ObjectManager') objectValues_d (<function objectValues_d at 9cfb00>, 'OFS.ObjectManager.ObjectManager') permissionMappingPossibleValues ('<Special Object Used to Force Acquisition>', 'AccessControl.Role.RoleManager') permission_settings (<function permission_settings at 9bc280>, 'AccessControl.Role.RoleManager') permission_settings__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') permissionsOfRole (<function permissionsOfRole at 9bddf0>, 'AccessControl.Role.RoleManager') permissionsOfRole__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') possible_permissions (<function possible_permissions at 9bd9c0>, 'AccessControl.Role.RoleManager') propertysheets (<StuffClass_PropertySheetsClass instance at 012CACB0>, '*qSM8LUzKd3T5Bl1BzEwsLQ==.StuffClass') raise_standardErrorMessage (<function raise_standardErrorMessage at 9a3e20>, 'OFS.SimpleItem.Item') rolesOfPermission (<function rolesOfPermission at 9bde10>, 'AccessControl.Role.RoleManager') rolesOfPermission__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') selectedRoles ('', 'AccessControl.Role.RoleManager') smallRolesWidget ('', 'AccessControl.Role.RoleManager') superValues (<function superValues at 9cfb90>, 'OFS.ObjectManager.ObjectManager') tabs_path_info (<function tabs_path_info at 976ec0>, 'App.Management.Tabs') this (<function this at 9a3970>, 'OFS.SimpleItem.Item') title ('', 'OFS.SimpleItem.Item') title_and_id (<function title_and_id at 9a3950>, 'OFS.SimpleItem.Item') title_or_id (<function title_or_id at 9a38d0>, 'OFS.SimpleItem.Item') tpURL (<function tpURL at 9a3990>, 'OFS.SimpleItem.Item') tpValues (<function tpValues at 9cfc70>, 'OFS.ObjectManager.ObjectManager') undoable_transactions (<function undoable_transactions at 9c7900>, 'App.Undo.UndoSupport') undoable_transactions__roles__ (<PermissionRole instance at 009C7EB0>, 'App.Undo.UndoSupport') userdefined_roles (<function userdefined_roles at 9bd670>, 'AccessControl.Role.RoleManager') userdefined_roles__roles__ (<PermissionRole instance at 009BEBE0>, 'AccessControl.Role.RoleManager') validClipData (<function cb_dataValid at 98fcd0>, 'OFS.CopySupport.CopyContainer') validRoles (<function valid_roles at 9bd5b0>, 'AccessControl.Role.RoleManager') valid_roles (<function valid_roles at 9bd5b0>, 'AccessControl.Role.RoleManager') validate_roles (<function validate_roles at 9bd5f0>, 'AccessControl.Role.RoleManager')
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Hi all, 1. Are there any method that I can override to hook changes to an object? 2. And can I determine what type of change that have occurred? 3. I also what to build a change-event bubbling mechanism, that calls the parents change-hook until bubbling is canceled. Here's why I'm asking: I what to build some object to which the end-user can submit a e-mail address to be notified when a change to that object or a sub-object has occurred. Best Regards, Johan Carlsson
participants (4)
-
Johan Carlsson -
Jonothan Farr -
morton@dennisinter.com -
Saravanan Bellan