File:  [Repository] / OSAS / OSA_system / OSAS_addfiles.py
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Sun Oct 5 18:15:06 2003 UTC (20 years, 8 months ago) by dwinter
Branches: MAIN
CVS tags: HEAD
presentation and combine image text added

    1: # Methoden und Classen zum Hinzufuegen von Dokumenten
    2: 
    3: import OSAS_add
    4: from OFS.Folder import Folder
    5: from AccessControl import ClassSecurityInfo
    6: from Globals import InitializeClass
    7: from Products.PageTemplates.PageTemplateFile import PageTemplateFile
    8: from Products.PageTemplates.PageTemplate import PageTemplate
    9: 
   10: class OSAS_add_Document(Folder):
   11:     """Hinzufuegen eines Dokumentes zum Storage"""
   12:     security=ClassSecurityInfo()
   13: 
   14:     def __init__(self,id):
   15:         """initialize a new instance"""
   16:         self.id = id
   17:         
   18:         
   19:     meta_type='OSAS_add_Document'    
   20:     manage_options = Folder.manage_options+(
   21:             {'label':'Main Config','action':'add_Document_config'},
   22:             )
   23:         
   24:      
   25:         
   26:     security.declarePublic('add_Document_config')
   27:     def add_Document_config(self):
   28:         """Main configuration"""
   29:         pt=PageTemplateFile('products/OSA_system/ChangeOSAS_addDocument.zpt').__of__(self)
   30:         return pt()
   31:     
   32:     security.declarePublic('change_OSAS_add_Document')
   33:     def change_OSAS_add_Document(self,RESPONSE=None):
   34:         """Change"""
   35: #        self.RootFolderName=RootFolderName
   36:         if RESPONSE is not None:
   37:             RESPONSE.redirect('manage_main')
   38: 
   39:     security.declarePublic('index_html')
   40:     def index_html(self):
   41:         """stantard aufruf"""
   42:         return OSAS_add.add(self,no_upload=1)
   43: 
   44: 
   45:     security.declarePublic('add2')
   46:     def add2(self):
   47:         """ anlegen naechster schritt"""
   48:         return OSAS_add.add2(self)
   49: 
   50:     def add3(self):
   51:         """Foldername"""
   52:         return OSAS_add.add3(self)
   53: 
   54:     def add4(self):
   55:         """Applet"""
   56:         return OSAS_add.add4(self)
   57: 
   58:     def add5(self):
   59:         """Foldername"""
   60:         return OSAS_add.add5(self)
   61: 
   62:     def add6(self):
   63:         """write new index.meta file"""
   64:         return OSAS_add.add6(self)
   65: 
   66: 
   67:     def addImages(self,path):
   68:         """Hinzufügen eines neuen Imagesfolders"""
   69:         return OSAS_add.addImages(self,path)
   70: 
   71:     def addImages2(self):
   72:         """Upload des neuen Imagefolders"""
   73:         return OSAS_add.addImages2(self)
   74: 
   75:     
   76: def manage_AddOSAS_add_DocumentForm(self):
   77:     """interface for adding the OSAS_add_Metadata"""
   78:     pt=PageTemplateFile('products/OSA_system/AddOSAS_document.zpt').__of__(self)
   79:     return pt()
   80: 
   81: def manage_AddOSAS_add_Document(self,id,RESPONSE=None):
   82:     """add the OSAS_root"""
   83:     newObj=OSAS_add_Document(id)
   84:     self.Destination()._setObject(id,newObj)
   85:     if RESPONSE is not None:
   86:         RESPONSE.redirect('manage_main')
   87: 
   88:             
   89: InitializeClass(OSAS_add_Document)
   90: 
   91: 
   92: class OSAS_add_Text(Folder):
   93:     """Hinzufuegen eines Text-Dokumentes zum Storage"""
   94:     security=ClassSecurityInfo()
   95: 
   96:     def __init__(self,id):
   97:         """initialize a new instance"""
   98:         self.id = id
   99:         
  100:         
  101:     meta_type='OSAS_add_Text'    
  102:     manage_options = Folder.manage_options+(
  103:             {'label':'Main Config','action':'add_Text_config'},
  104:             )
  105:         
  106:      
  107:         
  108:     security.declarePublic('add_Text_config')
  109:     def add_Text_config(self):
  110:         """Main configuration"""
  111:         pt=PageTemplateFile('products/OSA_system/ChangeOSAS_addText.zpt').__of__(self)
  112:         return pt()
  113:     
  114:     security.declarePublic('change_OSAS_add_Text')
  115:     def change_OSAS_add_Text(self,RESPONSE=None):
  116:         """Change"""
  117: #        self.RootFolderName=RootFolderName
  118:         if RESPONSE is not None:
  119:             RESPONSE.redirect('manage_main')
  120: 
  121:     def addText(self,path):
  122:         """Add a fulltext"""
  123:         return OSAS_add.addText(self,path)
  124: 
  125:     def addText2(self):
  126:         """Read the file and store it"""
  127:         return OSAS_add.addText2(self)
  128: def manage_AddOSAS_add_TextForm(self):
  129:     """interface for adding the OSAS_add_Metadata"""
  130:     pt=PageTemplateFile('products/OSA_system/AddOSAS_text.zpt').__of__(self)
  131:     return pt()
  132: 
  133: def manage_AddOSAS_add_Text(self,id,RESPONSE=None):
  134:     """add the OSAS_root"""
  135:     newObj=OSAS_add_Text(id)
  136:     self.Destination()._setObject(id,newObj)
  137:     if RESPONSE is not None:
  138:         RESPONSE.redirect('manage_main')
  139: 
  140:             
  141: InitializeClass(OSAS_add_Text)
  142: 
  143: class OSAS_add_Presentation(Folder):
  144:     """Hinzufügen der Presentationsinformationen"""
  145:     security=ClassSecurityInfo()
  146: 
  147:     def __init__(self,id):
  148:         """initialize a new instance"""
  149:         self.id = id
  150:         
  151:         
  152:     meta_type='OSAS_add_Presentation'    
  153:     manage_options = Folder.manage_options+(
  154:             {'label':'Main Config','action':'add_Presentation_config'},
  155:             )
  156:         
  157:      
  158:         
  159:     security.declarePublic('add_Presentation_config')
  160:     def add_Presentation_config(self):
  161:         """Main configuration"""
  162:         pt=PageTemplateFile('products/OSA_system/ChangeOSAS_addPresentation.zpt').__of__(self)
  163:         return pt()
  164:     
  165:     security.declarePublic('change_OSAS_add_Presentation')
  166:     def change_OSAS_add_Presentation(self,RESPONSE=None):
  167:         """Change"""
  168: #        self.RootFolderName=RootFolderName
  169:         if RESPONSE is not None:
  170:             RESPONSE.redirect('manage_main')
  171: 
  172:     def addPresentation(self,path):
  173:         """Hinzufügen der Presenationsinformation"""
  174:         return OSAS_add.addPresentation(self,path)
  175: 
  176:     def addPresentation2(self):
  177:         """Eingabe von Metadateninformationen"""
  178:         return OSAS_add.addPresentation2(self)
  179:     
  180: def manage_AddOSAS_add_PresentationForm(self):
  181:     """interface for adding the OSAS_add_Metadata"""
  182:     pt=PageTemplateFile('products/OSA_system/AddOSAS_presentation.zpt').__of__(self)
  183:     return pt()
  184: 
  185: def manage_AddOSAS_add_Presentation(self,id,RESPONSE=None):
  186:     """add the OSAS_root"""
  187:     newObj=OSAS_add_Presentation(id)
  188:     self.Destination()._setObject(id,newObj)
  189:     if RESPONSE is not None:
  190:         RESPONSE.redirect('manage_main')
  191: 
  192:             
  193: InitializeClass(OSAS_add_Presentation)
  194: 
  195: class OSAS_combineTextImage(Folder):
  196:     """Hinzufügen der Combine Text und Image"""
  197:     security=ClassSecurityInfo()
  198: 
  199:     def __init__(self,id):
  200:         """initialize a new instance"""
  201:         self.id = id
  202:         
  203:         
  204:     meta_type='OSAS_combineTextImage'    
  205:     manage_options = Folder.manage_options+(
  206:             {'label':'Main Config','action':'combineTextImage_config'},
  207:             )
  208:         
  209:      
  210:         
  211:     security.declarePublic('combineTextImage_config')
  212:     def combineTextImage_config(self):
  213:         """Main configuration"""
  214:         pt=PageTemplateFile('products/OSA_system/ChangeOSAS_combineTextImage.zpt').__of__(self)
  215:         return pt()
  216:     
  217:     security.declarePublic('change_OSAS_combineTextImage')
  218:     def change_OSAS_combineTextImage(self,RESPONSE=None):
  219:         """Change"""
  220: #        self.RootFolderName=RootFolderName
  221:         if RESPONSE is not None:
  222:             RESPONSE.redirect('manage_main')
  223:             
  224:     security.declarePublic('combineTextImage')
  225:     def combineTextImage(self,path):
  226:         """Hinzufügen der Presenationsinformation"""
  227:         return OSAS_add.combineTextImage(self,path)
  228: 
  229:     def combineTextImage2(self,path):
  230:         """Eingabe von Metadateninformationen"""
  231:         return OSAS_add.combineTextImage2(self,path)
  232: 
  233:     
  234: def manage_AddOSAS_combineTextImageForm(self):
  235:     """interface for adding the OSAS_add_Metadata"""
  236:     pt=PageTemplateFile('products/OSA_system/AddOSAS_combineTextImage.zpt').__of__(self)
  237:     return pt()
  238: 
  239: def manage_AddOSAS_combineTextImage(self,id,RESPONSE=None):
  240:     """add the OSAS_root"""
  241:     newObj=OSAS_combineTextImage(id)
  242:     self.Destination()._setObject(id,newObj)
  243:     if RESPONSE is not None:
  244:         RESPONSE.redirect('manage_main')
  245: 
  246:             
  247: InitializeClass(OSAS_combineTextImage)

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