当前位置: 首页>>代码示例>>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;未经允许,请勿转载。