本文整理汇总了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();
}
示例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;
}
示例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();
}
示例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;
}