本文整理汇总了Java中org.kuali.rice.kew.rule.bo.RuleTemplateAttributeBo.getRuleTemplateId方法的典型用法代码示例。如果您正苦于以下问题:Java RuleTemplateAttributeBo.getRuleTemplateId方法的具体用法?Java RuleTemplateAttributeBo.getRuleTemplateId怎么用?Java RuleTemplateAttributeBo.getRuleTemplateId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.rule.bo.RuleTemplateAttributeBo
的用法示例。
在下文中一共展示了RuleTemplateAttributeBo.getRuleTemplateId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fixAssociations
import org.kuali.rice.kew.rule.bo.RuleTemplateAttributeBo; //导入方法依赖的package包/类
/**
* Ensures that dependent objects have a reference to the specified rule template
* @param ruleTemplate the rule template whose associates to check
*/
private void fixAssociations(RuleTemplateBo ruleTemplate) {
// if it's a valid rule template instance
if (ruleTemplate != null && ruleTemplate.getId() != null) {
// for every rule template attribute
for (RuleTemplateAttributeBo ruleTemplateAttribute: ruleTemplate.getRuleTemplateAttributes()) {
// if the rule template is not set on the attribute, set it
if (ruleTemplateAttribute.getRuleTemplate() == null || ruleTemplateAttribute.getRuleTemplateId() == null) {
ruleTemplateAttribute.setRuleTemplate(ruleTemplate);
}
// if the rule attribute is set, load up the rule attribute and set the BO on the ruletemplateattribute association object
if (ruleTemplateAttribute.getRuleAttribute() == null) {
RuleAttributeService ruleAttributeService = (RuleAttributeService) KEWServiceLocator.getService(KEWServiceLocator.RULE_ATTRIBUTE_SERVICE);
ruleTemplateAttribute.setRuleAttribute(ruleAttributeService.findByRuleAttributeId(ruleTemplateAttribute.getRuleAttributeId()));
}
}
// for every rule template option
for (RuleTemplateOptionBo option: ruleTemplate.getRuleTemplateOptions()) {
// if the rule template is not set on the option, set it
if (option.getRuleTemplate() == null || option.getRuleTemplateId() == null) {
option.setRuleTemplate(ruleTemplate);
}
}
}
}