Package Products :: Package ZenModel :: Module ZenModelItem |
[hide private]
[frames] | no frames]

# Source Code for Module Products.ZenModel.ZenModelItem

     1  ##############################################################################
     2  #
     3  # Copyright (C) Zenoss, Inc. 2007, all rights reserved.
     4  #
     5  # This content is made available according to terms specified in
     6  # License.zenoss under the directory where your Zenoss product is installed.
     7  #
     8  ##############################################################################
     9
    10
    11  __doc__="""ZenModelItem
    12
    13  $Id: ZenModelItem.py,v 1.3 2003/10/04 15:54:36 edahl Exp $"""
    14
    15  __version__ = "$Revision: 1.3 $"[11:-2]
    16
    17  from Globals import InitializeClass
    18  from AccessControl import ClassSecurityInfo
    19
    20  from ZenModelBase import ZenModelBase
    21
    22 -class ZenModelItem(ZenModelBase):
    23      """
    24      Simple class that non RelationshipManager items inherit from to
    25      provide primary path functionality.
    26      """
    27
    28      meta_type = 'ZenModelItem'
    29
    30      security = ClassSecurityInfo()
    31
    32
    33 -    def __init__(self, id):
    34          self.id = id
    35
    36
    37      security.declareProtected('View', 'getPrimaryPath')
    38 -    def getPrimaryPath(self):
    39          return self.getPhysicalPath()
    40
    41
    42      security.declareProtected('View', 'getPrimaryUrlPath')
    43 -    def getPrimaryUrlPath(self, ignored=None):
    44          """get the physicalpath as a url"""
    45          return self.absolute_url_path()
    46
    47
    48 -    def primaryAq(self):
    49          """return this object with is acquisition path set to primary path"""
    50          return self
    51
    52
    53  InitializeClass(ZenModelItem)
    54