当前位置: 首页>>代码示例>>Java>>正文


Java KimTypeBo类代码示例

本文整理汇总了Java中org.kuali.rice.kim.impl.type.KimTypeBo的典型用法代码示例。如果您正苦于以下问题:Java KimTypeBo类的具体用法?Java KimTypeBo怎么用?Java KimTypeBo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


KimTypeBo类属于org.kuali.rice.kim.impl.type包,在下文中一共展示了KimTypeBo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getNestedQualification

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
private Map<String, String> getNestedQualification(RoleBoLite memberRole, String namespaceCode, String roleName,
        String memberNamespaceCode, String memberName, Map<String, String> qualification,
        Map<String, String> memberQualification) {
    VersionedService<RoleTypeService> versionedRoleTypeService = getVersionedRoleTypeService(KimTypeBo.to(
            memberRole.getKimRoleType()));
    // if null service - just return the original qualification (pre 2.3.4 - ignoring memberQualifications)
    if (versionedRoleTypeService == null) {
        return qualification;
    }
    boolean versionOk = VersionHelper.compareVersion(versionedRoleTypeService.getVersion(),
            CoreConstants.Versions.VERSION_2_3_4) != -1;
    if (versionOk) {
        return versionedRoleTypeService.getService().convertQualificationForMemberRolesAndMemberAttributes(
                namespaceCode, roleName, memberNamespaceCode, memberName, qualification, memberQualification);
    } else {
        return versionedRoleTypeService.getService().convertQualificationForMemberRoles(namespaceCode, roleName,
                memberNamespaceCode, memberName, qualification);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:20,代码来源:RoleServiceImpl.java

示例2: toAttributes

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
public static <T extends KimAttributeDataBo> Map<String, String> toAttributes(Collection<T> bos) {
    Map<String, String> m = new HashMap<String, String>();
    if(CollectionUtils.isNotEmpty(bos)) {
        for (T it : bos) {
            if (it != null) {
                KimTypeAttribute attribute = null;
                if ( it.getKimType() != null ) {
                    attribute = KimTypeBo.to(it.getKimType()).getAttributeDefinitionById(it.getKimAttributeId());
                }
                if ( attribute != null ) {
                    m.put(attribute.getKimAttribute().getAttributeName(), it.getAttributeValue());
                } else {
                    m.put(it.getKimAttribute().getAttributeName(), it.getAttributeValue());
                }
            }
        }
    }
    return m;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:20,代码来源:KimAttributeDataBo.java

示例3: populateRoleInformation

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
protected void populateRoleInformation( IdentityManagementPersonDocument personDoc ) {
	for (PersonDocumentRole role : personDoc.getRoles()) {
        KimTypeService kimTypeService = (KimTypeService) GlobalResourceLoader.getService(QName.valueOf(
                   getKimTypeServiceName(KimTypeBo.to(role.getKimRoleType()))));
        //it is possible that the the kimTypeService is coming from a remote application 
        // and therefore it can't be guarenteed that it is up and working, so using a try/catch to catch this possibility.
        try {
            role.setDefinitions(kimTypeService.getAttributeDefinitions(role.getKimTypeId()));
        } catch (Exception ex) {
               LOG.warn("Not able to retrieve KimTypeService from remote system for KIM Type Id: " + role.getKimTypeId(), ex);
           }
       	// when post again, it will need this during populate
           role.setNewRolePrncpl(new KimDocumentRoleMember());
           for (KimAttributeField key : role.getDefinitions()) {
           	KimDocumentRoleQualifier qualifier = new KimDocumentRoleQualifier();
           	//qualifier.setQualifierKey(key);
        	setAttrDefnIdForQualifier(qualifier, key);
           	role.getNewRolePrncpl().getQualifiers().add(qualifier);
           }
        role.setAttributeEntry( getUiDocumentService().getAttributeEntries( role.getDefinitions() ) );
	}
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:23,代码来源:IdentityManagementPersonInquiry.java

示例4: getDefinitions

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
public List<KimAttributeField> getDefinitions() {
    if (definitions == null || definitions.isEmpty()) {
        KimTypeService kimTypeService = KimFrameworkServiceLocator.getKimTypeService(KimTypeBo.to(this.getKimRoleType()));
        //it is possible that the the roleTypeService is coming from a remote application                        
        // and therefore it can't be guarenteed that it is up and working, so using a try/catch to catch this possibility.                       
        try {
            if (kimTypeService != null) {
                definitions = kimTypeService.getAttributeDefinitions(getKimTypeId());
            } else {
                definitions = Collections.emptyList();
            }
        } catch (Exception ex) {
            LOG.warn("Not able to retrieve KimTypeService from remote system for KIM Role Type: " + this.getKimRoleType(), ex);
        }
    }
    return definitions;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:PersonDocumentRole.java

示例5: getDefinitions

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
public List<KimAttributeField> getDefinitions() {
	if (definitions == null || definitions.isEmpty()) {
        KimTypeService kimTypeService = KimFrameworkServiceLocator.getKimTypeService(KimTypeBo.to(
                   this.getKimRoleType()));
        //it is possible that the the roleTypeService is coming from a remote application 
        // and therefore it can't be guarenteed that it is up and working, so using a try/catch to catch this possibility.
        try {
   	        if ( kimTypeService != null ) {
   	        	definitions = kimTypeService.getAttributeDefinitions(getKimTypeId());
   	        } else {
   	        	definitions = Collections.emptyList();
   	        }
   		} catch (Exception ex) {
               LOG.warn("Not able to retrieve KimTypeService from remote system for KIM Role Type: " + this.getKimRoleType(), ex);
           }
	}
	
	return definitions;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:20,代码来源:PersonDocumentRole.java

示例6: getCreateNewUrl

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
@Override
public String getCreateNewUrl() {
    String url = "";
    if((getLookupableHelperService()).allowsNewOrCopyAction(KimConstants.KimUIConstants.KIM_ROLE_DOCUMENT_TYPE_NAME)){
        Properties parameters = new Properties();
        parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, KimTypeBo.class.getName());
        //parameters.put(KRADConstants.RETURN_LOCATION_PARAMETER, KRADConstants.PORTAL_ACTION);
        parameters.put(KRADConstants.PARAMETER_COMMAND, KewApiConstants.INITIATE_COMMAND);
        parameters.put(KRADConstants.DOC_FORM_KEY, KimConstants.KimUIConstants.KIM_ROLE_DOCUMENT_SHORT_KEY);
     if (StringUtils.isNotBlank(getReturnLocation())) {
     	parameters.put(KRADConstants.RETURN_LOCATION_PARAMETER, getReturnLocation());
     	}
        url = getCreateNewUrl(UrlFactory.parameterizeUrl(KRADConstants.LOOKUP_ACTION, parameters));
        //String url = "lookup.do?businessObjectClassName=org.kuali.rice.kim.bo.types.impl.KimTypeImpl&returnLocation=portal.do&docFormKey="+KimApiConstants.KimUIConstants.KIM_ROLE_DOCUMENT_SHORT_KEY;
    }
    return url;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:18,代码来源:RoleLookupableImpl.java

示例7: getKimRoleType

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
public KimTypeBo getKimRoleType() {
    if (kimTypeId == null) {
        return null;
    }
    KimType type = getTypeInfoService().getKimType(kimTypeId);
    if (type == null) {
        return null;
    }
    return KimTypeBo.from(type);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:11,代码来源:RoleBo.java

示例8: 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

示例9: getKimType

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
@Override
public KimTypeBo getKimType() {
    if (kimType == null && StringUtils.isNotEmpty(getId())) {
        kimType = KimTypeBo.from(KimApiServiceLocator.getKimTypeInfoService().getKimType(kimTypeId));
    }
    return kimType;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:KimAttributeDataBo.java

示例10: getKimGroupType

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
public KimTypeBo getKimGroupType() {
    if (StringUtils.isNotBlank(getKimTypeId())) {
        if (kimGroupType == null || (!StringUtils.equals(kimGroupType.getId(), kimTypeId))) {
            kimGroupType = KimTypeBo.from(KimApiServiceLocator.getKimTypeInfoService().getKimType(kimTypeId));
        }
    }
    return kimGroupType;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:PersonDocumentGroup.java

示例11: getAttributeDefinitionsForRole

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
protected List<KimAttributeField> getAttributeDefinitionsForRole(PersonDocumentRole role) {
   	KimTypeService kimTypeService = KimFrameworkServiceLocator.getKimTypeService(KimTypeBo.to(
               role.getKimRoleType()));
   	//it is possible that the the kimTypeService is coming from a remote application
       // and therefore it can't be guarenteed that it is up and working, so using a try/catch to catch this possibility.
       try {
       	if ( kimTypeService != null ) {
       		return kimTypeService.getAttributeDefinitions(role.getKimTypeId());
       	}
       } catch (Exception ex) {
           LOG.warn("Not able to retrieve KimTypeService from remote system for KIM Role Type: " + role.getKimRoleType(), ex);
       }
   	return Collections.emptyList();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:15,代码来源:UiDocumentServiceImpl.java

示例12: loadRoleDoc

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
@Override
  public void loadRoleDoc(IdentityManagementRoleDocument identityManagementRoleDocument, Role role){
RoleBo roleBo = getDataObjectService().find(RoleBo.class, role.getId());

identityManagementRoleDocument.setRoleId(roleBo.getId());
identityManagementRoleDocument.setKimType(KimTypeBo.to(roleBo.getKimRoleType()));
identityManagementRoleDocument.setRoleTypeName(roleBo.getKimRoleType().getName());
identityManagementRoleDocument.setRoleTypeId(roleBo.getKimTypeId());
identityManagementRoleDocument.setRoleName(roleBo.getName());
identityManagementRoleDocument.setRoleDescription(roleBo.getDescription());
identityManagementRoleDocument.setActive(roleBo.isActive());
identityManagementRoleDocument.setRoleNamespace(roleBo.getNamespaceCode());
identityManagementRoleDocument.setEditing(true);

identityManagementRoleDocument.setPermissions(loadPermissions(
              getDataObjectService().findMatching(RolePermissionBo.class,
                      QueryByCriteria.Builder.forAttribute(KimConstants.PrimaryKeyConstants.SUB_ROLE_ID, role.getId()).build()).getResults()));
      identityManagementRoleDocument.setResponsibilities(loadResponsibilities(
              getDataObjectService().findMatching(RoleResponsibilityBo.class,
                      QueryByCriteria.Builder.forAttribute(KimConstants.PrimaryKeyConstants.SUB_ROLE_ID, role.getId()).build()).getResults()));
      loadResponsibilityRoleRspActions(identityManagementRoleDocument);
      identityManagementRoleDocument.setMembers(loadRoleMembers(identityManagementRoleDocument, roleBo.getMembers()));
      loadMemberRoleRspActions(identityManagementRoleDocument);
identityManagementRoleDocument.setDelegations(loadRoleDocumentDelegations(identityManagementRoleDocument, getRoleDelegations(roleBo.getId())));
//Since delegation members are flattened out on the UI...
setDelegationMembersInDocument(identityManagementRoleDocument);
identityManagementRoleDocument.setKimType(KimTypeBo.to(roleBo.getKimRoleType()));
  }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:29,代码来源:UiDocumentServiceImpl.java

示例13: getCreateNewUrl

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
@Override
    public String getCreateNewUrl() {
        String url = "";
        if((getLookupableHelperService()).allowsNewOrCopyAction(KimConstants.KimUIConstants.KIM_ROLE_DOCUMENT_TYPE_NAME)){
            // we can use this if we want to go directly to the main document in the future
//            Properties parameters = new Properties();
//            parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.DOC_HANDLER_METHOD);
//            parameters.put(KRADConstants.PARAMETER_COMMAND, KewApiConstants.INITIATE_COMMAND);
//            parameters.put(KRADConstants.DOCUMENT_TYPE_NAME, KimConstants.KimUIConstants.KIM_ROLE_DOCUMENT_TYPE_NAME);
//            if (StringUtils.isNotBlank(getReturnLocation())) {
//                parameters.put(KRADConstants.RETURN_LOCATION_PARAMETER, getReturnLocation());
//            }
//            url = getCreateNewUrl(UrlFactory.parameterizeUrl(
//                    KimCommonUtilsInternal.getKimBasePath()+ KimConstants.KimUIConstants.KIM_ROLE_DOCUMENT_ACTION, parameters));
            Properties parameters = new Properties();
            parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, KimTypeBo.class.getName());
            //parameters.put(KRADConstants.RETURN_LOCATION_PARAMETER, KRADConstants.PORTAL_ACTION);
            parameters.put(KRADConstants.PARAMETER_COMMAND, KewApiConstants.INITIATE_COMMAND);
            parameters.put(KRADConstants.DOC_FORM_KEY, KimConstants.KimUIConstants.KIM_ROLE_DOCUMENT_SHORT_KEY);
	        if (StringUtils.isNotBlank(getReturnLocation())) {
	        	parameters.put(KRADConstants.RETURN_LOCATION_PARAMETER, getReturnLocation());
	        	}
            url = getCreateNewUrl(UrlFactory.parameterizeUrl(KRADConstants.LOOKUP_ACTION, parameters));
            //String url = "lookup.do?businessObjectClassName=org.kuali.rice.kim.bo.types.impl.KimTypeImpl&returnLocation=portal.do&docFormKey="+KimApiConstants.KimUIConstants.KIM_ROLE_DOCUMENT_SHORT_KEY;
        }
        return url;
    }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:28,代码来源:RoleLookupableImpl.java

示例14: getReturnAnchorHtmlData

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
@Override
protected HtmlData getReturnAnchorHtmlData(BusinessObject businessObject, Properties parameters, LookupForm lookupForm, List returnKeys, BusinessObjectRestrictions businessObjectRestrictions){
   	RoleBo roleBo = (RoleBo) businessObject;
   	HtmlData anchorHtmlData = super.getReturnAnchorHtmlData(businessObject, parameters, lookupForm, returnKeys, businessObjectRestrictions);

   	// prevent derived roles from being selectable (except for identityManagementRoleDocuments)
   	KualiForm myForm = (KualiForm) GlobalVariables.getUserSession().retrieveObject(getDocFormKey());
   	if (myForm == null || !(myForm instanceof IdentityManagementRoleDocumentForm)){
   		if(KimTypeLookupableHelperServiceImpl.hasDerivedRoleTypeService(KimTypeBo.to(roleBo.getKimRoleType()))){
   			((HtmlData.AnchorHtmlData)anchorHtmlData).setHref("");
   		}
   	}
   	return anchorHtmlData;
   }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:15,代码来源:RoleLookupableHelperServiceImpl.java

示例15: processAddPersonDocumentRoleQualifier

import org.kuali.rice.kim.impl.type.KimTypeBo; //导入依赖的package包/类
@Override
   public boolean processAddPersonDocumentRoleQualifier(IdentityManagementPersonDocument document, PersonDocumentRole role, KimDocumentRoleMember kimDocumentRoleMember, int selectedRoleIdx) {
	boolean dateValidationSuccess = validateActiveDate("document.roles[" + selectedRoleIdx + "].newRolePrncpl.activeFromDate", kimDocumentRoleMember.getActiveFromDate(), kimDocumentRoleMember.getActiveToDate());
	String errorPath = "roles[" + selectedRoleIdx + "].newRolePrncpl";
	List<RemotableAttributeError> validationErrors = new ArrayList<RemotableAttributeError>();
       GlobalVariables.getMessageMap().removeFromErrorPath(KRADConstants.DOCUMENT_PROPERTY_NAME);
       KimTypeService kimTypeService = KimFrameworkServiceLocator.getKimTypeService(KimTypeBo.to(role.getKimRoleType()));

	List<RemotableAttributeError> errorsAttributesAgainstExisting;
    boolean rulePassed = true;
    Map<String, String> newMemberQualifiers = attributeValidationHelper.convertQualifiersToMap(kimDocumentRoleMember.getQualifiers());
    Map<String, String> oldMemberQualifiers;
    List<String> roleIds = new ArrayList<String>();
    roleIds.add(role.getRoleId());
    for(KimDocumentRoleMember member: role.getRolePrncpls()){
    	oldMemberQualifiers = member.getQualifierAsMap();
    	errorsAttributesAgainstExisting = kimTypeService.validateUniqueAttributes(
    			role.getKimRoleType().getId(), newMemberQualifiers, oldMemberQualifiers);
    	validationErrors.addAll(
				attributeValidationHelper.convertErrors(errorPath, attributeValidationHelper
                           .convertQualifiersToAttrIdxMap(kimDocumentRoleMember.getQualifiers()),
                           errorsAttributesAgainstExisting));
    }

       if ( kimTypeService != null ) {
       	List<RemotableAttributeError> localErrors = kimTypeService.validateAttributes( role.getKimRoleType().getId(), newMemberQualifiers );
   	    validationErrors.addAll( attributeValidationHelper.convertErrors(errorPath,
                   attributeValidationHelper.convertQualifiersToAttrIdxMap(kimDocumentRoleMember.getQualifiers()),
                   localErrors));
       }

       GlobalVariables.getMessageMap().addToErrorPath(KRADConstants.DOCUMENT_PROPERTY_NAME);
   	if (validationErrors.isEmpty()) {
   		rulePassed = dateValidationSuccess;
   	} else {
   		attributeValidationHelper.moveValidationErrorsToErrorMap(validationErrors);
   		rulePassed = false;
   	}
   	return rulePassed;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:41,代码来源:IdentityManagementPersonDocumentRule.java


注:本文中的org.kuali.rice.kim.impl.type.KimTypeBo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。