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


Java RuleAttribute.setApplicationId方法代码示例

本文整理汇总了Java中org.kuali.rice.kew.rule.bo.RuleAttribute.setApplicationId方法的典型用法代码示例。如果您正苦于以下问题:Java RuleAttribute.setApplicationId方法的具体用法?Java RuleAttribute.setApplicationId怎么用?Java RuleAttribute.setApplicationId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.kew.rule.bo.RuleAttribute的用法示例。


在下文中一共展示了RuleAttribute.setApplicationId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupRuleAttribute

import org.kuali.rice.kew.rule.bo.RuleAttribute; //导入方法依赖的package包/类
private RuleAttribute setupRuleAttribute() {
    RuleAttribute ruleAttribute = new RuleAttribute();
    ruleAttribute.setApplicationId("TST");
    ruleAttribute.setDescription("Testing");
    ruleAttribute.setLabel("New Label");
    ruleAttribute.setResourceDescriptor("ResourceDescriptor");
    ruleAttribute.setType("newType");
    ruleAttribute.setName("Attr");

    return getDataObjectService().save(ruleAttribute, PersistenceOption.FLUSH);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:12,代码来源:KewDocumentTypeBaseTest.java

示例2: setupRuleAttribute

import org.kuali.rice.kew.rule.bo.RuleAttribute; //导入方法依赖的package包/类
private RuleAttribute setupRuleAttribute(){
    RuleAttribute ruleAttribute = new RuleAttribute();
    ruleAttribute.setApplicationId("TST");
    ruleAttribute.setDescription("Testing");
    ruleAttribute.setLabel("New Label");
    ruleAttribute.setResourceDescriptor("ResourceDescriptor");
    ruleAttribute.setType("newType");
    ruleAttribute.setName("Attr");

    return KRADServiceLocator.getDataObjectService().save(ruleAttribute, PersistenceOption.FLUSH);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:12,代码来源:KewRuleDataJpaTest.java

示例3: setupRuleAttributeSimilar

import org.kuali.rice.kew.rule.bo.RuleAttribute; //导入方法依赖的package包/类
private RuleAttribute setupRuleAttributeSimilar(){
    RuleAttribute ruleAttribute = new RuleAttribute();
    ruleAttribute.setApplicationId("TST2");
    ruleAttribute.setDescription("Testingfdsa");
    ruleAttribute.setLabel("New Labefdsal");
    ruleAttribute.setResourceDescriptor("ResourceDescriptor");
    ruleAttribute.setType("newType");
    ruleAttribute.setName("Attr2");

    return KRADServiceLocator.getDataObjectService().save(ruleAttribute, PersistenceOption.FLUSH);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:12,代码来源:KewRuleDataJpaTest.java

示例4: parseRuleAttribute

import org.kuali.rice.kew.rule.bo.RuleAttribute; //导入方法依赖的package包/类
private RuleAttribute parseRuleAttribute(Node ruleAttributeNode) throws XmlException {
		String name = "";
		String className = "";
		String label = "";
		String description = "";
		String type = "";
		String applicationId = null;
		Node xmlConfig = null;
		for (int i = 0; i < ruleAttributeNode.getChildNodes().getLength(); i++) {
			Node childNode = ruleAttributeNode.getChildNodes().item(i);
			if(NAME.equals(childNode.getNodeName())){
				name = childNode.getFirstChild().getNodeValue();
			} else if(CLASS_NAME.equals(childNode.getNodeName())){
				className = childNode.getFirstChild().getNodeValue();
			} else if(LABEL.equals(childNode.getNodeName())){
				label = childNode.getFirstChild().getNodeValue();
			} else if(DESCRIPTION.equals(childNode.getNodeName())){
				description = childNode.getFirstChild().getNodeValue();
			} else if(TYPE.equals(childNode.getNodeName())){
				type = childNode.getFirstChild().getNodeValue();
			} else if(XmlConstants.ROUTING_CONFIG.equals(childNode.getNodeName()) || XmlConstants.SEARCHING_CONFIG.equals(childNode.getNodeName()) || 
					XmlConstants.SEARCH_RESULT_CONFIG.equals(childNode.getNodeName()) || XmlConstants.RESOLVER_CONFIG.equals(childNode.getNodeName()) ||
					CONFIG.equals(childNode.getNodeName())){
				xmlConfig = childNode;
			} else if (XmlConstants.SERVICE_NAMESPACE.equals(childNode.getNodeName())) {
				applicationId = childNode.getFirstChild().getNodeValue();
				LOG.warn(XmlConstants.SERVICE_NAMESPACE + " element was set on rule attribute type XML but is deprecated and will be removed in a future version, please use " + APPLICATION_ID + " instead.");
			} else if (XmlConstants.APPLICATION_ID.equals(childNode.getNodeName())) {
				applicationId = childNode.getFirstChild().getNodeValue();
			}
		}
		if (org.apache.commons.lang.StringUtils.isEmpty(name)) {
			throw new XmlException("RuleAttribute must have a name");
		}
		if (org.apache.commons.lang.StringUtils.isEmpty(className)) {
			throw new XmlException("RuleAttribute must have a className");
		}
		if (org.apache.commons.lang.StringUtils.isEmpty(label)) {
			LOG.warn("Label empty defaulting to name");
			label = name;
		}
		if (org.apache.commons.lang.StringUtils.isEmpty(type)) {
			LOG.debug("No type specified, default to " + KewApiConstants.RULE_ATTRIBUTE_TYPE);
			type = KewApiConstants.RULE_ATTRIBUTE_TYPE;
			//throw new XmlException("RuleAttribute must have an attribute type");
		}
        type = type.trim();
        validateRuleAttributeType(type);

		RuleAttribute ruleAttribute = new RuleAttribute();
		ruleAttribute.setName(name.trim());
		ruleAttribute.setResourceDescriptor(className.trim());
		ruleAttribute.setType(type.trim());
		ruleAttribute.setLabel(label.trim());
//		 default description to label
        if (StringUtils.isEmpty(description)) {
            description = label;
        }
		ruleAttribute.setDescription(description.trim());
		if (applicationId != null)
		{
			applicationId = applicationId.trim();
		}
		ruleAttribute.setApplicationId(applicationId);
		
		if(xmlConfig != null){
		    ruleAttribute.setXmlConfigData(XmlJotter.jotNode(xmlConfig));
		} else {
			if(KewApiConstants.RULE_XML_ATTRIBUTE_TYPE.equals(type)){
				throw new XmlException("A routing config must be present to be of type: "+type);
			} else if(KewApiConstants.SEARCHABLE_XML_ATTRIBUTE_TYPE.equals(type)){
				throw new XmlException("A searching config must be present to be of type: "+type);
			}
		}
		return ruleAttribute;
	}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:77,代码来源:RuleAttributeXmlParser.java


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