本文整理汇总了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);
}
示例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;
}
示例3: processAddDelegationMember
import org.kuali.rice.kim.rule.event.ui.AddDelegationMemberEvent; //导入依赖的package包/类
public boolean processAddDelegationMember(AddDelegationMemberEvent addDelegationMemberEvent);