本文整理汇总了Java中org.kuali.rice.kew.rule.web.WebRuleUtils.translateResponsibilitiesForSave方法的典型用法代码示例。如果您正苦于以下问题:Java WebRuleUtils.translateResponsibilitiesForSave方法的具体用法?Java WebRuleUtils.translateResponsibilitiesForSave怎么用?Java WebRuleUtils.translateResponsibilitiesForSave使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.rule.web.WebRuleUtils
的用法示例。
在下文中一共展示了WebRuleUtils.translateResponsibilitiesForSave方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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);
}
示例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);
}
示例4: prepareForSave
import org.kuali.rice.kew.rule.web.WebRuleUtils; //导入方法依赖的package包/类
/**
* This overridden method ...
*
* @see org.kuali.rice.krad.maintenance.KualiMaintainableImpl#prepareForSave()
*/
@Override
public void prepareForSave() {
super.prepareForSave();
WebRuleUtils.translateResponsibilitiesForSave(getThisRule());
}