File:  [Repository] / OSAS / OSA_system / OSAS_Root.py
Revision 1.6: download - view: text, annotated - select for diffs - revision graph
Fri Apr 2 07:57:25 2004 UTC (20 years, 2 months ago) by dwinter
Branches: MAIN
CVS tags: HEAD
communication with ECHO_content now via HTTP.

from time import localtime,strftime
from Acquisition import Implicit
from OFS.Folder import Folder
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from Products.PageTemplates.PageTemplate import PageTemplate

class OSAS_Root(Folder,Implicit):
    """Implicit Folder of the  Storage Systems"""
    def __init__(self,id,RootFolderName,DigILibURL):
        """initialize a new instance"""
        self.id = id
        self.RootFolderName = RootFolderName
        self.DigILibURL=DigILibURL
        
    meta_type="OSAS_Root"

    manage_options = Folder.manage_options+(
        {'label':'Main Config','action':'Root_config'},
        )

    def setDigILibURL(self):
        """set"""
        self.DigILibURL=""
        
    def Root_config(self):
        """Main configuration"""
        pt=PageTemplateFile('Products/OSA_system/zpt/ConfigOSAS_Root.zpt').__of__(self)
        return pt()

    def change_OSAS_Root(self,RootFolderName,DigILibURL,RESPONSE=None):
        """Change RootFolderName"""
        self.RootFolderName=RootFolderName
        self.DigILibURL=DigILibURL
                
        if RESPONSE is not None:
            RESPONSE.redirect('manage_main')

    def date(self):
        """gives formatted date"""
	return strftime("%d.%m.%Y",localtime())	

def manage_AddOSAS_RootForm(self):
    """interface for adding the OSAS_root"""
    pt=PageTemplateFile('Products/OSA_system/zpt/AddOSAS_Root.zpt').__of__(self)
    return pt()

def manage_AddOSAS_Root(self,id,RootFolderName,DigILibURL,RESPONSE=None):
    """add the OSAS_root"""
    newObj=OSAS_Root(id,RootFolderName,DigILibURL)
    self._setObject(id,newObj)
    if RESPONSE is not None:
        RESPONSE.redirect('manage_main')

    

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>