Beispiel #1
0
    def object(self):
        """Retrieves the linked object"""
        from MaKaC.webinterface.locators import WebLocator

        mapping = {
            'category': 'setCategory',
            'conference': 'setConference',
            'session': 'setSession',
            'contribution': 'setContribution',
            'track': 'setTrack',
            'material': 'setMaterial',
            'resource': 'setResource',
            'abstract': 'setAbstract',
            'registration': 'setRegistrant',
        }

        try:
            if self.type == 'evaluation':
                loc = WebLocator()
                loc.setConference(self.data['locator'])
                return loc.getObject().getEvaluation().getSubmissionById(
                    self.data['locator']['submission_id'])
            else:
                loc = WebLocator()
                getattr(loc, mapping[self.type])(self.data['locator'])
                return loc.getObject()
        except (IndicoError, MaKaCError):
            return None
Beispiel #2
0
    def object(self):
        """Retrieves the linked object"""
        from MaKaC.webinterface.locators import WebLocator

        mapping = {
            'category': 'setCategory',
            'conference': 'setConference',
            'track': 'setTrack',
            'resource': 'setResource',
            'abstract': 'setAbstract',
        }

        try:
            loc = WebLocator()
            getattr(loc, mapping[self.type])(self.data['locator'])
            return loc.getObject()
        except (IndicoError, MaKaCError):
            return None
Beispiel #3
0
    def object(self):
        """Retrieves the linked object"""
        from MaKaC.webinterface.locators import WebLocator

        mapping = {
            'category': 'setCategory',
            'conference': 'setConference',
            'track': 'setTrack',
            'resource': 'setResource',
            'abstract': 'setAbstract',
        }

        try:
            loc = WebLocator()
            getattr(loc, mapping[self.type])(self.data['locator'])
            return loc.getObject()
        except (IndicoError, MaKaCError):
            return None
Beispiel #4
0
 def _checkParams( self, params):
     RHConfModifCFABase._checkParams( self, params)
     l = WebLocator()
     l.setNotificationTemplate(params)
     self._notifTpl = self._target = l.getObject()
 def _checkParams(self, params):
     RHConfModifCFABase._checkParams(self, params)
     l = WebLocator()
     l.setNotificationTemplate(params)
     self._notifTpl = self._target = l.getObject()