请选择 进入手机版 | 继续访问电脑版
  • 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java RuleDelegation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.kuali.rice.kew.api.rule.RuleDelegation的典型用法代码示例。如果您正苦于以下问题:Java RuleDelegation类的具体用法?Java RuleDelegation怎么用?Java RuleDelegation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RuleDelegation类属于org.kuali.rice.kew.api.rule包,在下文中一共展示了RuleDelegation类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: buildDelegationGraph

import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
private void buildDelegationGraph(ActionRequestFactory arFactory, RouteContext context, 
		org.kuali.rice.kew.api.rule.Rule delegationRule, DocumentRouteHeaderValue routeHeaderValue, ActionRequestValue parentRequest, RuleDelegation ruleDelegation) {
	context.setActionRequest(parentRequest);
       RuleBaseValues delRuleBo = KEWServiceLocator.getRuleService().getRuleByName(delegationRule.getName());
	if (delegationRule.isActive()) {
           for (org.kuali.rice.kew.api.rule.RuleResponsibility delegationResp : delegationRule.getRuleResponsibilities())
           {
               if (delegationResp.isUsingRole())
               {
                   makeRoleActionRequests(arFactory, context, delegationRule, delegationResp, routeHeaderValue, parentRequest, ruleDelegation);
               } else if (delRuleBo.isMatch(context.getDocumentContent()))
               {
                   makeActionRequest(arFactory, context, delegationRule, routeHeaderValue, delegationResp, parentRequest, ruleDelegation);
               }
           }
	}
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:FlexRM.java


示例2: getRuleDelegationsByResponsibiltityId

import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
@Override
public List<RuleDelegation> getRuleDelegationsByResponsibiltityId(
        @WebParam(name = "id") String id) throws RiceIllegalArgumentException, RiceIllegalStateException {
    incomingParamCheck("id", id);
    QueryByCriteria.Builder builder = QueryByCriteria.Builder.create();
    builder.setPredicates(
            equal("responsibilityId", id),
            equal("delegationRule.currentInd", Boolean.TRUE)
    );
    QueryResults<RuleDelegationBo> results = dataObjectService.findMatching(RuleDelegationBo.class, builder.build());
    List<RuleDelegation> ruleDelegations = new ArrayList<RuleDelegation>();
    for (RuleDelegationBo bo : results.getResults()) {
        ruleDelegations.add(RuleDelegationBo.to(bo));
    }
	return ruleDelegations;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:17,代码来源:RuleServiceImpl.java


示例3: getRuleDelegationsByResponsibiltityId

import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
@Override
public List<RuleDelegation> getRuleDelegationsByResponsibiltityId(
        @WebParam(name = "id") String id) throws RiceIllegalArgumentException, RiceIllegalStateException {
    incomingParamCheck("id", id);
    Map<String, Object> criteria = new HashMap<String, Object>(2);
	criteria.put("responsibilityId", id);
	criteria.put("delegationRule.currentInd", Boolean.TRUE);
	Collection<RuleDelegationBo> delegations = this.businessObjectService.findMatching(RuleDelegationBo.class,
            criteria);
    List<RuleDelegation> ruleDelegations = new ArrayList<RuleDelegation>();
    if (CollectionUtils.isNotEmpty(delegations)) {
        for (RuleDelegationBo bo : delegations) {
            ruleDelegations.add(RuleDelegationBo.to(bo));
        }
    }

	return ruleDelegations;

}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:20,代码来源:RuleServiceImpl.java


示例4: create

import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
/**
 * Construct a RuleValidationContext under which to validate a rule.  The rule must be non-null, the delegation
 * and author can be <code>null</code> given the circumstances defined in the description of this class.
 */
public static Builder create(RuleContract rule, RuleDelegationContract ruleDelegation, String ruleAuthorPrincipalId) {
    Builder builder = Builder.create(rule);
    if (ruleDelegation != null) {
        builder.setRuleDelegation(RuleDelegation.Builder.create(ruleDelegation));
    }
    builder.setRuleAuthorPrincipalId(ruleAuthorPrincipalId);
    return builder;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:13,代码来源:RuleValidationContext.java


示例5: getRuleDelegation

import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
/**
 * Retrieve the RuleDelegation representing the parent of the rule being validated.  If the rule is
 * not a delegation rule, then this will return null;
 */
   @Override
public RuleDelegation getRuleDelegation() {
	return ruleDelegation;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:RuleValidationContext.java


示例6: setRuleDelegation

import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
public void setRuleDelegation(RuleDelegation.Builder ruleDelegation) {
    this.ruleDelegation = ruleDelegation;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:RuleValidationContext.java


示例7: makeActionRequests

import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
private void makeActionRequests(ActionRequestFactory arFactory, RouteContext context, org.kuali.rice.kew.api.rule.Rule rule, DocumentRouteHeaderValue routeHeader, ActionRequestValue parentRequest, RuleDelegation ruleDelegation)
		throws WorkflowException {

	List<org.kuali.rice.kew.api.rule.RuleResponsibility> responsibilities = rule.getRuleResponsibilities();
	makeActionRequests(arFactory, responsibilities, context, rule, routeHeader, parentRequest, ruleDelegation);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:FlexRM.java


示例8: makeRoleActionRequests

import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
/**
 * Generates action requests for a role responsibility
 */
private void makeRoleActionRequests(ActionRequestFactory arFactory, RouteContext context, 
		org.kuali.rice.kew.api.rule.Rule rule, org.kuali.rice.kew.api.rule.RuleResponsibility resp, DocumentRouteHeaderValue routeHeader, ActionRequestValue parentRequest,
		RuleDelegation ruleDelegation)
{
	String roleName = resp.getResolvedRoleName();
	//RoleAttribute roleAttribute = resp.resolveRoleAttribute();
       RoleAttribute roleAttribute = null;
       if (resp.isUsingRole()) {
           //get correct extension definition
           roleAttribute = (RoleAttribute) GlobalResourceLoader.getResourceLoader().getObject(new ObjectDefinition(
                   resp.getRoleAttributeName()));

           if (roleAttribute instanceof XmlConfiguredAttribute) {
               ExtensionDefinition roleAttributeDefinition = null;
               for (RuleTemplateAttribute ruleTemplateAttribute : rule.getRuleTemplate().getRuleTemplateAttributes()) {
                   if (resp.getRoleAttributeName().equals(ruleTemplateAttribute.getRuleAttribute().getResourceDescriptor())) {
                       roleAttributeDefinition = ruleTemplateAttribute.getRuleAttribute();
                       break;
                   }
               }
               ((XmlConfiguredAttribute)roleAttribute).setExtensionDefinition(roleAttributeDefinition);
           }
       }
	//setRuleAttribute(roleAttribute, rule, resp.getRoleAttributeName());
	List<String> qualifiedRoleNames = new ArrayList<String>();
	if (parentRequest != null && parentRequest.getQualifiedRoleName() != null) {
		qualifiedRoleNames.add(parentRequest.getQualifiedRoleName());
	} else {
        qualifiedRoleNames.addAll(roleAttribute.getQualifiedRoleNames(roleName, context.getDocumentContent()));
	}
       for (String qualifiedRoleName : qualifiedRoleNames) {
           if (parentRequest == null && isDuplicateActionRequestDetected(routeHeader, context.getNodeInstance(), resp, qualifiedRoleName)) {
               continue;
           }

           ResolvedQualifiedRole resolvedRole = roleAttribute.resolveQualifiedRole(context, roleName, qualifiedRoleName);
           RoleRecipient recipient = new RoleRecipient(roleName, qualifiedRoleName, resolvedRole);
           if (parentRequest == null) {
               ActionRequestValue roleRequest = arFactory.addRoleRequest(recipient, resp.getActionRequestedCd(),
                       resp.getApprovePolicy(), resp.getPriority(), resp.getResponsibilityId(), rule.isForceAction(),
                       rule.getDescription(), rule.getId());

               List<RuleDelegation> ruleDelegations = getRuleService().getRuleDelegationsByResponsibiltityId(resp.getResponsibilityId());
               if (ruleDelegations != null && !ruleDelegations.isEmpty()) {
                   // create delegations for all the children
                   for (ActionRequestValue request : roleRequest.getChildrenRequests()) {
                       for (RuleDelegation childRuleDelegation : ruleDelegations) {
                           buildDelegationGraph(arFactory, context, childRuleDelegation.getDelegationRule(), routeHeader, request, childRuleDelegation);
                       }
                   }
               }

           } else {
               arFactory.addDelegationRoleRequest(parentRequest, resp.getApprovePolicy(), recipient, resp.getResponsibilityId(), rule.isForceAction(), ruleDelegation.getDelegationType(), rule.getDescription(), rule.getId());
           }
       }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:61,代码来源:FlexRM.java


示例9: saveRuleDefaults

import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
@CacheEvict(value={RuleTemplate.Cache.NAME, Rule.Cache.NAME, RuleDelegation.Cache.NAME}, allEntries = true)
public void saveRuleDefaults(RuleDelegationBo ruleDelegation, RuleBaseValues ruleBaseValues);
 
开发者ID:kuali,项目名称:kc-rice,代码行数:3,代码来源:RuleTemplateService.java


示例10: makeCurrent

import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
@Override
public void makeCurrent(RuleDelegationBo ruleDelegation, boolean isRetroactiveUpdatePermitted) {
    clearCache(RuleDelegation.Cache.NAME);
	makeCurrent(ruleDelegation, ruleDelegation.getDelegationRule(), isRetroactiveUpdatePermitted);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:6,代码来源:RuleServiceInternalImpl.java


示例11: makeCurrent

import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
public void makeCurrent(RuleDelegationBo ruleDelegation, boolean isRetroactiveUpdatePermitted) {
    clearCache(RuleDelegation.Cache.NAME);
	makeCurrent(ruleDelegation, ruleDelegation.getDelegationRule(), isRetroactiveUpdatePermitted);
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:5,代码来源:RuleServiceInternalImpl.java


示例12: findByResponsibilityId

import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
/**
 * Returns a List of all RuleDelegations with "current" Rules for the given
 * responsibility id.
 * KULRICE-12368:Added the caching annotation to this method so it would use not refetch
 * the same information repeatedly
*/
@Cacheable(value= RuleDelegation.Cache.NAME, key="'responsibilityId=' + #p0")
public List<RuleDelegationBo> findByResponsibilityId(String responsibilityId);
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:RuleDelegationService.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RenamePackageChange类代码示例发布时间:2022-05-16
下一篇:
Java CSSStyleDeclaration类代码示例发布时间:2022-05-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap