Annotation of OSAS/OSA_system/OSAS_addfiles.py~, revision 1.1

1.1     ! dwinter     1: # Methoden und Classen zum Hinzufuegen von Dokumenten
        !             2: 
        !             3: from OFS.Folder import Folder
        !             4: from AccessControl import ClassSecurityInfo
        !             5: 
        !             6: class OSAS_add_Document(Folder):
        !             7:     """Hinzufuegen eines Dokumentes zum Storage"""
        !             8:     security=ClassSecurityInfo()
        !             9: 
        !            10:      def __init__(self,id):
        !            11:         """initialize a new instance"""
        !            12:         self.id = id
        !            13: 
        !            14:      meta_type='OSAS_add_Document'
        !            15: 
        !            16:      manage_options = Folder.manage_options+(
        !            17:         {'label':'Main Config','action':'add_Document_config'},
        !            18:         )
        !            19: 
        !            20:      
        !            21:     
        !            22:     security.declarePublic('add_Document_config')
        !            23:     def add_Document_config(self):
        !            24:         """Main configuration"""
        !            25:         pt=PageTemplateFile('products/OSA_system/ChangeOSAS_addDocument.zpt').__of__(self)
        !            26:         return pt()
        !            27:     
        !            28:     security.declarePublic('change_OSAS_add_Metadata')
        !            29:     def change_OSAS_add_Metadata(self,linklabel,description,RESPONSE=None):
        !            30:         """Change Metadata"""
        !            31:         self.RootFolderName=RootFolderName
        !            32:         if RESPONSE is not None:
        !            33:             RESPONSE.redirect('manage_main')
        !            34: 
        !            35:     security.declarePublic('index_html')
        !            36:     def index_html(self):
        !            37:         """stantard aufruf"""
        !            38:         return OSAS_add.add(self,no_upload=0)
        !            39: 
        !            40: 
        !            41:     security.declarePublic('add2')
        !            42:     def add2(self):
        !            43:         """ anlegen naechster schritt"""
        !            44:         return OSAS_add.add2(self)
        !            45: 
        !            46:     def add3(self):
        !            47:         """Foldername"""
        !            48:         return OSAS_add.add3(self)
        !            49: 
        !            50:     def add6(self):
        !            51:         """write new index.meta file"""
        !            52:         return OSAS_add.add6(self)
        !            53:     
        !            54: def manage_AddOSAS_add_MetadataForm(self):
        !            55:     """interface for adding the OSAS_add_Metadata"""
        !            56:     pt=PageTemplateFile('products/OSA_system/AddOSAS_metadata.zpt').__of__(self)
        !            57:     return pt()
        !            58: 
        !            59: def manage_AddOSAS_add_Metadata(self,id,linklabel,description,RESPONSE=None):
        !            60:     """add the OSAS_root"""
        !            61:     newObj=OSAS_add_Metadata(id,linklabel,description)
        !            62:     self.Destination()._setObject(id,newObj)
        !            63:     if RESPONSE is not None:
        !            64:         RESPONSE.redirect('manage_main')
        !            65: 
        !            66:             
        !            67: InitializeClass(OSAS_add_Metadata)
        !            68: 

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