当前位置: 首页>>代码示例>>Python>>正文


Python EDConfiguration.setXSConfigurationItem方法代码示例

本文整理汇总了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")
开发者ID:antolinos,项目名称:edna,代码行数:9,代码来源:EDTestCaseEDConfiguration.py

示例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)
开发者ID:edna-site,项目名称:edna,代码行数:69,代码来源:EDPlugin.py


注:本文中的EDConfiguration.EDConfiguration.setXSConfigurationItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。