本文整理汇总了Java中org.kuali.rice.kim.impl.KIMPropertyConstants类的典型用法代码示例。如果您正苦于以下问题:Java KIMPropertyConstants类的具体用法?Java KIMPropertyConstants怎么用?Java KIMPropertyConstants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
KIMPropertyConstants类属于org.kuali.rice.kim.impl包,在下文中一共展示了KIMPropertyConstants类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: performSearch
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
@Override
public Collection<?> performSearch(LookupForm form, Map<String, String> searchCriteria, boolean bounded) {
// removed blank search values and decrypt any encrypted search values
Map<String, String> nonBlankSearchCriteria = processSearchCriteria(form, searchCriteria);
List<String> wildcardAsLiteralSearchCriteria = identifyWildcardDisabledFields(form, nonBlankSearchCriteria);
Integer searchResultsLimit = null;
if (bounded) {
searchResultsLimit = LookupUtils.getSearchResultsLimit(getDataObjectClass(), form);
}
Class<?> dataObjectClass = null;
if ("P".equals(MapUtils.getString(searchCriteria, KIMPropertyConstants.KimMember.MEMBER_TYPE_CODE))) {
dataObjectClass = PrincipalBo.class;
} else if ("G".equals(MapUtils.getString(searchCriteria, KIMPropertyConstants.KimMember.MEMBER_TYPE_CODE))) {
dataObjectClass = GroupBo.class;
} else if ("R".equals(MapUtils.getString(searchCriteria, KIMPropertyConstants.KimMember.MEMBER_TYPE_CODE))) {
dataObjectClass = RoleBo.class;
}
return getLookupService().findCollectionBySearchHelper(dataObjectClass, nonBlankSearchCriteria,
wildcardAsLiteralSearchCriteria, !bounded, searchResultsLimit);
}
示例2: getRoleMembersForPrincipalId
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
protected List<RoleMemberBo> getRoleMembersForPrincipalId(Collection<String> roleIds, String principalId, Map<String,String> qualification ) {
List<Predicate> criteria = new ArrayList<Predicate>();
if (CollectionUtils.isNotEmpty(roleIds)) {
if (roleIds.size() == 1) {
criteria.add( PredicateFactory.equal(KIMPropertyConstants.RoleMember.ROLE_ID, roleIds.iterator().next()) );
} else {
criteria.add( PredicateFactory.in(KIMPropertyConstants.RoleMember.ROLE_ID, roleIds) );
}
}
if ( StringUtils.isNotBlank(principalId) ) {
criteria.add( PredicateFactory.equal(KIMPropertyConstants.RoleMember.MEMBER_ID, principalId) );
}
criteria.add( PredicateFactory.equal(KIMPropertyConstants.RoleMember.MEMBER_TYPE_CODE, MemberType.PRINCIPAL.getCode()));
Predicate roleQualificationPredicate = getRoleQualificationPredicate(qualification);
if ( roleQualificationPredicate != null ) {
criteria.add( roleQualificationPredicate );
}
return getRoleMembershipsForPredicates(criteria);
}
示例3: getRoleMembersForGroupIds
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
protected List<RoleMemberBo> getRoleMembersForGroupIds(String roleId, List<String> groupIds) {
if (CollectionUtils.isEmpty(groupIds)) {
return new ArrayList<RoleMemberBo>();
}
List<RoleMemberBo> coll = getDataObjectService().findMatching( RoleMemberBo.class,
QueryByCriteria.Builder.fromPredicates(
PredicateFactory.equal(KIMPropertyConstants.RoleMember.ROLE_ID, roleId),
PredicateFactory.equal(KIMPropertyConstants.RoleMember.MEMBER_TYPE_CODE, MemberType.GROUP.getCode()),
PredicateFactory.in(KIMPropertyConstants.RoleMember.MEMBER_ID, groupIds) ) ).getResults();
List<RoleMemberBo> results = new ArrayList<RoleMemberBo>(coll.size());
DateTime now = new DateTime( getDateTimeService().getCurrentTimestamp().getTime() );
for (RoleMemberBo rm : coll) {
if (rm.isActive(now)) {
results.add(rm);
}
}
return results;
}
示例4: getRoleGroupsForGroupIdsAndRoleIds
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
public List<RoleMemberBo> getRoleGroupsForGroupIdsAndRoleIds(Collection<String> roleIds, Collection<String> groupIds, Map<String, String> qualification) {
List<Predicate> criteria = new ArrayList<Predicate>();
if (CollectionUtils.isNotEmpty(roleIds)) {
criteria.add( PredicateFactory.in(KIMPropertyConstants.RoleMember.ROLE_ID, roleIds) );
}
if (CollectionUtils.isNotEmpty(groupIds)) {
criteria.add( PredicateFactory.in(KIMPropertyConstants.RoleMember.MEMBER_ID, groupIds) );
}
criteria.add( PredicateFactory.equal(KIMPropertyConstants.RoleMember.MEMBER_TYPE_CODE, MemberType.GROUP.getCode()));
Predicate roleQualificationPredicate = getRoleQualificationPredicate(qualification);
if ( roleQualificationPredicate != null ) {
criteria.add( roleQualificationPredicate );
}
return getRoleMembershipsForPredicates(criteria);
}
示例5: getRoleMembershipsForRoleIdsAsMembers
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
protected List<RoleMemberBo> getRoleMembershipsForRoleIdsAsMembers(Collection<String> roleIds,
Map<String, String> qualification) {
List<Predicate> criteria = new ArrayList<Predicate>();
if (CollectionUtils.isNotEmpty(roleIds)) {
criteria.add( PredicateFactory.in(KIMPropertyConstants.RoleMember.ROLE_ID, roleIds) );
}
criteria.add( PredicateFactory.equal(KIMPropertyConstants.RoleMember.MEMBER_TYPE_CODE, MemberType.ROLE.getCode()));
Predicate roleQualificationPredicate = getRoleQualificationPredicate(qualification);
if ( roleQualificationPredicate != null ) {
criteria.add( roleQualificationPredicate );
}
return getRoleMembershipsForPredicates(criteria);
}
示例6: getRoleMembershipsForMemberId
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
protected List<RoleMemberBo> getRoleMembershipsForMemberId(String memberType, String memberId, Map<String, String> qualification) {
if (StringUtils.isBlank(memberId) || StringUtils.isBlank(memberType)) {
return new ArrayList<RoleMemberBo>(0);
}
List<Predicate> criteria = new ArrayList<Predicate>();
criteria.add( PredicateFactory.equal(KIMPropertyConstants.RoleMember.MEMBER_ID, memberId) );
criteria.add( PredicateFactory.equal(KIMPropertyConstants.RoleMember.MEMBER_TYPE_CODE, memberType) );
Predicate roleQualificationPredicate = getRoleQualificationPredicate(qualification);
if ( roleQualificationPredicate != null ) {
criteria.add( roleQualificationPredicate );
}
return getRoleMembershipsForPredicates(criteria);
}
示例7: getStoredDelegationImplMapFromRoleIds
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
/**
*
*/
protected Map<String, DelegateTypeBo> getStoredDelegationImplMapFromRoleIds(Collection<String> roleIds) {
if (roleIds != null && !roleIds.isEmpty()) {
Map<String, DelegateTypeBo> results = new HashMap<String, DelegateTypeBo>();
Collection<DelegateTypeBo> coll = getDataObjectService().findMatching(DelegateTypeBo.class,
QueryByCriteria.Builder.fromPredicates(
PredicateFactory.in(KIMPropertyConstants.Delegation.ROLE_ID, roleIds),
PredicateFactory.equal(KIMPropertyConstants.Delegation.ACTIVE, Boolean.TRUE) ) ).getResults();
for (DelegateTypeBo delegateBo : coll) {
results.put(delegateBo.getDelegationId(), delegateBo);
}
return results;
}
return Collections.emptyMap();
}
示例8: isDirectMemberOfGroup
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
@Override
public boolean isDirectMemberOfGroup(String principalId, String groupId) throws RiceIllegalArgumentException {
incomingParamCheck(principalId, "principalId");
incomingParamCheck(groupId, "groupId");
final QueryByCriteria.Builder builder = QueryByCriteria.Builder.create();
builder.setPredicates(
and(
equal(KIMPropertyConstants.GroupMember.MEMBER_ID, principalId),
equal(KIMPropertyConstants.GroupMember.MEMBER_TYPE_CODE, KimConstants.KimGroupMemberTypes.PRINCIPAL_MEMBER_TYPE.getCode()),
equal(KIMPropertyConstants.GroupMember.GROUP_ID, groupId),
HistoryQueryUtils.between(KIMPropertyConstants.KimMember.ACTIVE_FROM_DATE_VALUE, KIMPropertyConstants.KimMember.ACTIVE_TO_DATE_VALUE, DateTime.now()))
);
QueryResults<GroupMemberBo> groupMembers = dataObjectService.findMatching(GroupMemberBo.class, builder.build());
return (groupMembers.getResults().size() > 0);
}
示例9: getDirectParentGroups
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
protected List<Group> getDirectParentGroups(String groupId, DateTime asOfDate) {
incomingParamCheck(groupId, "groupId");
final QueryByCriteria.Builder builder = QueryByCriteria.Builder.create();
builder.setPredicates(
and(
equal(KIMPropertyConstants.GroupMember.MEMBER_ID, groupId),
equal(KIMPropertyConstants.GroupMember.MEMBER_TYPE_CODE, KimConstants.KimGroupMemberTypes.GROUP_MEMBER_TYPE.getCode()),
HistoryQueryUtils.between(KIMPropertyConstants.KimMember.ACTIVE_FROM_DATE_VALUE,
KIMPropertyConstants.KimMember.ACTIVE_TO_DATE_VALUE, asOfDate)));
List<GroupMember> groupMembers = findGroupMembers(builder.build()).getResults();
Set<String> matchingGroupIds = new HashSet<String>();
// filter to active groups
for ( GroupMember gm : groupMembers ) {
matchingGroupIds.add(gm.getGroupId());
}
if (CollectionUtils.isNotEmpty(matchingGroupIds)) {
return getGroups(matchingGroupIds);
}
return Collections.emptyList();
}
示例10: getPrincipalByPrincipalNameAndPassword
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
@Override
public Principal getPrincipalByPrincipalNameAndPassword(String principalName,
String password) throws RiceIllegalArgumentException {
incomingParamCheck(principalName, "principalName");
incomingParamCheck(password, "password");
Map<String, Object> criteria = new HashMap<String, Object>(3);
criteria.put(KIMPropertyConstants.Principal.PRINCIPAL_NAME, principalName);
criteria.put(KIMPropertyConstants.Principal.PASSWORD, password);
criteria.put(KIMPropertyConstants.Principal.ACTIVE, Boolean.TRUE);
QueryResults<PrincipalBo> principals = dataObjectService.findMatching(PrincipalBo.class,
QueryByCriteria.Builder.andAttributes(criteria).build());
if (!principals.getResults().isEmpty()) {
return PrincipalBo.to(principals.getResults().get(0));
}
return null;
}
示例11: getPrincipalsByEntityId
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
@Override
public List<Principal> getPrincipalsByEntityId(String entityId) throws RiceIllegalArgumentException {
incomingParamCheck(entityId, "entityId");
List<Principal> principals = new ArrayList<Principal>();
Map<String, Object> criteria = new HashMap<String, Object>(1);
criteria.put(KIMPropertyConstants.Person.ENTITY_ID, entityId);
QueryResults<PrincipalBo> principalBos = dataObjectService.findMatching(PrincipalBo.class,
QueryByCriteria.Builder.andAttributes(criteria).build());
if (!principalBos.getResults().isEmpty()) {
for (PrincipalBo principalBo : principalBos.getResults()) {
Principal principal = PrincipalBo.to(principalBo);
principals.add(principal);
}
return principals;
}
return null;
}
示例12: getEntityCitizenshipBo
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
protected EntityCitizenshipBo getEntityCitizenshipBo(String entityId, String citizenshipStatusCode) {
if (StringUtils.isEmpty(entityId) || StringUtils.isEmpty(citizenshipStatusCode)) {
return null;
}
Map<String, Object> criteria = new HashMap<String, Object>(4);
criteria.put(KIMPropertyConstants.Entity.ENTITY_ID, entityId);
criteria.put("statusCode", citizenshipStatusCode);
criteria.put(KIMPropertyConstants.Entity.ACTIVE, Boolean.TRUE);
List<EntityCitizenshipBo> results = dataObjectService.findMatching(EntityCitizenshipBo.class,
QueryByCriteria.Builder.andAttributes(criteria).build()).getResults();
if (results.isEmpty()) {
return null;
}
return results.get(0);
}
示例13: getEntityNameBo
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
protected EntityNameBo getEntityNameBo(String entityId, String nameTypeCode) {
if (StringUtils.isEmpty(entityId) || StringUtils.isEmpty(nameTypeCode)) {
return null;
}
Map<String, Object> criteria = new HashMap<String, Object>();
criteria.put(KIMPropertyConstants.Entity.ENTITY_ID, entityId);
criteria.put("nameCode", nameTypeCode);
criteria.put(KIMPropertyConstants.Entity.ACTIVE, Boolean.TRUE);
List<EntityNameBo> results = dataObjectService.findMatching(EntityNameBo.class,
QueryByCriteria.Builder.andAttributes(criteria).build()).getResults();
if (results.isEmpty()) {
return null;
}
return results.get(0);
}
示例14: getEntityEmploymentBo
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
protected EntityEmploymentBo getEntityEmploymentBo(String entityId, String employmentTypeCode,
String employmentStatusCode, String employmentAffiliationId) {
if (StringUtils.isEmpty(entityId) || StringUtils.isEmpty(employmentTypeCode) || StringUtils.isEmpty(
employmentStatusCode) || StringUtils.isEmpty(employmentAffiliationId)) {
return null;
}
Map<String, Object> criteria = new HashMap<String, Object>();
criteria.put(KIMPropertyConstants.Entity.ENTITY_ID, entityId);
criteria.put("employeeTypeCode", employmentTypeCode);
criteria.put("employeeStatusCode", employmentStatusCode);
criteria.put("entityAffiliationId", employmentAffiliationId);
criteria.put(KIMPropertyConstants.Entity.ACTIVE, Boolean.TRUE);
List<EntityEmploymentBo> results = dataObjectService.findMatching(EntityEmploymentBo.class,
QueryByCriteria.Builder.andAttributes(criteria).build()).getResults();
if (results.isEmpty()) {
return null;
}
return results.get(0);
}
示例15: getPersonByEmployeeId
import org.kuali.rice.kim.impl.KIMPropertyConstants; //导入依赖的package包/类
@Override
public Person getPersonByEmployeeId(String employeeId) {
if ( StringUtils.isBlank( employeeId ) ) {
return null;
}
final List<Person> people = findPeople(Collections.singletonMap(KIMPropertyConstants.Person.EMPLOYEE_ID,
employeeId));
if ( !people.isEmpty() ) {
return people.get(0);
}
// If no person was found above, check for inactive records
EntityDefault entity = getIdentityService().getEntityDefaultByEmployeeId(employeeId);
if (entity != null) {
if ( !entity.getPrincipals().isEmpty() ) {
Principal principal = getIdentityService().getPrincipal(entity.getPrincipals().get(0).getPrincipalId());
if (principal != null) {
return convertEntityToPerson( entity, principal );
}
}
}
return null;
}