from Globals import InitializeClass,HTMLFile
from AccessControl import ClassSecurityInfo
from Products.ZCatalog.ZCatalog import ZCatalog
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.permissions import View
from Products.CMFCore.permissions import ModifyPortalContent
from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder
from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument
from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder
from Products.CPSDocument.CPSDocument import CPSDocument
#
# The WAeUP BaseContainer
#
class University(CPSDocument):
"""
Container for the various WAeUP containers
"""
meta_type = 'University'
portal_type = meta_type
security = ClassSecurityInfo()
security.declarePublic('getHallTitle')
def getHallTitle(self,hall):
"""get the Hall Title"""
res = ZCatalog.searchResults(self.portal_catalog,portal_type="AccoHall",id=hall)
if res and len(res) == 1:
return res[0].Title
return hall
InitializeClass(University)
def addUniversity(container, id, REQUEST=None, **kw):
"""Add a University"""
ob = University(id, **kw)
return CPSBase_adder(container, ob, REQUEST=REQUEST)