本文整理汇总了Python中EDConfiguration.EDConfiguration.setXSConfigurationItem方法的典型用法代码示例。如果您正苦于以下问题:Python EDConfiguration.setXSConfigurationItem方法的具体用法?Python EDConfiguration.setXSConfigurationItem怎么用?Python EDConfiguration.setXSConfigurationItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EDConfiguration.EDConfiguration
的用法示例。
在下文中一共展示了EDConfiguration.setXSConfigurationItem方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testSetXSConfigurationItem
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import setXSConfigurationItem [as 别名]
def testSetXSConfigurationItem(self):
xsPluginItem = XSPluginItem()
xsPluginItem.name = "EDPluginTestSetConfig"
edConfiguration = EDConfiguration()
edConfiguration.setXSConfigurationItem(xsPluginItem)
xsDataPluginItem = edConfiguration.getXSConfigurationItem("EDPluginTestSetConfig")
EDAssert.equal(True, xsDataPluginItem is not None, "Obtanied set configuration")
示例2: EDPlugin
# 需要导入模块: from EDConfiguration import EDConfiguration [as 别名]
# 或者: from EDConfiguration.EDConfiguration import setXSConfigurationItem [as 别名]
#.........这里部分代码省略.........
Writes xml data output in the working dir (if required)
"""
EDAction.finallyProcess(self, _edObject)
if self.__dictXSDataOutput == {}:
strWarningMessage = "Output data for plugin %s not set, using XSDataResult as output" % self.getPluginName()
self.WARNING(strWarningMessage)
self.addWarningMessage(strWarningMessage)
self.setDataOutput(XSDataResult())
if self.__bWriteDataXMLInputOutput:
if self.__bWriteDataXMLOutput:
self.writeDataOutput()
def synchronize(self):
"""
This method calls EDAction.synchronize and if a time-out occurs an error message
is added to the list of error messages.
"""
EDAction.synchronize(self)
if self.isTimeOut():
strErrorMessage = "Timeout when waiting for %s to terminate." % self.getClassName()
self.addErrorMessage(strErrorMessage)
@deprecated
def setConfiguration(self, _xsPluginItem):
"""
Receives a Plugin Configuration as XSPluginItem or python dict from the application.
"""
self.DEBUG("EDPlugin.setConfiguration")
self.__edConfiguration = EDConfiguration()
if isinstance(_xsPluginItem, dict):
self.__edConfiguration[self.getPluginName()] = _xsPluginItem
else:
self.__edConfiguration.setXSConfigurationItem(_xsPluginItem)
@deprecated
def getConfiguration(self):
"""
Gets the Plugin Configuration as an XSPluginItem
"""
self.DEBUG("EDPlugin.getConfiguration")
return self.__edConfiguration.getXSConfigurationItem(self.getPluginName())
configuration = property(getConfiguration, setConfiguration)
def getConfig(self):
"""
Gets the Plugin Configuration as a dictionary
"""
self.DEBUG("EDPlugin.getConfig")
return self.__edConfiguration.get(self.getPluginName(), {})
def setConfig(self, _dict, _bLocal = False):
"""
Receives a dictionary (Plugin Configuration) from the application.
"""
self.DEBUG("EDPlugin.setConfiguration")
if _bLocal:
self.__edConfiguration = EDConfiguration()
if _dict is not None:
self.__edConfiguration[self.getPluginName()] = _dict
else:
self.__edConfiguration[self.getPluginName()] = {}
config = property(getConfig, setConfig)