Esempio n. 1
0
    def update_data_association(self, event, vc_room, event_vc_room, data):
        contribution_id = data.pop('contribution')
        block_id = data.pop('block')
        link_type = VCRoomLinkType[data.pop('linking')]

        if link_type == VCRoomLinkType.event:
            event_vc_room.link_object = event
        elif link_type == VCRoomLinkType.contribution:
            event_vc_room.link_object = Contribution.get_one(contribution_id)
        elif link_type == VCRoomLinkType.block:
            event_vc_room.link_object = SessionBlock.get_one(block_id)
        event_vc_room.vc_room = vc_room
        event_vc_room.show = data.pop('show')
        if event_vc_room.data is None:
            event_vc_room.data = {}
Esempio n. 2
0
    def update_data_association(self, event, vc_room, event_vc_room, data):
        contribution_id = data.pop('contribution')
        block_id = data.pop('block')
        link_type = VCRoomLinkType[data.pop('linking')]

        if link_type == VCRoomLinkType.event:
            event_vc_room.link_object = event
        elif link_type == VCRoomLinkType.contribution:
            event_vc_room.link_object = Contribution.get_one(contribution_id)
        elif link_type == VCRoomLinkType.block:
            event_vc_room.link_object = SessionBlock.get_one(block_id)
        event_vc_room.vc_room = vc_room
        event_vc_room.show = data.pop('show')
        if event_vc_room.data is None:
            event_vc_room.data = {}
Esempio n. 3
0
    def _checkParams(self):
        try:
            self._target = self._conf = ConferenceHolder().getById(self._params["conference"]);
        except:
            try:
                self._target = self._conf = ConferenceHolder().getById(self._params["confId"]);
            except:
                raise ServiceError("ERR-E4", "Invalid conference id.")

        if self._conf == None:
            raise Exception("Conference id not specified.")

        contrib_id = int(self._params.get('contribId', self._params.get('contribution')))
        self._target = self._contribution = self.contrib = Contribution.get_one(contrib_id)

        # create a parameter manager that checks the consistency of passed parameters
        self._pm = ParameterManager(self._params)
        self._current = self._params.get("current", None)
Esempio n. 4
0
    def _checkParams(self):
        try:
            self._target = self._conf = ConferenceHolder().getById(self._params["conference"]);
        except:
            try:
                self._target = self._conf = ConferenceHolder().getById(self._params["confId"]);
            except:
                raise ServiceError("ERR-E4", "Invalid conference id.")

        if self._conf == None:
            raise Exception("Conference id not specified.")

        contrib_id = int(self._params.get('contribId', self._params.get('contribution')))
        self._target = self._contribution = self.contrib = Contribution.get_one(contrib_id)

        # create a parameter manager that checks the consistency of passed parameters
        self._pm = ParameterManager(self._params)
        self._current = self._params.get("current", None)