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


Java AddDelegationMemberEvent类代码示例

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


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

示例1: addDelegationMember

import org.kuali.rice.kim.rule.event.ui.AddDelegationMemberEvent; //导入依赖的package包/类
public ActionForward addDelegationMember(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    IdentityManagementRoleDocumentForm roleDocumentForm = (IdentityManagementRoleDocumentForm) form;
    RoleDocumentDelegationMember newDelegationMember = roleDocumentForm.getDelegationMember();

    //See if possible to add with just Group Details filled in (not returned from lookup)
    if (StringUtils.isEmpty(newDelegationMember.getMemberId())
            && StringUtils.isNotEmpty(newDelegationMember.getMemberName())
            && StringUtils.isNotEmpty(newDelegationMember.getMemberNamespaceCode())
            && StringUtils.equals(newDelegationMember.getMemberTypeCode(), KimConstants.KimGroupMemberTypes.GROUP_MEMBER_TYPE.getCode())) {
        Group tempGroup = KimApiServiceLocator.getGroupService().getGroupByNamespaceCodeAndName(
                newDelegationMember.getMemberNamespaceCode(), newDelegationMember.getMemberName());
        if (tempGroup != null) {
            newDelegationMember.setMemberId(tempGroup.getId());
        }
    }

    //See if possible to grab details for Principal
    if (StringUtils.isEmpty(newDelegationMember.getMemberId())
            && StringUtils.isNotEmpty(newDelegationMember.getMemberName())
            && StringUtils.equals(newDelegationMember.getMemberTypeCode(), KimConstants.KimGroupMemberTypes.PRINCIPAL_MEMBER_TYPE.getCode())) {
        Principal principal = KimApiServiceLocator.getIdentityService().getPrincipalByPrincipalName(newDelegationMember.getMemberName());
        if (principal != null) {
            newDelegationMember.setMemberId(principal.getPrincipalId());
        }
    }

    if (checkDelegationMember(newDelegationMember) && KRADServiceLocatorWeb.getKualiRuleService().applyRules(
            new AddDelegationMemberEvent("", roleDocumentForm.getRoleDocument(), newDelegationMember))) {
        newDelegationMember.setDocumentNumber(roleDocumentForm.getDocument().getDocumentNumber());
        if (StringUtils.isEmpty(newDelegationMember.getDelegationTypeCode())) {
           newDelegationMember.setDelegationTypeCode(DelegationType.SECONDARY.getCode());
        }
        roleDocumentForm.getRoleDocument().addDelegationMember(newDelegationMember);
        roleDocumentForm.setDelegationMember(roleDocumentForm.getRoleDocument().getBlankDelegationMember());
    }
    return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:38,代码来源:IdentityManagementRoleDocumentAction.java

示例2: processAddDelegationMember

import org.kuali.rice.kim.rule.event.ui.AddDelegationMemberEvent; //导入依赖的package包/类
public boolean processAddDelegationMember(AddDelegationMemberEvent addDelegationMemberEvent) {
    boolean success = new RoleDocumentDelegationMemberRule().processAddDelegationMember(addDelegationMemberEvent);
    RoleDocumentDelegationMember roleDocumentDelegationMember = addDelegationMemberEvent.getDelegationMember();
    success &= validateActiveDate("delegationMember.activeFromDate", roleDocumentDelegationMember.getActiveFromDate(), roleDocumentDelegationMember.getActiveToDate());
    return success;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:IdentityManagementRoleDocumentRule.java

示例3: processAddDelegationMember

import org.kuali.rice.kim.rule.event.ui.AddDelegationMemberEvent; //导入依赖的package包/类
public boolean processAddDelegationMember(AddDelegationMemberEvent addDelegationMemberEvent); 
开发者ID:kuali,项目名称:kc-rice,代码行数:2,代码来源:AddDelegationMemberRule.java


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