• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RoleEbo类的典型用法和代码示例

java 2次浏览

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

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

示例1: getExternalizableBusinessObjectsListForLookup

点赞 3

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
/***
 * @see org.kuali.rice.krad.service.ModuleService#getExternalizableBusinessObjectsListForLookup(java.lang.Class, java.util.Map, boolean)
 */
@SuppressWarnings("unchecked")
@Override
public <T extends ExternalizableBusinessObject> List<T> getExternalizableBusinessObjectsListForLookup(
		Class<T> externalizableBusinessObjectClass, Map<String, Object> fieldValues, boolean unbounded) {
	// for Person objects (which are not real PersistableBOs) pull them through the person service
	if ( Person.class.isAssignableFrom( externalizableBusinessObjectClass ) ) {
		return (List)getPersonService().findPeople( (Map)fieldValues, unbounded );
	} else if ( RoleContract.class.isAssignableFrom( externalizableBusinessObjectClass ) ) {
		List<Role> roles = getKimRoleService().findRoles(toQuery(fieldValues)).getResults();
           List<RoleEbo> roleEbos = new ArrayList<RoleEbo>(roles.size());
           for (Role role : roles) {
               roleEbos.add(RoleBo.from(role));
           }
           return (List<T>)roleEbos;
	} else if (GroupContract.class.isAssignableFrom( externalizableBusinessObjectClass)) {
           List<Group> groups = getGroupService().findGroups(toQuery(fieldValues)).getResults();
           List<GroupEbo> groupEbos = new ArrayList<GroupEbo>(groups.size());
           for (Group group : groups) {
               groupEbos.add(GroupBo.from(group));
           }
           return (List<T>)groupEbos;
       }
	// otherwise, use the default implementation
	return super.getExternalizableBusinessObjectsListForLookup(externalizableBusinessObjectClass, fieldValues, unbounded);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:29,
代码来源:KimModuleService.java

示例2: listPrimaryKeyFieldNames

点赞 3

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
/**
 * This overridden method ...
 *
 * @see org.kuali.rice.krad.service.impl.ModuleServiceBase#listPrimaryKeyFieldNames(java.lang.Class)
 */
@SuppressWarnings("unchecked")
@Override
public List listPrimaryKeyFieldNames(Class businessObjectInterfaceClass) {
	// for Person objects (which are not real PersistableBOs) pull them through the person service
	if ( Person.class.isAssignableFrom( businessObjectInterfaceClass ) ) {
		return Collections.singletonList( KimConstants.PrimaryKeyConstants.PRINCIPAL_ID );
	} else if ( RoleEbo.class.isAssignableFrom( businessObjectInterfaceClass ) ) {
		return Collections.singletonList( KimConstants.PrimaryKeyConstants.ROLE_ID );
	} else if ( GroupEbo.class.isAssignableFrom( businessObjectInterfaceClass ) ) {
		return Collections.singletonList( KimConstants.PrimaryKeyConstants.GROUP_ID );
	} else if ( KimType.class.isAssignableFrom( businessObjectInterfaceClass ) ) {
		return Collections.singletonList( KimConstants.PrimaryKeyConstants.KIM_TYPE_ID );
	} else if ( KimTypeContract.class.isAssignableFrom(businessObjectInterfaceClass)) {
		return Collections.singletonList( KimConstants.PrimaryKeyConstants.KIM_TYPE_CODE );
	}

	// otherwise, use the default implementation
	return super.listPrimaryKeyFieldNames( businessObjectInterfaceClass );
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:25,
代码来源:KimModuleService.java

示例3: setRole

点赞 2

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
public void setRole( RoleEbo role ) {
    this.role = role;
    if ( role != null ) {
        roleMemberRoleNamespaceCode = role.getNamespaceCode();
        roleMemberRoleName = role.getName();
        roleMemberRoleId = role.getId();
    } else {
        roleMemberRoleNamespaceCode = "";
        roleMemberRoleName = "";
        roleMemberRoleId = "";
    }
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:13,
代码来源:TestReviewRole.java

示例4: getRole

点赞 2

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
public RoleEbo getRole() {
    if (MemberType.ROLE.getCode().equals(memberTypeCode)) {
        ModuleService eboModuleService = KRADServiceLocatorWeb.getKualiModuleService().getResponsibleModuleService(RoleEbo.class);
        role = eboModuleService.retrieveExternalizableBusinessObjectIfNecessary(this, role, "role");
        if (role != null) {
            memberId = role.getId();
            memberName = role.getNamespaceCode() + " : " + role.getName();
        }
    }
    return role;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:12,
代码来源:PeopleFlowMemberBo.java

示例5: getRole

点赞 2

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
public RoleEbo getRole() {
    if (MemberType.ROLE.getCode().equals(memberTypeCode)) {
        ModuleService eboModuleService = KRADServiceLocatorWeb.getKualiModuleService().getResponsibleModuleService(RoleEbo.class);
        role = eboModuleService.retrieveExternalizableBusinessObjectIfNecessary(this, role, "role");
        if (role != null) {
            memberId = role.getId();
            memberName = role.getNamespaceCode() + " : " + role.getName();
        }
     }
     return role;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:12,
代码来源:PeopleFlowDelegateBo.java

示例6: doAnyMemberRecordsMatchByExactQualifier

点赞 2

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
protected List<RoleMember> doAnyMemberRecordsMatchByExactQualifier( RoleEbo role, String memberId, RoleDaoAction daoActionToTake, Map<String, String> qualifier ) {
    List<RoleMemberBo> roleMemberBos = getRoleMembersByExactQualifierMatch(role, memberId, daoActionToTake, qualifier);
    List<RoleMember> roleMembers = new ArrayList<RoleMember>();
    if (CollectionUtils.isNotEmpty(roleMemberBos)) {
        for (RoleMemberBo bo : roleMemberBos) {
            roleMembers.add(RoleMemberBo.to(bo));
        }

        return roleMembers;
    }

    return Collections.emptyList();
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:14,
代码来源:RoleServiceBase.java

示例7: getRoleMembersByExactQualifierMatch

点赞 2

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
protected List<RoleMemberBo> getRoleMembersByExactQualifierMatch(RoleEbo role, String memberId, RoleDaoAction daoActionToTake, Map<String, String> qualifier) {
    List<RoleMemberBo> rms = new ArrayList<RoleMemberBo>();
    RoleTypeService roleTypeService = getRoleTypeService( role.getId() );
    if (roleTypeService != null) {
        List<String> attributesForExactMatch = roleTypeService.getQualifiersForExactMatch();
        if (CollectionUtils.isNotEmpty(attributesForExactMatch)) {
            switch (daoActionToTake) {
                case ROLE_GROUPS_FOR_GROUP_IDS_AND_ROLE_IDS : // Search for group role members only.
                    rms = getStoredRoleGroupsForGroupIdsAndRoleIds(Collections.singletonList(role.getId()), Collections.singletonList(memberId), populateQualifiersForExactMatch(qualifier, attributesForExactMatch));
                    break;
                case ROLE_PRINCIPALS_FOR_PRINCIPAL_ID_AND_ROLE_IDS : // Search for principal role members only.
                    rms = getStoredRolePrincipalsForPrincipalIdAndRoleIds(Collections.singletonList(role.getId()), memberId, populateQualifiersForExactMatch(qualifier, attributesForExactMatch));
                    break;
                case ROLE_MEMBERSHIPS_FOR_ROLE_IDS_AS_MEMBERS : // Search for roles as role members only.
                    List<RoleMemberBo> allRoleMembers = getStoredRoleMembershipsForRoleIdsAsMembers(Collections.singletonList(role.getId()), populateQualifiersForExactMatch(qualifier, attributesForExactMatch));
                    for(RoleMemberBo rm : allRoleMembers) {
                        if ( rm.getMemberId().equals(memberId) ) {
                            rms.add(rm);
                        }
                    }
                    break;
                default : // The daoActionToTake parameter is invalid; throw an exception.
                    throw new IllegalArgumentException("The 'daoActionToTake' parameter cannot refer to a non-role-member-related value!");
            }

        }
    }

    return rms;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:31,
代码来源:RoleServiceBase.java

示例8: getExternalizableBusinessObjectsList

点赞 2

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
/**
 * This overridden method ...
 *
 * @see org.kuali.rice.krad.service.impl.ModuleServiceBase#getExternalizableBusinessObjectsList(java.lang.Class, java.util.Map)
 */
@SuppressWarnings("unchecked")
@Override
public <T extends ExternalizableBusinessObject> List<T> getExternalizableBusinessObjectsList(
		Class<T> externalizableBusinessObjectClass, Map<String, Object> fieldValues) {
	// for Person objects (which are not real PersistableBOs) pull them through the person service

	if ( Person.class.isAssignableFrom( externalizableBusinessObjectClass ) ) {
		return (List)getPersonService().findPeople( (Map)fieldValues );
	}
       else if ( RoleContract.class.isAssignableFrom( externalizableBusinessObjectClass ) ) {
           List<Role> roles = getKimRoleService().findRoles(toQuery(fieldValues)).getResults();
           List<RoleEbo> roleEbos = new ArrayList<RoleEbo>(roles.size());
           for (Role role : roles) {
               roleEbos.add(RoleBo.from(role));
           }
           return (List<T>)roleEbos;
	} else if ( GroupContract.class.isAssignableFrom(externalizableBusinessObjectClass) ) {
		List<Group> groups = getGroupService().findGroups(toQuery(fieldValues)).getResults();
           List<GroupEbo> groupEbos = new ArrayList<GroupEbo>(groups.size());
           for (Group group : groups) {
               groupEbos.add(GroupBo.from(group));
           }
           return (List<T>)groupEbos;
	}
	// otherwise, use the default implementation
	return super.getExternalizableBusinessObjectsList( externalizableBusinessObjectClass, fieldValues );
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:33,
代码来源:KimModuleService.java

示例9: getInquiryUrl

点赞 2

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
/**
 * @see org.kuali.ole.sys.businessobject.inquiry.KfsInquirableImpl#getInquiryUrl(org.kuali.rice.krad.bo.BusinessObject, java.lang.String, boolean)
 */
@Override
public HtmlData getInquiryUrl(BusinessObject businessObject, String attributeName, boolean forceInquiry) {
    if (SecPropertyConstants.MEMBER_ID.equals(attributeName)) {
        Properties parameters = new Properties();
        parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, OLEConstants.START_METHOD);

        Map<String, String> fieldList = new HashMap<String, String>();

        String memberId = (String) ObjectUtils.getPropertyValue(businessObject, SecPropertyConstants.MEMBER_ID);
        String memberTypeCode = (String) ObjectUtils.getPropertyValue(businessObject, SecPropertyConstants.MEMBER_TYPE_CODE);

        if (StringUtils.isNotBlank(memberId) && StringUtils.isNotBlank(memberTypeCode)) {
            if (MemberType.ROLE.getCode().equals(memberTypeCode)) {
                parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, RoleEbo.class.getName());
                parameters.put(KimConstants.PrimaryKeyConstants.ROLE_ID, memberId);
                fieldList.put(KimConstants.PrimaryKeyConstants.ROLE_ID, memberId.toString());
            }
            else if (MemberType.GROUP.getCode().equals(memberTypeCode)) {
                parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, GroupEbo.class.getName());
                parameters.put(KimConstants.PrimaryKeyConstants.GROUP_ID, memberId);
                fieldList.put(KimConstants.PrimaryKeyConstants.GROUP_ID, memberId.toString());
            }
            else {
                parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, Person.class.getName());
                parameters.put(KimConstants.PrimaryKeyConstants.PRINCIPAL_ID, memberId);
                fieldList.put(KimConstants.PrimaryKeyConstants.PRINCIPAL_ID, memberId.toString());
            }

            return getHyperLink(SecurityModelDefinition.class, fieldList, UrlFactory.parameterizeUrl(KRADConstants.INQUIRY_ACTION, parameters));
        }
    }

    return super.getInquiryUrl(businessObject, attributeName, forceInquiry);
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:38,
代码来源:SecurityModelMemberInquirable.java

示例10: getInquiryUrl

点赞 2

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
/**
 * @see org.kuali.kfs.sys.businessobject.inquiry.KfsInquirableImpl#getInquiryUrl(org.kuali.rice.krad.bo.BusinessObject, java.lang.String, boolean)
 */
@Override
public HtmlData getInquiryUrl(BusinessObject businessObject, String attributeName, boolean forceInquiry) {
    if (SecPropertyConstants.MEMBER_ID.equals(attributeName)) {
        Properties parameters = new Properties();
        parameters.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KFSConstants.START_METHOD);

        Map<String, String> fieldList = new HashMap<String, String>();

        String memberId = (String) ObjectUtils.getPropertyValue(businessObject, SecPropertyConstants.MEMBER_ID);
        String memberTypeCode = (String) ObjectUtils.getPropertyValue(businessObject, SecPropertyConstants.MEMBER_TYPE_CODE);

        if (StringUtils.isNotBlank(memberId) && StringUtils.isNotBlank(memberTypeCode)) {
            if (MemberType.ROLE.getCode().equals(memberTypeCode)) {
                parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, RoleEbo.class.getName());
                parameters.put(KimConstants.PrimaryKeyConstants.ROLE_ID, memberId);
                fieldList.put(KimConstants.PrimaryKeyConstants.ROLE_ID, memberId.toString());
            }
            else if (MemberType.GROUP.getCode().equals(memberTypeCode)) {
                parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, GroupEbo.class.getName());
                parameters.put(KimConstants.PrimaryKeyConstants.GROUP_ID, memberId);
                fieldList.put(KimConstants.PrimaryKeyConstants.GROUP_ID, memberId.toString());
            }
            else {
                parameters.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, Person.class.getName());
                parameters.put(KimConstants.PrimaryKeyConstants.PRINCIPAL_ID, memberId);
                fieldList.put(KimConstants.PrimaryKeyConstants.PRINCIPAL_ID, memberId.toString());
            }

            return getHyperLink(SecurityModelDefinition.class, fieldList, UrlFactory.parameterizeUrl(KRADConstants.INQUIRY_ACTION, parameters));
        }
    }

    return super.getInquiryUrl(businessObject, attributeName, forceInquiry);
}
 

开发者ID:kuali,
项目名称:kfs,
代码行数:38,
代码来源:SecurityModelMemberInquirable.java

示例11: doAnyMemberRecordsMatchByExactQualifier

点赞 2

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
protected List<RoleMember> doAnyMemberRecordsMatchByExactQualifier( RoleEbo role, String memberId, RoleDaoAction daoActionToTake, Map<String, String> qualifier ) {
	List<RoleMemberBo> roleMemberBos = getRoleMembersByExactQualifierMatch(role, memberId, daoActionToTake, qualifier);
       List<RoleMember> roleMembers = new ArrayList<RoleMember>();
       if(CollectionUtils.isNotEmpty(roleMemberBos)) {
           for (RoleMemberBo bo : roleMemberBos) {
               roleMembers.add(RoleMemberBo.to(bo));
           }
		return roleMembers;
	}

	return Collections.emptyList();
}
 

开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:13,
代码来源:RoleServiceBase.java

示例12: getRoleMembersByExactQualifierMatch

点赞 2

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
protected List<RoleMemberBo> getRoleMembersByExactQualifierMatch(RoleEbo role, String memberId, RoleDaoAction daoActionToTake, Map<String, String> qualifier) {
	List<RoleMemberBo> rms = new ArrayList<RoleMemberBo>();
	RoleTypeService roleTypeService = getRoleTypeService( role.getId() );
	if(roleTypeService != null) {
   		List<String> attributesForExactMatch = roleTypeService.getQualifiersForExactMatch();
   		if(CollectionUtils.isNotEmpty(attributesForExactMatch)) {
   			switch (daoActionToTake) {
    			case ROLE_GROUPS_FOR_GROUP_IDS_AND_ROLE_IDS : // Search for group role members only.
        			rms = getStoredRoleGroupsForGroupIdsAndRoleIds(Collections.singletonList(role.getId()), Collections.singletonList(memberId), populateQualifiersForExactMatch(qualifier, attributesForExactMatch));
    				break;
    			case ROLE_PRINCIPALS_FOR_PRINCIPAL_ID_AND_ROLE_IDS : // Search for principal role members only.
        			rms = getStoredRolePrincipalsForPrincipalIdAndRoleIds(Collections.singletonList(role.getId()), memberId, populateQualifiersForExactMatch(qualifier, attributesForExactMatch));
    				break;
    			case ROLE_MEMBERSHIPS_FOR_ROLE_IDS_AS_MEMBERS : // Search for roles as role members only.
    				List<RoleMemberBo> allRoleMembers = getStoredRoleMembershipsForRoleIdsAsMembers(Collections.singletonList(role.getId()), populateQualifiersForExactMatch(qualifier, attributesForExactMatch));
        			for(RoleMemberBo rm : allRoleMembers) {
        				if ( rm.getMemberId().equals(memberId) ) { 
        					rms.add(rm);
        				}
        			}
                       break;
    			default : // The daoActionToTake parameter is invalid; throw an exception.
    				throw new IllegalArgumentException("The 'daoActionToTake' parameter cannot refer to a non-role-member-related value!");
   			}
   			
   		} 
	}
	return rms;
}
 

开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:30,
代码来源:RoleServiceBase.java

示例13: getTargetClass

点赞 2

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
@Override
public Class<?> getTargetClass() {
    if (targetClass == null) {
        Class propertyClass = DataDictionary.getAttributeClass(sourceClass, objectAttributeName);
        if (propertyClass == null) {
            throw new AttributeValidationException("cannot get valid class for property '" + objectAttributeName + "' as an attribute of '" + sourceClass + "'");
        }
        // RICE20 - HACK ALERT!!!! - if the property class is one of the
        // ones we use via BOs, change the type to an EBO to attempt to
        // preserve the lookups
        if ( Campus.class.isAssignableFrom(propertyClass) ) {
            LOG.error( "ALERT! : " + propertyClass.getName() + " Reference Unconverted to Ebo class: " + sourceClass.getName() + "." + objectAttributeName );
            propertyClass = CampusEbo.class;
        } else if ( State.class.isAssignableFrom(propertyClass) ) {
            LOG.error( "ALERT! : " + propertyClass.getName() + " Reference Unconverted to Ebo class: " + sourceClass.getName() + "." + objectAttributeName );
            propertyClass = StateEbo.class;
        } else if ( PostalCode.class.isAssignableFrom(propertyClass) ) {
            LOG.error( "ALERT! : " + propertyClass.getName() + " Reference Unconverted to Ebo class: " + sourceClass.getName() + "." + objectAttributeName );
            propertyClass = PostalCodeEbo.class;
        } else if ( Country.class.isAssignableFrom(propertyClass) ) {
            LOG.error( "ALERT! : " + propertyClass.getName() + " Reference Unconverted to Ebo class: " + sourceClass.getName() + "." + objectAttributeName );
            propertyClass = CountryEbo.class;
        } else if ( County.class.isAssignableFrom(propertyClass) ) {
            LOG.error( "ALERT! : " + propertyClass.getName() + " Reference Unconverted to Ebo class: " + sourceClass.getName() + "." + objectAttributeName );
            propertyClass = CountyEbo.class;
        } else if ( Role.class.isAssignableFrom(propertyClass) ) {
            LOG.error( "ALERT! : " + propertyClass.getName() + " Reference Unconverted to Ebo class: " + sourceClass.getName() + "." + objectAttributeName );
            propertyClass = RoleEbo.class;
        } else if ( Group.class.isAssignableFrom(propertyClass) ) {
            LOG.error( "ALERT! : " + propertyClass.getName() + " Reference Unconverted to Ebo class: " + sourceClass.getName() + "." + objectAttributeName );
            propertyClass = GroupEbo.class;
        } else {
            if (!BusinessObject.class.isAssignableFrom(propertyClass)) {
                throw new AttributeValidationException("property '" + objectAttributeName + "' is not a BusinessObject (" + propertyClass.getName() + ") on sourceClass (" + sourceClass +")");
            }
        }


        targetClass = propertyClass;
    }
    return targetClass;
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:43,
代码来源:KfsRelationshipDefinition.java

示例14: getRole

点赞 1

import org.kuali.rice.kim.framework.role.RoleEbo; //导入依赖的package包/类
/**
 * Gets the role attribute.
 * @return Returns the role.
 */
public RoleEbo getRole() {
    return role;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:8,
代码来源:TestReviewRole.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)