source: WAeUP_SRP/trunk/University.py @ 17306

Last change on this file since 17306 was 3824, checked in by Henrik Bettermann, 16 years ago

implement configuration object (step 1)

Configuration file must be created with create_configuration_file.py

  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1from Globals import InitializeClass,HTMLFile
2from AccessControl import ClassSecurityInfo
3from Products.ZCatalog.ZCatalog import ZCatalog
4
5from Products.CMFCore.utils import getToolByName
6from Products.CMFCore.permissions import View
7from Products.CMFCore.permissions import ModifyPortalContent
8from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder
9from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument
10from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder
11from Products.CPSDocument.CPSDocument import CPSDocument
12
13#
14# The WAeUP BaseContainer
15#
16class University(CPSDocument):
17    """
18    Container for the various WAeUP containers
19    """
20    meta_type = 'University'
21    portal_type = meta_type
22    security = ClassSecurityInfo()
23       
24InitializeClass(University)
25
26def addUniversity(container, id, REQUEST=None, **kw):
27    """Add a University"""
28    ob = University(id, **kw)
29    return CPSBase_adder(container, ob, REQUEST=REQUEST)
30   
31       
32class WAeUPConfiguration(CPSDocument): ###(
33    """
34    WAeUP Configuration
35    """
36    meta_type = 'WAeUP Configuration'
37    portal_type = meta_type
38    security = ClassSecurityInfo()
39
40    def __init__(self, id, **kw):
41        CPSDocument.__init__(self, id, **kw)
42
43InitializeClass(WAeUPConfiguration)
44
45def addWAeUPConfiguration(container, id, REQUEST=None, **kw):
46    """Add a WAeUP Configuration."""
47    ob = WAeUPConfiguration(id, **kw)
48    return CPSBase_adder(container, ob, REQUEST=REQUEST)       
49
Note: See TracBrowser for help on using the repository browser.