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

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

     1  ###########################################################################
     2  #
     3  # This program is part of Zenoss Core, an open source monitoring platform.
     4  # Copyright (C) 2009, Zenoss Inc.
     5  #
     6  # This program is free software; you can redistribute it and/or modify it
     7  # under the terms of the GNU General Public License version 2 or (at your
     8  # option) any later version as published by the Free Software Foundation.
     9  #
    10  # For complete information please visit: http://www.zenoss.com/oss/
    11  #
    12  ###########################################################################
    13  import zope.component
    14  from Products.Five.browser import BrowserView
    15  from Products.ZenModel.interfaces import IZenDocProvider
    16
    17 -class EditZendoc(BrowserView):
    18      """
    19      Populates the component table that appears on the device status page.
    20      """
    21 -    def _getZendocProvider(self):
    22          return zope.component.queryAdapter( self.context,
    23                                              IZenDocProvider )
    24
    25 -    def getZendoc(self):
    26          zendocProvider = self._getZendocProvider()
    27          return zendocProvider.getZendoc()
    28
    29 -    def saveZendoc(self, zendocText):
    30          zendocProvider = self._getZendocProvider()
    31          zendocProvider.setZendoc( zendocText )
    32