當前位置: 首頁>>代碼示例>>Java>>正文


Java AddPersonDelegationMemberEvent類代碼示例

本文整理匯總了Java中org.kuali.rice.kim.rule.event.ui.AddPersonDelegationMemberEvent的典型用法代碼示例。如果您正苦於以下問題:Java AddPersonDelegationMemberEvent類的具體用法?Java AddPersonDelegationMemberEvent怎麽用?Java AddPersonDelegationMemberEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AddPersonDelegationMemberEvent類屬於org.kuali.rice.kim.rule.event.ui包,在下文中一共展示了AddPersonDelegationMemberEvent類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addDelegationMember

import org.kuali.rice.kim.rule.event.ui.AddPersonDelegationMemberEvent; //導入依賴的package包/類
public ActionForward addDelegationMember(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    IdentityManagementPersonDocumentForm personDocumentForm = (IdentityManagementPersonDocumentForm) form;
    IdentityManagementPersonDocument personDocument = personDocumentForm.getPersonDocument();
    RoleDocumentDelegationMember newDelegationMember = personDocumentForm.getNewDelegationMember();
    KimTypeAttributesHelper attrHelper = newDelegationMember.getAttributesHelper();
    if (getKualiRuleService().applyRules(new AddPersonDelegationMemberEvent("", personDocumentForm.getPersonDocument(), newDelegationMember))) {
     //RoleImpl roleBo = (RoleImpl)getUiDocumentService().getMember(KimApiConstants.KimUIConstants.MEMBER_TYPE_ROLE_CODE, newDelegationMember.getRoleDao().getRoleId());
     Role role;
    	role = KimApiServiceLocator.getRoleService().getRole(newDelegationMember.getRoleBo().getId());
     if (role != null) {
      if(!validateRole(newDelegationMember.getRoleBo().getId(),role, PersonDocumentRoleRule.ERROR_PATH, "Person")){
      	return mapping.findForward(RiceConstants.MAPPING_BASIC);
      }
      newDelegationMember.setRoleBo(RoleBo.from(role));
     }
     KimAttributeField attrDefinition;
     RoleMemberBo roleMember = KIMServiceLocatorInternal.getUiDocumentService().getRoleMember(newDelegationMember.getRoleMemberId());
     Map<String, String>
                roleMemberAttributes = (new AttributeValidationHelper()).convertAttributesToMap(roleMember.getAttributeDetails());
     for (KimAttributeField key: attrHelper.getDefinitions()) {
     	RoleDocumentDelegationMemberQualifier qualifier = new RoleDocumentDelegationMemberQualifier();
     	attrDefinition = key;
     	qualifier.setKimAttrDefnId(attrHelper.getKimAttributeDefnId(attrDefinition));
     	qualifier.setAttrVal(attrHelper.getAttributeValue(roleMemberAttributes, attrDefinition.getAttributeField().getName()));
        	newDelegationMember.setMemberTypeCode(MemberType.PRINCIPAL.getCode());
     	newDelegationMember.getQualifiers().add(qualifier);
     }
     //newDelegationMember.setAttributeEntry(getUiDocumentService().getAttributeEntries(newDelegationMember.getAttributesHelper().getDefinitions())));
        newDelegationMember.setMemberId(personDocument.getPrincipalId());
     personDocument.getDelegationMembers().add(newDelegationMember);
     personDocumentForm.setNewDelegationMember(new RoleDocumentDelegationMember());
    }
    return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:35,代碼來源:IdentityManagementPersonDocumentAction.java

示例2: processAddPersonDelegationMember

import org.kuali.rice.kim.rule.event.ui.AddPersonDelegationMemberEvent; //導入依賴的package包/類
public boolean processAddPersonDelegationMember(AddPersonDelegationMemberEvent addPersonDelegationMemberEvent){
	RoleDocumentDelegationMember newDelegationMember = addPersonDelegationMemberEvent.getDelegationMember();
	IdentityManagementPersonDocument document = (IdentityManagementPersonDocument)addPersonDelegationMemberEvent.getDocument();
    boolean rulePassed = true;
       if(newDelegationMember == null){
           GlobalVariables.getMessageMap().putError(ERROR_PATH, RiceKeyConstants.ERROR_EMPTY_ENTRY, new String[] {"Delegation Member"});
           return false;
       }
       if(StringUtils.isBlank(newDelegationMember.getRoleMemberId())){
           GlobalVariables.getMessageMap().putError(ERROR_PATH, RiceKeyConstants.ERROR_EMPTY_ENTRY, new String[] {"Role Member"});
           return false;
       }
	return rulePassed;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:15,代碼來源:PersonDocumentDelegationMemberRule.java

示例3: addDelegationMember

import org.kuali.rice.kim.rule.event.ui.AddPersonDelegationMemberEvent; //導入依賴的package包/類
public ActionForward addDelegationMember(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
    IdentityManagementPersonDocumentForm personDocumentForm = (IdentityManagementPersonDocumentForm) form;
    IdentityManagementPersonDocument personDocument = personDocumentForm.getPersonDocument();
    RoleDocumentDelegationMember newDelegationMember = personDocumentForm.getNewDelegationMember();
    KimTypeAttributesHelper attrHelper = newDelegationMember.getAttributesHelper();
    if (getKualiRuleService().applyRules(new AddPersonDelegationMemberEvent("", personDocumentForm.getPersonDocument(), newDelegationMember))) {
     //RoleImpl roleBo = (RoleImpl)getUiDocumentService().getMember(KimApiConstants.KimUIConstants.MEMBER_TYPE_ROLE_CODE, newDelegationMember.getRoleDao().getRoleId());
     Role role;
    	role = KimApiServiceLocator.getRoleService().getRole(newDelegationMember.getRoleBo().getId());
     if (role != null) {
      if(!validateRole(newDelegationMember.getRoleBo().getId(),role, PersonDocumentRoleRule.ERROR_PATH, "Person")){
      	return mapping.findForward(RiceConstants.MAPPING_BASIC);
      }
      newDelegationMember.setRoleBo(RoleBo.from(role));
     }
     KimAttributeField attrDefinition;
     RoleMemberBo roleMember = KIMServiceLocatorInternal.getUiDocumentService().getRoleMember(newDelegationMember.getRoleMemberId());
     Map<String, String>
                roleMemberAttributes = (new AttributeValidationHelper()).convertAttributesToMap(roleMember.getAttributeDetails());
     for (KimAttributeField key: attrHelper.getDefinitions()) {
     	RoleDocumentDelegationMemberQualifier qualifier = new RoleDocumentDelegationMemberQualifier();
     	attrDefinition = key;
     	qualifier.setKimAttrDefnId(attrHelper.getKimAttributeDefnId(attrDefinition));
     	qualifier.setAttrVal(attrHelper.getAttributeValue(roleMemberAttributes, attrDefinition.getAttributeField().getName()));
     	newDelegationMember.setMemberId(personDocument.getPrincipalId());
     	newDelegationMember.setMemberTypeCode(MemberType.PRINCIPAL.getCode());
     	newDelegationMember.getQualifiers().add(qualifier);
     }
     //newDelegationMember.setAttributeEntry(getUiDocumentService().getAttributeEntries(newDelegationMember.getAttributesHelper().getDefinitions())));
     personDocument.getDelegationMembers().add(newDelegationMember);
     personDocumentForm.setNewDelegationMember(new RoleDocumentDelegationMember());
    }
    return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:35,代碼來源:IdentityManagementPersonDocumentAction.java

示例4: processAddPersonDelegationMember

import org.kuali.rice.kim.rule.event.ui.AddPersonDelegationMemberEvent; //導入依賴的package包/類
@Override
public boolean processAddPersonDelegationMember(AddPersonDelegationMemberEvent addPersonDelegationMemberEvent){
	return getAddPersonDelegationMemberRule().processAddPersonDelegationMember(addPersonDelegationMemberEvent);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:5,代碼來源:IdentityManagementPersonDocumentRule.java

示例5: processAddPersonDelegationMember

import org.kuali.rice.kim.rule.event.ui.AddPersonDelegationMemberEvent; //導入依賴的package包/類
public boolean processAddPersonDelegationMember(AddPersonDelegationMemberEvent addPersonDelegationMemberEvent){
	return getAddPersonDelegationMemberRule().processAddPersonDelegationMember(addPersonDelegationMemberEvent);
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:4,代碼來源:IdentityManagementPersonDocumentRule.java

示例6: processAddPersonDelegationMember

import org.kuali.rice.kim.rule.event.ui.AddPersonDelegationMemberEvent; //導入依賴的package包/類
public boolean processAddPersonDelegationMember(AddPersonDelegationMemberEvent addPersonDelegationMemberEvent); 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:2,代碼來源:AddPersonDelegationMemberRule.java


注:本文中的org.kuali.rice.kim.rule.event.ui.AddPersonDelegationMemberEvent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。