def setRoom(self, params): if not params.has_key('roomID'): raise errors.MaKaCError(_("roomID not set")) if not params.has_key('roomLocation'): raise errors.MaKaCError(_("roomLocation not set")) self.__roomID = int(params['roomID']) self.__location = params['roomLocation']
def setMenuLink(self, params, mustExist=1): self.setConference(params) if not ("linkId" in params.keys()) or params["linkId"].strip == "": if mustExist: raise errors.MaKaCError(_("link id not set")) else: self.__menuLinkId = params["linkId"]
def setContribType(self, params): self.setConference(params) if not ("contribTypeId" in params.keys()) or params["contribTypeId"].strip == "": raise errors.MaKaCError(_("contribType id not set")) else: self.__contribTypeId = params["contribTypeId"]
def setNotificationTemplate( self, params, mustExist=1 ): self.setConference(params) if not ("notifTplId" in params.keys()) or params["notifTplId"].strip == "": if mustExist: raise errors.MaKaCError( _("notificationTemplate id not set")) else: self.__notifTplId = params["notifTplId"]
def setRegistrant(self, params, mustExist=1): self.setConference(params) if not ("registrantId" in params.keys()) or \ params["registrantId"].strip()=="": if mustExist: raise errors.MaKaCError(_("registrant id not set")) else: self.__registrantId = params["registrantId"]
def setTrack(self, params, mustExist=1): self.setConference(params) if not ("trackId" in params.keys()) or \ params["trackId"].strip()=="": if mustExist: raise errors.MaKaCError(_("track id not set")) else: self.__trackId = params["trackId"]
def setAlarm(self, params, mustExist=1): self.setConference(params) #self.setConference( params ) if not ("alarmId" in params.keys()) or \ params["alarmId"].strip()=="": if mustExist: raise errors.MaKaCError(_("alarm id not set")) else: self.__alarmId = params["alarmId"]
def setConference( self, params ): if not ("confId" in params.keys()) and "confid" in params.keys(): params["confId"] = params["confid"] if not ("confId" in params.keys()) and "conference" in params.keys(): params["confId"] = params["conference"] if not ("confId" in params.keys()) or \ params["confId"] == None or \ params["confId"].strip()=="": raise errors.MaKaCError( _("conference id not set")) self.__confId = params["confId"]
def setReview(self, params, mustExist=1): self.setContribution(params, 0) if not ("reviewId" in params.keys()) or \ params["reviewId"].strip()=="": if mustExist: raise errors.MaKaCError(_("review id not set")) else: self.__reviewId = params["reviewId"]
def setResource(self, params, mustExist=1): if not ("resId" in params.keys()) and "resourceId" in params.keys(): params["resId"] = params["resourceId"] if not ("resId" in params.keys()) or params["resId"].strip() == "": self.setMaterial(params, mustExist) if mustExist: raise errors.MaKaCError(_("material id not set")) else: self.setMaterial(params, 1) self.__resId = params["resId"]
def setResource(self, params, mustExist=1): if "resId" not in params and "resourceId" in params: params["resId"] = params["resourceId"] if not params.get("resId", '').strip(): self.setMaterial(params, mustExist) if mustExist: raise errors.MaKaCError(_("material id not set")) else: self.setMaterial(params, 1) self.__resId = params["resId"]
def setSubContribution(self, params, mustExist=1): self.setContribution(params, 0) #self.setConference( params ) if not ("subContId" in params.keys()) or \ params["subContId"] == None or \ params["subContId"].strip()=="": if mustExist: raise errors.MaKaCError(_("sub contribution id not set")) else: self.__subContribId = params["subContId"]
def __init__(self, params, mustExist=1): self._categList = [] categIds = params.get("categId", []) if categIds == [] or params["categId"] == "": if mustExist: raise errors.MaKaCError(_("category ids not set")) if isinstance(categIds, basestring): categIds = [categIds] ch = conference.CategoryManager() for id in categIds: try: self._categList.append(ch.getById(id)) except KeyError: continue
def setSession(self, params, mustExist=1): self.setConference(params) if not ("sessionId" in params.keys()) or \ params["sessionId"] == None or \ params["sessionId"].strip()=="": if not ("session" in params.keys()) or \ params["session"] == None or \ params["session"].strip()=="": if mustExist: raise errors.MaKaCError(_("session id not set")) else: self.__sessionId = params["session"] else: self.__sessionId = params["sessionId"]
def setMaterial( self, params, mustExist=1 ): if "confId" in params.keys() and params["confId"] != None: if "reviewId" in params.keys(): self.setReview(params, 0) else: self.setSubContribution( params, 0 ) else: self.setCategory( params ) if not ("materialId" in params.keys()) or \ params["materialId"].strip()=="": if mustExist: raise errors.MaKaCError( _("material id not set")) else: self.__materialId = params["materialId"]
def setSlot(self, params, mustExist=1): self.setSession(params, mustExist) if not ("slotId" in params.keys()) or \ params["slotId"].strip()=="": if not ("sessionSlotId" in params.keys()) or \ params["sessionSlotId"].strip()=="": if not ("slot" in params.keys()) or \ params["slot"].strip()=="": if mustExist: raise errors.MaKaCError(_("slot id not set")) else: self.__slotId = params["slot"] else: self.__slotId = params["sessionSlotId"] else: self.__slotId = params["slotId"]
def setCategory(self, params, mustExist=1): if not ("categId" in params.keys()) or params["categId"].strip() == "": if mustExist: raise errors.MaKaCError(_("category id not set")) self.__categId = params["categId"]
def __init__(self, params): rmId = params.get("roomMapperId", "") if rmId == "": raise errors.MaKaCError(_("room mapper id not set")) rmh = roomMapping.RoomMapperHolder() self._rm = rmh.getById(rmId)
def __init__(self, params): domId = params.get("domainId", "") if domId == "": raise errors.MaKaCError(_("domain id not set")) dh = domain.DomainHolder() self._dom = dh.getById(domId)