Package ZenRelations :: Module ZenPropertyManager :: Class ZenPropertyManager
[hide private]
[frames] | no frames]

Class ZenPropertyManager

source code

                     object --+        
                              |        
            ExtensionClass.Base --+    
                                  |    
          OFS.ZDOM.Node --+       |    
                          |       |    
           OFS.ZDOM.Element --+   |    
                              |   |    
 OFS.ZDOM.ElementWithAttributes --+    
                                  |    
OFS.PropertyManager.PropertyManager --+
                                      |
                                     ZenPropertyManager
Known Subclasses:
RelationshipManager'.RelationshipManager

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.

Instance Methods [hide private]
 
_setPropValue(self, id, value)
override from PerpertyManager to handle checks and ip creation
source code
 
_setProperty(self, id, value, type='string', label=None, visible=True, setter=None)
for selection and multiple selection properties the value argument indicates the select variable of the property
source code
 
_onlystars(...)
search(string[, pos[, endpos]]) --> match object or None.
source code
 
manage_editProperties(self, REQUEST)
Edit object properties via the web.
source code
 
getZenRootNode(self)
sub class must implement to use zenProperties.
source code
 
zenPropertyIds(self, all=True, pfilt=<built-in method search of _sre.SRE_Pattern object at 0x5d518e0>)
Return list of device tree property names.
source code
 
zenPropertyItems(self)
Return list of (id, value) tuples of zenProperties.
source code
 
zenPropertyMap(self, pfilt=<built-in method search of _sre.SRE_Pattern object at 0x5d518e0>)
Return property mapping of device tree properties.
source code
 
zenPropertyString(self, id)
Return the value of a device tree property as a string
source code
 
zenPropIsPassword(self, id)
Is this field a password field.
source code
 
zenPropertyPath(self, id)
Return the primaryId of where a device tree property is found.
source code
 
zenPropertyType(self, id)
Return the type of this property.
source code
 
setZenProperty(self, propname, propvalue, REQUEST=None)
Add or set the propvalue of the property propname on this node of the device Class tree.
source code
 
saveZenProperties(self, pfilt=<built-in method search of _sre.SRE_Pattern object at 0x5d518e0>, REQUEST=None)
Save all ZenProperties found in the REQUEST.form object.
source code
 
deleteZenProperty(self, propname=None, REQUEST=None)
Delete device tree properties from the this DeviceClass object.
source code
 
zenPropertyOptions(self, propname)
Provide a set of default options for a ZProperty
source code
 
isLocal(self, propname)
Check to see if a name is local to our current context.
source code
 
getOverriddenObjects(self, propname, showDevices=False)
Get the objects that override a property somewhere below in the tree
source code

Inherited from OFS.PropertyManager.PropertyManager: getProperty, getPropertyType, hasProperty, manage_addProperty, manage_changeProperties, manage_changePropertyTypes, manage_delProperties, propdict, propertyIds, propertyItems, propertyLabel, propertyMap, propertyValues, valid_property_id

Inherited from ExtensionClass.Base: __getattribute__, __getnewargs__, __getstate__, __new__, __reduce__, __setstate__

Inherited from object: __delattr__, __hash__, __init__, __reduce_ex__, __repr__, __setattr__, __str__

Inherited from OFS.ZDOM.ElementWithAttributes: getAttribute, getAttributeNode, getAttributes

Inherited from OFS.ZDOM.Element: getChildNodes, getElementsByTagName, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getParentNode, getPreviousSibling, getTagName

Inherited from OFS.ZDOM.Node: __providedBy__, getNodeValue, getOwnerDocument, hasChildNodes

Class Variables [hide private]
  security = ClassSecurityInfo()
  manage_propertiesForm = <App.special_dtml.DTMLFile object at 0...
  __ac_permissions__ = (('zProperties Edit', ('deleteZenProperty...

Inherited from OFS.PropertyManager.PropertyManager: __implemented__, __propsets__, __provides__, manage_options, manage_propertyTypeForm, propertysheets, title

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_setPropValue(self, id, value)

source code 
override from PerpertyManager to handle checks and ip creation
Overrides: OFS.PropertyManager.PropertyManager._setPropValue

_setProperty(self, id, value, type='string', label=None, visible=True, setter=None)

source code 
for selection and multiple selection properties the value argument indicates the select variable of the property
Overrides: OFS.PropertyManager.PropertyManager._setProperty

_onlystars(...)

source code 
search(string[, pos[, endpos]]) --> match object or None. Scan through string looking for a match, and return a corresponding MatchObject instance. Return None if no position in the string matches.

manage_editProperties(self, REQUEST)

source code 
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.
Overrides: OFS.PropertyManager.PropertyManager.manage_editProperties

zenPropertyIds(self, all=True, pfilt=<built-in method search of _sre.SRE_Pattern object at 0x5d518e0>)

source code 
Return list of device tree property names. If all use list from property root node.

Class Variable Details [hide private]

manage_propertiesForm

Value:
DTMLFile('dtml/properties', globals(), property_extensible_schema__= 1\
)

__ac_permissions__

Value:
(('zProperties Edit',
  ('deleteZenProperty',
   'saveZenProperties',
   'setZenProperty',
   'manage_editProperties')),
 ('zProperties View',
  ('zenPropertyIds',
   'isLocal',
...