[45] | 1 | from Globals import InitializeClass |
---|
| 2 | from AccessControl import ClassSecurityInfo |
---|
| 3 | |
---|
| 4 | from Products.CMFCore.utils import getToolByName |
---|
| 5 | from Products.CMFCore.permissions import View |
---|
| 6 | from Products.CMFCore.permissions import ModifyPortalContent |
---|
| 7 | from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder |
---|
| 8 | from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument |
---|
| 9 | from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder |
---|
| 10 | |
---|
| 11 | # |
---|
| 12 | # The WAeUP BaseContainer |
---|
| 13 | # |
---|
| 14 | |
---|
| 15 | class University(BaseBTreeFolder): |
---|
| 16 | """ |
---|
| 17 | Container for the various WAeUP containers |
---|
| 18 | """ |
---|
| 19 | meta_type = 'University' |
---|
| 20 | portal_type = meta_type |
---|
| 21 | security = ClassSecurityInfo() |
---|
| 22 | |
---|
[46] | 23 | security.declarePublic('getStudentFolder') |
---|
| 24 | def getStudentsFolder(self): |
---|
| 25 | "return the studentsfolder" |
---|
| 26 | ## data = self._data |
---|
| 27 | ## print data.items() |
---|
| 28 | print self.contentItems() |
---|
| 29 | print self.contentValues() |
---|
| 30 | print self.contentIds() |
---|
| 31 | print self.listFolderContents() |
---|
| 32 | print self.getContent().objectItems() |
---|
| 33 | |
---|
[45] | 34 | InitializeClass(University) |
---|
| 35 | |
---|
[46] | 36 | |
---|
[45] | 37 | def addUniversity(container, id, REQUEST=None, **kw): |
---|
| 38 | """Add a WAeUP""" |
---|
| 39 | ob = University(id, **kw) |
---|
| 40 | return CPSBase_adder(container, ob, REQUEST=REQUEST) |
---|
| 41 | |
---|