Changeset 605179 in indico
- Timestamp:
- 02/24/11 13:54:32 (2 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
- Children:
- 4ff1b2
- Parents:
- 3632eb
- git-author:
- Adrian Moennich <jerome.ernst.monnich@…> (02/04/11 12:09:02)
- git-committer:
- Jose Benito <jose.benito.gonzalez@…> (02/24/11 13:54:32)
- Location:
- indico/MaKaC
- Files:
-
- 2 edited
-
plugins/base.py (modified) (6 diffs)
-
services/implementation/plugins.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/plugins/base.py
r8f1ea9 r605179 168 168 return {"description": description, 169 169 "type": optionType, 170 "subType": attributes.get("subType", None), 170 171 "defaultValue": attributes.get("defaultValue", None), 171 172 "editable": attributes.get("editable", True), … … 239 240 self.__options[name] = PluginOption(name, attributes["description"], attributes["type"], 240 241 attributes["defaultValue"], attributes["editable"], attributes["visible"], 241 attributes["mustReload"], True, order )242 attributes["mustReload"], True, order, attributes["subType"]) 242 243 self._notifyModification() 243 244 … … 252 253 option.setDescription(attributes["description"]) 253 254 option.setType(attributes["type"]) 255 option.setSubType(attributes["subType"]) 254 256 option.setEditable(attributes["editable"]) 255 257 option.setVisible(attributes["visible"]) … … 697 699 } 698 700 699 def __init__(self, name, description, valueType, value=None, editable=True, visible=True, mustReload=False, present=True, order=0 ):701 def __init__(self, name, description, valueType, value=None, editable=True, visible=True, mustReload=False, present=True, order=0, subType=None): 700 702 self.__name = name 701 703 self.__description = description 702 704 self.__type = valueType 705 self.__subType = subType 703 706 self.__present = present 704 707 self.__editable = editable … … 721 724 return self.__type 722 725 726 def getSubType(self): 727 return self.__subType 728 723 729 def getValue(self): 724 730 return self.__value … … 760 766 def setType(self, valueType): 761 767 self.__type = valueType 768 769 def setSubType(self, subType): 770 self.__subType = subType 762 771 763 772 def setValue(self, value): -
indico/MaKaC/services/implementation/plugins.py
r107f4e r605179 25 25 26 26 class PluginOptionsBase (AdminService): 27 27 28 28 def _checkParams(self): 29 29 optionName = self._params.get('optionName', None) … … 49 49 raise ServiceError('ERR-PLUG1', 'optionName argument does not have the proper pluginType.plugin.option format') 50 50 else: 51 raise ServiceError('ERR-PLUG0', 'optionName argument not present') 52 51 raise ServiceError('ERR-PLUG0', 'optionName argument not present') 52 53 53 54 54 class PluginOptionsAddUsers ( PluginOptionsBase, UserListModificationBase): 55 55 56 56 def _checkParams(self): 57 57 PluginOptionsBase._checkParams(self) 58 58 UserListModificationBase._checkParams(self) 59 59 60 60 def _getAnswer(self): 61 61 if self._targetOption.getType() == 'users' or self._targetOption.getType() == 'usersGroups': … … 68 68 else: 69 69 raise ServiceError('ERR-PLUG2', "option %s.%s.%s is not of type 'users'" % (self._pluginType, self._plugin, self._targetOption)) 70 70 71 71 return True 72 72 … … 76 76 PluginOptionsBase._checkParams(self) 77 77 UserModificationBase._checkParams(self) 78 78 79 79 def _getAnswer(self): 80 80 if self._targetOption.getType() == 'users' or self._targetOption.getType() == 'usersGroups': … … 83 83 else: 84 84 raise ServiceError('ERR-PLUG2', "option %s.%s.%s is not of type 'users'" % (self._pluginType, self._plugin, self._targetOption)) 85 85 86 86 return True 87 87 88 88 class PluginOptionsAddRooms ( PluginOptionsBase ): 89 89 90 90 def _checkParams(self): 91 91 PluginOptionsBase._checkParams(self) 92 92 93 93 def _getAnswer(self): 94 94 if self._targetOption.getType() == 'rooms': … … 100 100 else: 101 101 raise ServiceError('ERR-PLUG2', "option %s.%s.%s is not of type 'rooms'" % (self._pluginType, self._plugin, self._targetOption)) 102 102 103 103 return True 104 104 … … 107 107 def _checkParams(self): 108 108 PluginOptionsBase._checkParams(self) 109 109 110 110 def _getAnswer(self): 111 111 if self._targetOption.getType() == 'rooms':
Note: See TracChangeset
for help on using the changeset viewer.
