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

# Source Code for Module Products.ZenModel.browser.Zendoc

     1  ##############################################################################
     2  #
     3  # Copyright (C) Zenoss, Inc. 2009, 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  import zope.component
    12  from Products.Five.browser import BrowserView
    13  from Products.ZenModel.interfaces import IZenDocProvider
    14
    15 -class EditZendoc(BrowserView):
    16      """
    17      Populates the component table that appears on the device status page.
    18      """
    19 -    def _getZendocProvider(self):
    20          return zope.component.queryAdapter( self.context,
    21                                              IZenDocProvider )
    22
    23 -    def getZendoc(self):
    24          zendocProvider = self._getZendocProvider()
    25          return zendocProvider.getZendoc()
    26
    27 -    def saveZendoc(self, zendocText):
    28          zendocProvider = self._getZendocProvider()
    29          zendocProvider.setZendoc( zendocText )
    30