Package ZenModel :: Module ZenModelRM :: Class ZenModelRM
[hide private]
[frames] | no frames]

Class ZenModelRM

source code

                                                   object --+    
                                                            |    
                                    ZenModelBase.ZenModelBase --+
                                                                |
Products.ZenRelations.RelationshipManager.RelationshipManager --+
                                                                |
                                      ExtensionClass.Base --+   |
                                                            |   |
                                       OFS.History.Historical --+
                                                                |
                                                   object --+   |
                                                            |   |
                                          ZenPacker.ZenPacker --+
                                                                |
                                                               ZenModelRM

Base class for all Persistent classes that have relationships. Provides RelationshipManagement, Customized PropertyManagement, Catalog Indexing, and Historical change tracking.

Instance Methods [hide private]
 
__init__(self, id, title=None, buildRelations=True)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
rename(self, newId, REQUEST=None)
Delete device from the DMD
source code
 
zmanage_editProperties(self, REQUEST=None, redirect=False)
Edit a ZenModel object and return its proper page template
source code
 
zmanage_addProperty(self, id, value, type, label, visible, prefix='c', REQUEST=None)
Add a new property via the web.
source code
 
zmanage_exportObject(self, context=None, REQUEST=None)
Export objects to specific locations.
source code
 
zmanage_importObjects(self, context=None, REQUEST=None)
Import an XML file as the Zenoss objects and properties it represents.
source code
 
zmanage_importObject(self, REQUEST=None)
Import objects into Zenoss.
source code
 
zmanage_delProperties(self, ids=(), REQUEST=None)
Delete properties from an object.
source code
 
zmanage_delObjects(self, ids=(), relation="", REQUEST=None)
Delete objects from this object or one of its relations.
source code
 
getDmdKey(self)
Hook to get the name of an object.
source code
 
primarySortKey(self)
Hook for the value used to sort this object.
source code
 
viewName(self) source code
 
getTreeItems(self) source code
 
getSubObjects(self, filter=None, decend=None, retobjs=None) source code
 
getCreatedTimeString(self)
return the creation time as a string
source code
 
getModificationTimeString(self)
return the modification time as a string
source code
 
changePythonClass(self, newPythonClass, container)
change the python class of a persistent object
source code
 
getZenRootNode(self)
Return the root node for our zProperties.
source code
 
editableDeviceList(self)
Return true if user has Manager role and self has a deviceList.
source code
 
creator(self)
Method needed for CatalogAwarnessInterface.
source code
 
index_object(self)
A common method to allow Findables to index themselves.
source code
 
unindex_object(self)
A common method to allow Findables to unindex themselves.
source code
 
reindex_all(self, obj=None)
Called for in the CataLogAwarenessInterface not sure this is needed.
source code
 
findChild(self, path)
Find child using the ids found in path.
source code

Inherited from ZenModelBase.ZenModelBase: __call__, __hash__, all_meta_types, aqBaseHasAttr, breadCrumbs, callZenScreen, checkRemotePerm, checkValidId, createHierarchyObj, custPropertyIds, custPropertyMap, getBreadCrumbUrlPath, getDmd, getDmdObj, getDmdRoot, getHierarchyObj, getIconPath, getIdLink, getNowString, getObjByPath, getPrimaryDmdId, getUnusedId, getZ, getZopeObj, helpLink, isLocalName, manage_deleteObjects, prepId, saveCustProperties, todayDate, urlLink, view, visibleCustPropertyMap, yesterdayDate, zenScreenUrl, zenpathjoin, zenpathsplit, zentinelTabs

Inherited from OFS.History.Historical: manage_afterHistoryCopy, manage_beforeHistoryCopy, manage_change_history, manage_historicalComparison, manage_historyCompare, manage_historyCopy

Inherited from ZenPacker.ZenPacker: addToZenPack, eligiblePacks, findObject

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  meta_type = 'ZenModelRM'
  default_catalog = ''
  isInTree = 0
  security = ClassSecurityInfo()

Inherited from ZenModelBase.ZenModelBase: index_html, sub_meta_types

Inherited from OFS.History.Historical: HistoricalRevisions, __ac_permissions__, manage_change_history_page, manage_options

Inherited from OFS.History.Historical (private): _manage_historyComparePage

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, id, title=None, buildRelations=True)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

zmanage_editProperties(self, REQUEST=None, redirect=False)

source code 
Edit a ZenModel object and return its proper page template
Overrides: ZenModelBase.ZenModelBase.zmanage_editProperties

zmanage_addProperty(self, id, value, type, label, visible, prefix='c', REQUEST=None)

source code 
Add a new property via the web. Sets a new property with the given id, type, and value. Id must start with a 'c' for custom attributes added via the Custom Schema tab.

getDmdKey(self)

source code 
Hook to get the name of an object. Usually its self.getId() but is overridden by Organizer to be getOrganizerName.
>>> dmd.Manufacturers.createManufacturer('Cisco').getDmdKey()
'Cisco'
>>> dmd.Devices.Server.getDmdKey()
'/Server'

primarySortKey(self)

source code 
Hook for the value used to sort this object. Defaults to self.getId(). IpNetwork for instance overrides to allow it to sort by the IP numeric value not its string value.
>>> n = dmd.Networks.createNet('1.2.3.0', 24)
>>> n.primarySortKey()
16909056L

creator(self)

source code 
Method needed for CatalogAwarnessInterface. Implemented here so that Subclasses (who would have the same implementation) don't need to. Other methods (except reindex_all) are implemented on the concreate class.

findChild(self, path)

source code 
Find child using the ids found in path. Path separator is '/'. This is similar to using attributes, but doesn't use acquisition. For example, if 'Devices/Server/Linux' exists, but 'Devices/Server/SSH/Linux' does not, then the two methods will behave differently. dmd.Devices.Server.SSH.Linux will return 'Devices/Server/Linux', whereas this method will throw an exception.