Trees | Indices | Help |
|
---|
|
object --+ | ExtensionClass.Base --+ | | | OFS.ZDOM.Node --+ | | | | | OFS.ZDOM.Element --+ | | | | | OFS.ZDOM.ElementWithAttributes --+ | | | OFS.PropertyManager.PropertyManager --+ | ZenPropertyManager
ZenPropertyManager adds keyedselection type to PropertyManager. A keyedselection displayes a different name in the popup then the actual value the popup will have. It also has management for zenProperties which are properties that can be inherited long the acquision chain. All properties are for a branch are defined on a "root node" specified by the function which must be returned by the function getZenRootNode that should be over ridden in a sub class. Prperties can then be added further "down" the aq_chain by calling setZenProperty on any contained node. ZenProperties all have the same prefix which is defined by iszprop this can be overridden in a subclass. ZenPropertyManager overrides getProperty and getPropertyType from PropertyManager to support acquisition. If you want to query an object about a property, but do not want it to search the acquistion chain then use the super classes method or aq_base. Example: # acquires property from dmd.Devices dmd.Devices.Server.getProperty('zCollectorPlugins') # does not acquire property from dmd.Devices PropertyManager.getProperty(dmd.Devices.Server, 'zCollectorPlugins') # also does not acquire property from dmd.Devices aq_base(dmd.Devices.Server).getProperty('zSnmpCommunity') The properties are stored as attributes which is convenient, but can be confusing. Attribute access always uses acquistion. Setting an attribute, will not add it to the list of properties, so subsquent calls to hasProperty or getProperty won't return it. Property Transformers are stored at dmd.propertyTransformers and transform the property based on type during calls to the _setProperty, _updateProperty, and getProperty methods. Adding a property using _setProperty applies the appropriate transformer and adds its value as an attribute, but when you access it as an attribute the property transformer is again applied, but this time using its transformForGet method.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from |
|
|||
__pychecker__ = 'no-override'
|
|||
security = ClassSecurityInfo()
|
|||
manage_propertiesForm = DTMLFile('dtml/properties', globals(),
|
|||
_onlystars = re.compile("^\*+$").search
|
|||
Inherited from Inherited from |
|
override from PerpertyManager to handle checks and ip creation
|
for selection and multiple selection properties the value argument indicates the select variable of the property
|
This method sets a property on a zope object. It overrides the method in PropertyManager. If Zope is upgraded you will need to check that this method has not changed! It is overridden so that we can catch the ValueError returned from the field2* converters in the class Converters.py
|
Edit object properties via the web. The purpose of this method is to change all property values, even those not listed in REQUEST; otherwise checkboxes that get turned off will be ignored. Use manage_changeProperties() instead for most situations.
|
Return list of device tree property names. If all use list from property root node. |
Returns self or the first acquisition parent that has a property with the id. Returns None if no parent had the id. |
Override method in PropertyManager to support acquisition.
|
Get property value and apply transformer. Overrides method in Zope's PropertyManager class. Acquire values from aquisiton parents if needed.
|
Overrides methods from PropertyManager to support acquistion.
|
Return the value of a zProperty on this object. This method is used to lookup zProperties for a user with a role that doesn't have direct access to an attribute further up the acquisition path. If the requested property is a password, then None is returned.
Permission: ZEN_ZPROPERTIES_VIEW >>> dmd.Devices.getZ('zSnmpPort') 161 >>> dmd.Devices.getZ('zWinPassword') >>> |
For this manager will return the following about each zProperty Will return the following about each Zen Property - id - identifier - islocal - if this object has a local definition - value - value for this object - valueAsString - string representation of the property - type - int string lines etc - path - where it is defined - options - acceptable values of this zProperty |
|
manage_propertiesForm
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1.1812 on Tue Oct 11 12:51:33 2011 | http://epydoc.sourceforge.net |