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


Java WebRuleUtils.translateFieldValuesForSave方法代码示例

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


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

示例1: saveBusinessObject

import org.kuali.rice.kew.rule.web.WebRuleUtils; //导入方法依赖的package包/类
/**
 * A complete override of the implementation for saving a Rule
 */
@Override
public void saveBusinessObject() {
	WebRuleUtils.clearKeysForSave(getThisRule());
	WebRuleUtils.translateResponsibilitiesForSave(getThisRule());
	WebRuleUtils.translateFieldValuesForSave(getThisRule());
	KEWServiceLocator.getRuleService().makeCurrent(getThisRule(), true);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:11,代码来源:RoutingRuleMaintainable.java

示例2: saveBusinessObject

import org.kuali.rice.kew.rule.web.WebRuleUtils; //导入方法依赖的package包/类
/**
 * A complete override of the implementation for saving a Rule
 */
@Override
public void saveBusinessObject() {
	WebRuleUtils.clearKeysForSave(getThisRuleDelegation());
	WebRuleUtils.translateResponsibilitiesForSave(getThisRule());
	WebRuleUtils.translateFieldValuesForSave(getThisRule());
	WebRuleUtils.processRuleForDelegationSave(getThisRuleDelegation());
	KEWServiceLocator.getRuleService().makeCurrent(getThisRuleDelegation(), true);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:12,代码来源:RoutingRuleDelegationMaintainable.java

示例3: exportRule

import org.kuali.rice.kew.rule.web.WebRuleUtils; //导入方法依赖的package包/类
public void exportRule(Element parent, RuleBaseValues rule) {
	Element ruleElement = renderer.renderElement(parent, RULE);
    if (rule.getName() != null) {
        renderer.renderTextElement(ruleElement, NAME, rule.getName());
    }
    renderer.renderTextElement(ruleElement, DOCUMENT_TYPE, rule.getDocTypeName());
    if (rule.getRuleTemplateName() != null) {
        renderer.renderTextElement(ruleElement, RULE_TEMPLATE, rule.getRuleTemplateName());
    }
    renderer.renderTextElement(ruleElement, DESCRIPTION, rule.getDescription());
    if(rule.getFromDateString() != null){
        renderer.renderTextElement(ruleElement, FROM_DATE, rule.getFromDateString());
    }
    if(rule.getToDateString() != null){
        renderer.renderTextElement(ruleElement, TO_DATE, rule.getToDateString());
    }
    if (rule.getRuleExpressionDef() != null) {
        Element expressionElement = renderer.renderTextElement(ruleElement, EXPRESSION, rule.getRuleExpressionDef().getExpression());
        if (rule.getRuleExpressionDef().getType() != null) {
            expressionElement.setAttribute("type", rule.getRuleExpressionDef().getType());
        }
    }
    renderer.renderBooleanElement(ruleElement, FORCE_ACTION, rule.isForceAction(), false);
    
    if (CollectionUtils.isEmpty(rule.getRuleExtensions()) &&
    		/* field values is not empty */
    		!(rule.getFieldValues() == null || rule.getFieldValues().size() == 0)) {
    	// the rule is in the wrong state (as far as we are concerned).
    	// translate it
    	WebRuleUtils.translateResponsibilitiesForSave(rule);
    	WebRuleUtils.translateFieldValuesForSave(rule);
    	
    	// do our exports
		exportRuleExtensions(ruleElement, rule.getRuleExtensions());
    	
    	// translate it back
    	WebRuleUtils.populateRuleMaintenanceFields(rule);
    } else { 
    	exportRuleExtensions(ruleElement, rule.getRuleExtensions());
    }
    
    // put responsibilities in a single collection 
    Set<RuleResponsibilityBo> responsibilities = new HashSet<RuleResponsibilityBo>();
    responsibilities.addAll(rule.getRuleResponsibilities());
    responsibilities.addAll(rule.getPersonResponsibilities());
    responsibilities.addAll(rule.getGroupResponsibilities());
    responsibilities.addAll(rule.getRoleResponsibilities());
    
    exportResponsibilities(ruleElement, responsibilities);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:51,代码来源:RuleXmlExporter.java


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