當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。