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


Java KimTypeBo.to方法代碼示例

本文整理匯總了Java中org.kuali.rice.kim.impl.type.KimTypeBo.to方法的典型用法代碼示例。如果您正苦於以下問題:Java KimTypeBo.to方法的具體用法?Java KimTypeBo.to怎麽用?Java KimTypeBo.to使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.kuali.rice.kim.impl.type.KimTypeBo的用法示例。


在下文中一共展示了KimTypeBo.to方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getRoleTypeService

import org.kuali.rice.kim.impl.type.KimTypeBo; //導入方法依賴的package包/類
/**
 * Retrieves the role type service associated with the given role ID
 *
 * @param roleId the role ID to get the role type service for
 * @return the Role Type Service
 */
protected RoleTypeService getRoleTypeService(String roleId) {
    RoleBoLite roleBo = getRoleBoLite(roleId);
    if (roleBo != null){
        KimType roleType = KimTypeBo.to(roleBo.getKimRoleType());
        if (roleType != null) {
            return getRoleTypeService(roleType);
        }
    }

    return KimImplServiceLocator.getDefaultRoleTypeService();
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:18,代碼來源:RoleServiceBase.java

示例2: validateDelegationMemberRoleQualifier

import org.kuali.rice.kim.impl.type.KimTypeBo; //導入方法依賴的package包/類
protected boolean validateDelegationMemberRoleQualifier(List<RoleDocumentDelegationMember> delegationMembers){
List<RemotableAttributeError> validationErrors = new ArrayList<RemotableAttributeError>();
boolean valid = false;
int memberCounter = 0;
      GlobalVariables.getMessageMap().removeFromErrorPath(KRADConstants.DOCUMENT_PROPERTY_NAME);
for(RoleDocumentDelegationMember delegationMember: delegationMembers) {
    KimType kimType = KimTypeBo.to(delegationMember.getRoleBo().getKimRoleType());
    KimTypeService kimTypeService = KimFrameworkServiceLocator.getKimTypeService(kimType);
	String errorPath = "delegationMembers["+memberCounter+"]";
       Map<String, String> mapToValidate = attributeValidationHelper.convertQualifiersToMap(delegationMember.getQualifiers());
       List<RemotableAttributeError> errorsTemp = kimTypeService.validateAttributes(kimType.getId(), mapToValidate);
	validationErrors.addAll(
			attributeValidationHelper.convertErrors(errorPath,
                          attributeValidationHelper.convertQualifiersToAttrIdxMap(delegationMember.getQualifiers()),
                          errorsTemp));

	List<RoleMember> roleMembers = getRoleService().findRoleMembers(QueryByCriteria.Builder.fromPredicates(equal(KimConstants.PrimaryKeyConstants.ID, delegationMember.getRoleMemberId()))).getResults();
	if(roleMembers.isEmpty()){
		valid = false;
		GlobalVariables.getMessageMap().putError("document."+errorPath, RiceKeyConstants.ERROR_DELEGATE_ROLE_MEMBER_ASSOCIATION, new String[]{});
	} else{
		kimTypeService.validateUnmodifiableAttributes(kimType.getId(), roleMembers.get(0).getAttributes(), mapToValidate);
		validationErrors.addAll(
				attributeValidationHelper.convertErrors(errorPath, attributeValidationHelper
                              .convertQualifiersToAttrIdxMap(delegationMember.getQualifiers()), errorsTemp));
	}
       memberCounter++;
  	}
GlobalVariables.getMessageMap().addToErrorPath(KRADConstants.DOCUMENT_PROPERTY_NAME);
  	if (validationErrors.isEmpty()) {
  		valid = true;
  	} else {
  		attributeValidationHelper.moveValidationErrorsToErrorMap(validationErrors);
  		valid = false;
  	}
  	return valid;
  }
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:38,代碼來源:IdentityManagementPersonDocumentRule.java

示例3: getRoleTypeService

import org.kuali.rice.kim.impl.type.KimTypeBo; //導入方法依賴的package包/類
/**
 * Retrieves the role type service associated with the given role ID
 *
 * @param roleId the role ID to get the role type service for
 * @return the Role Type Service
 */
protected RoleTypeService getRoleTypeService(String roleId) {
    RoleBoLite roleBo = getRoleBoLite(roleId);
    if(roleBo != null){
        KimType roleType = KimTypeBo.to(roleBo.getKimRoleType());
        if (roleType != null) {
            return getRoleTypeService(roleType);
        }
    }
    return KimImplServiceLocator.getDefaultRoleTypeService();
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:17,代碼來源:RoleServiceBase.java

示例4: validateDelegationMemberRoleQualifier

import org.kuali.rice.kim.impl.type.KimTypeBo; //導入方法依賴的package包/類
protected boolean validateDelegationMemberRoleQualifier(List<RoleDocumentDelegationMember> delegationMembers){
List<RemotableAttributeError> validationErrors = new ArrayList<RemotableAttributeError>();
boolean valid;
int memberCounter = 0;
List<RemotableAttributeError> errorsTemp;
Map<String, String> mapToValidate;
      KimTypeService kimTypeService;
      GlobalVariables.getMessageMap().removeFromErrorPath(KRADConstants.DOCUMENT_PROPERTY_NAME);
      RoleMemberBo roleMember;
      String errorPath;
      ArrayList<String> roleIds;
      KimType kimType;
for(RoleDocumentDelegationMember delegationMember: delegationMembers) {
	kimType = KimTypeBo.to(delegationMember.getRoleBo().getKimRoleType());
	kimTypeService = KimFrameworkServiceLocator.getKimTypeService(kimType);
	roleIds = new ArrayList<String>();
	roleIds.add(delegationMember.getRoleBo().getId());
	errorPath = "delegationMembers["+memberCounter+"]";
	mapToValidate = attributeValidationHelper.convertQualifiersToMap(delegationMember.getQualifiers());
	errorsTemp = kimTypeService.validateAttributes(kimType.getId(), mapToValidate);
	validationErrors.addAll(
			attributeValidationHelper.convertErrors(errorPath,
                          attributeValidationHelper.convertQualifiersToAttrIdxMap(delegationMember.getQualifiers()),
                          errorsTemp));

	roleMember = getUIDocumentService().getRoleMember(delegationMember.getRoleMemberId());
	if(roleMember==null){
		valid = false;
		GlobalVariables.getMessageMap().putError("document."+errorPath, RiceKeyConstants.ERROR_DELEGATE_ROLE_MEMBER_ASSOCIATION, new String[]{});
	} else{
		kimTypeService.validateUnmodifiableAttributes(kimType.getId(), roleMember.getAttributes(), mapToValidate);
		validationErrors.addAll(
				attributeValidationHelper.convertErrors(errorPath, attributeValidationHelper
                              .convertQualifiersToAttrIdxMap(delegationMember.getQualifiers()), errorsTemp));
	}
       memberCounter++;
  	}
GlobalVariables.getMessageMap().addToErrorPath(KRADConstants.DOCUMENT_PROPERTY_NAME);
  	if (validationErrors.isEmpty()) {
  		valid = true;
  	} else {
  		attributeValidationHelper.moveValidationErrorsToErrorMap(validationErrors);
  		valid = false;
  	}
  	return valid;
  }
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:47,代碼來源:IdentityManagementPersonDocumentRule.java


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