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


Java RuleResponsibilityBo.isUsingPrincipal方法代码示例

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


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

示例1: exportParentResponsibility

import org.kuali.rice.kew.rule.RuleResponsibilityBo; //导入方法依赖的package包/类
private void exportParentResponsibility(Element parent, RuleDelegationBo delegation) {
    Element parentResponsibilityElement = renderer.renderElement(parent, PARENT_RESPONSIBILITY);
    RuleResponsibilityBo ruleResponsibility = KEWServiceLocator.getRuleService().findRuleResponsibility(delegation.getResponsibilityId());
    renderer.renderTextElement(parentResponsibilityElement, PARENT_RULE_NAME, ruleResponsibility.getRuleBaseValues().getName());
    if (ruleResponsibility.isUsingPrincipal()) {
    	Principal principal = ruleResponsibility.getPrincipal();
    	renderer.renderTextElement(parentResponsibilityElement, PRINCIPAL_NAME, principal.getPrincipalName());
    } else if (ruleResponsibility.isUsingGroup()) {
    	Group group = ruleResponsibility.getGroup();
    	Element groupElement = renderer.renderElement(parentResponsibilityElement, GROUP_NAME);
    	groupElement.setText(group.getName());
    	groupElement.setAttribute(NAMESPACE, group.getNamespaceCode());
    } else if (ruleResponsibility.isUsingRole()) {
    	renderer.renderTextElement(parentResponsibilityElement, ROLE, ruleResponsibility.getRuleResponsibilityName());
    } else {
    	throw new RiceRuntimeException("Encountered a rule responsibility when exporting with an invalid type of '" + ruleResponsibility.getRuleResponsibilityType());
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:RuleDelegationXmlExporter.java

示例2: exportResponsibilities

import org.kuali.rice.kew.rule.RuleResponsibilityBo; //导入方法依赖的package包/类
private void exportResponsibilities(Element parent, Collection<? extends RuleResponsibilityBo> responsibilities) {
    if (responsibilities != null && !responsibilities.isEmpty()) {
        Element responsibilitiesElement = renderer.renderElement(parent, RESPONSIBILITIES);
        for (RuleResponsibilityBo ruleResponsibility : responsibilities) {
            Element respElement = renderer.renderElement(responsibilitiesElement, RESPONSIBILITY);
          //KULRICE-12282: commenting out the responsibility Id from the exported xml.
           // renderer.renderTextElement(respElement, RESPONSIBILITY_ID, "" + ruleResponsibility.getResponsibilityId());
            if (ruleResponsibility.isUsingPrincipal()) {
    renderer.renderTextElement(respElement, PRINCIPAL_NAME, ruleResponsibility.getPrincipal().getPrincipalName());
} else if (ruleResponsibility.isUsingGroup()) {
	Group group = ruleResponsibility.getGroup();
    Element groupElement = renderer.renderTextElement(respElement, GROUP_NAME, group.getName());
    groupElement.setAttribute(NAMESPACE, group.getNamespaceCode());
} else if (ruleResponsibility.isUsingRole()) {
    renderer.renderTextElement(respElement, ROLE, ruleResponsibility.getRuleResponsibilityName());
    renderer.renderTextElement(respElement, APPROVE_POLICY, ruleResponsibility.getApprovePolicy());
}
            if (!StringUtils.isBlank(ruleResponsibility.getActionRequestedCd())) {
            	renderer.renderTextElement(respElement, ACTION_REQUESTED, ruleResponsibility.getActionRequestedCd());
            }
            if (ruleResponsibility.getPriority() != null) {
            	renderer.renderTextElement(respElement, PRIORITY, ruleResponsibility.getPriority().toString());
            }
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:27,代码来源:RuleXmlExporter.java

示例3: exportRuleDelegationParentResponsibility

import org.kuali.rice.kew.rule.RuleResponsibilityBo; //导入方法依赖的package包/类
private void exportRuleDelegationParentResponsibility(Element parent, RuleDelegationBo delegation) {
    Element parentResponsibilityElement = renderer.renderElement(parent, PARENT_RESPONSIBILITY);
    RuleResponsibilityBo ruleResponsibility = KEWServiceLocator.getRuleService().findRuleResponsibility(delegation.getResponsibilityId());
    renderer.renderTextElement(parentResponsibilityElement, PARENT_RULE_NAME, ruleResponsibility.getRuleBaseValues().getName());
    if (ruleResponsibility.isUsingPrincipal()) {
    	Principal principal = ruleResponsibility.getPrincipal();
    	renderer.renderTextElement(parentResponsibilityElement, PRINCIPAL_NAME, principal.getPrincipalName());
    } else if (ruleResponsibility.isUsingGroup()) {
    	Group group = ruleResponsibility.getGroup();
    	Element groupElement = renderer.renderElement(parentResponsibilityElement, GROUP_NAME);
    	groupElement.setText(group.getName());
    	groupElement.setAttribute(NAMESPACE, group.getNamespaceCode());
    } else if (ruleResponsibility.isUsingRole()) {
    	renderer.renderTextElement(parentResponsibilityElement, ROLE, ruleResponsibility.getRuleResponsibilityName());
    } else {
    	throw new RiceRuntimeException("Encountered a rule responsibility when exporting with an invalid type of '" + ruleResponsibility.getRuleResponsibilityType());
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:RuleXmlExporter.java

示例4: exportResponsibilities

import org.kuali.rice.kew.rule.RuleResponsibilityBo; //导入方法依赖的package包/类
private void exportResponsibilities(Element parent, Collection<? extends RuleResponsibilityBo> responsibilities) {
    if (responsibilities != null && !responsibilities.isEmpty()) {
        Element responsibilitiesElement = renderer.renderElement(parent, RESPONSIBILITIES);
        for (RuleResponsibilityBo ruleResponsibility : responsibilities) {
            Element respElement = renderer.renderElement(responsibilitiesElement, RESPONSIBILITY);
            renderer.renderTextElement(respElement, RESPONSIBILITY_ID, "" + ruleResponsibility.getResponsibilityId());
            if (ruleResponsibility.isUsingPrincipal()) {
    renderer.renderTextElement(respElement, PRINCIPAL_NAME, ruleResponsibility.getPrincipal().getPrincipalName());
} else if (ruleResponsibility.isUsingGroup()) {
	Group group = ruleResponsibility.getGroup();
    Element groupElement = renderer.renderTextElement(respElement, GROUP_NAME, group.getName());
    groupElement.setAttribute(NAMESPACE, group.getNamespaceCode());
} else if (ruleResponsibility.isUsingRole()) {
    renderer.renderTextElement(respElement, ROLE, ruleResponsibility.getRuleResponsibilityName());
    renderer.renderTextElement(respElement, APPROVE_POLICY, ruleResponsibility.getApprovePolicy());
}
            if (!StringUtils.isBlank(ruleResponsibility.getActionRequestedCd())) {
            	renderer.renderTextElement(respElement, ACTION_REQUESTED, ruleResponsibility.getActionRequestedCd());
            }
            if (ruleResponsibility.getPriority() != null) {
            	renderer.renderTextElement(respElement, PRIORITY, ruleResponsibility.getPriority().toString());
            }
        }
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:26,代码来源:RuleXmlExporter.java


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