public class MemberFinder extends Object
Use this class to find members within the Groups registry
Sample call
Setmembers = MemberFinder.findAll(grouperSession, gsaSource);
Sample call to find members by attribute def names
Setmembers = new MemberFinder().assignNameOfAttributeDefName(attributeDefName.getName()) .assignAttributeCheckReadOnAttributeDef(true).assignQueryOptions(QueryOptions.create("subjectId", true, null, null)).findMembers();
| Constructor and Description |
|---|
MemberFinder()
constructor
|
| Modifier and Type | Method and Description |
|---|---|
MemberFinder |
addAttributeValuesOnAssignment(Object value)
if looking for an attribute value on an assignment, could be multiple values
|
MemberFinder |
addAttributeValuesOnAssignment2(Object value)
if looking for an attribute value on an assignment2, could be multiple values
|
MemberFinder |
assignAttributeCheckReadOnAttributeDef(boolean theAttributeDefNameUseSecurity)
use security around attribute def? default is true
|
MemberFinder |
assignAttributeValue(Object theValue)
find objects with this value
|
MemberFinder |
assignAttributeValue2(Object theValue)
find objects with this value2
|
MemberFinder |
assignAttributeValuesOnAssignment(Set<Object> theValues)
if looking for an attribute value on an assignment, could be multiple values
|
MemberFinder |
assignAttributeValuesOnAssignment2(Set<Object> theValues)
if looking for an attribute value on an assignment2, could be multiple values
|
MemberFinder |
assignIdOfAttributeDefName(String theAttributeDefNameId)
find groups that have this attribute def name id, note could be an assignment on an assignment
|
MemberFinder |
assignIdOfAttributeDefName2(String theAttributeDefNameId)
find groups that have this attribute def name id, note could be an assignment on an assignment
|
MemberFinder |
assignNameOfAttributeDefName(String theNameOfAttributeDefName)
find groups that have this attribute assigned
|
MemberFinder |
assignNameOfAttributeDefName2(String theNameOfAttributeDefName)
find groups that have this attribute assigned
|
MemberFinder |
assignQueryOptions(QueryOptions theQueryOptions)
if sorting, paging, caching, etc
|
static void |
clearInternalMembers()
Grouper internal method only
|
static Member |
find(String sourceId,
String subjectId,
String subjectIdentifier,
String subjectIdOrIdentifier,
String memberId)
might want to make sure the user is root before doing this
|
static Set |
findAll(GrouperSession s)
Find all members.
|
static Set<Member> |
findAll(GrouperSession s,
Source source)
Find all members by source.
|
static Set<Member> |
findAllUsed(GrouperSession grouperSession,
Source source)
Find all members by source used somewhere, e.g.
|
static Member |
findBySubject(GrouperSession s,
Subject subj)
Deprecated.
use overload
|
static Member |
findBySubject(GrouperSession s,
Subject subj,
boolean createIfNotExist)
|
static Member |
findBySubject(GrouperSession s,
Subject subj,
boolean createIfNotExist,
QueryOptions queryOptions)
|
static Set<Member> |
findBySubjects(Collection<Subject> subjects,
boolean createIfNotExists)
convert a set of subjects to a set of members
|
static Set<Member> |
findBySubjectsInGroup(GrouperSession grouperSession,
Set<Subject> subjects,
Group group,
Field field,
MembershipType membershipType)
convert a set of subjects to a set of members
|
static Member |
findByUuid(GrouperSession s,
String uuid)
Deprecated.
|
static Member |
findByUuid(GrouperSession s,
String uuid,
boolean exceptionIfNotFound)
Get a member by UUID.
|
Set<Member> |
findMembers()
find members
|
static Member |
internal_createMember(Subject subj,
String memberUuidIfCreate)
Grouper internal method only
|
static Member |
internal_findAllMember()
Grouper internal method only
|
static Member |
internal_findBySubject(Subject subj,
String uuidIfCreate,
boolean createIfNotExist)
Grouper internal method only
|
static Member |
internal_findBySubject(Subject subj,
String uuidIfCreate,
boolean createIfNotExist,
QueryOptions queryOptions)
Grouper internal method only
|
static Set<Member> |
internal_findMembersByType(GrouperSession grouperSession,
Group group,
Field field,
String type,
Set<Source> sources,
QueryOptions queryOptions,
SortStringEnum memberSortStringEnum,
SearchStringEnum memberSearchStringEnum,
String memberSearchStringValue)
Grouper internal method only
|
static Member |
internal_findOrCreateBySubject(String id,
String src,
String type)
Grouper internal method only
|
static Member |
internal_findReadableMemberBySubject(GrouperSession grouperSession,
Subject subject,
boolean exceptionIfNotExist)
Grouper internal method only
|
static Member |
internal_findRootMember()
Grouper internal method only
|
static Member |
internal_findViewableMemberBySubject(GrouperSession s,
Subject subj,
boolean exceptionIfNotExist)
Grouper internal method only
|
static void |
memberCreatedCacheDelete(String sourceId,
String subjectId)
Grouper internal method only
|
public Set<Member> findMembers()
public MemberFinder addAttributeValuesOnAssignment(Object value)
theValues - public MemberFinder addAttributeValuesOnAssignment2(Object value)
value - public MemberFinder assignAttributeCheckReadOnAttributeDef(boolean theAttributeDefNameUseSecurity)
theAttributeDefNameUseSecurity - public MemberFinder assignAttributeValue(Object theValue)
theValue - public MemberFinder assignAttributeValue2(Object theValue)
theValue - public MemberFinder assignAttributeValuesOnAssignment(Set<Object> theValues)
theValues - public MemberFinder assignAttributeValuesOnAssignment2(Set<Object> theValues)
theValues - public MemberFinder assignIdOfAttributeDefName(String theAttributeDefNameId)
theAttributeDefNameId - public MemberFinder assignIdOfAttributeDefName2(String theAttributeDefNameId)
theAttributeDefNameId - public MemberFinder assignNameOfAttributeDefName(String theNameOfAttributeDefName)
theNameOfAttributeDefName - public MemberFinder assignNameOfAttributeDefName2(String theNameOfAttributeDefName)
theNameOfAttributeDefName - public MemberFinder assignQueryOptions(QueryOptions theQueryOptions)
theQueryOptions - public static Set findAll(GrouperSession s) throws GrouperException
Set members = MemberFinder.findAll(s);
s - Find all members within this session context.Set of Member objects.GrouperExceptionpublic static Set<Member> findAllUsed(GrouperSession grouperSession, Source source) throws GrouperException
Set members = MemberFinder.findAllUsed(s, source);
grouperSession - Find all members within this session context.source - Find all members with this source.Set of Member objects.GrouperExceptionpublic static Set<Member> findAll(GrouperSession s, Source source) throws GrouperException
Set members = MemberFinder.findAll(s, source);
s - Find all members within this session context.source - Find all members with this source.Set of Member objects.GrouperExceptionpublic static Set<Member> internal_findMembersByType(GrouperSession grouperSession, Group group, Field field, String type, Set<Source> sources, QueryOptions queryOptions, SortStringEnum memberSortStringEnum, SearchStringEnum memberSearchStringEnum, String memberSearchStringValue)
Grouper internal method only
make sure allowed to see them, and find the membersgrouperSession - group - field - type - sources - queryOptions - memberSortStringEnum - memberSearchStringEnum - memberSearchStringValue - @Deprecated public static Member findBySubject(GrouperSession s, Subject subj)
public static Set<Member> findBySubjectsInGroup(GrouperSession grouperSession, Set<Subject> subjects, Group group, Field field, MembershipType membershipType)
grouperSession - subjects - to convert to membersgroup - that subjects must be infield - that they must be in in the group (null will default to eh members listmembershipType - that they must be in in the group or null for anypublic static Set<Member> findBySubjects(Collection<Subject> subjects, boolean createIfNotExists)
subjects - to convert to memberscreateIfNotExists - group - that subjects must be infield - that they must be in in the group (null will default to eh members listmembershipType - that they must be in in the group or null for anypublic static Member find(String sourceId, String subjectId, String subjectIdentifier, String subjectIdOrIdentifier, String memberId)
sourceId - subjectId - subjectIdentifier - subjectIdOrIdentifier - memberId - public static Member findBySubject(GrouperSession s, Subject subj, boolean createIfNotExist)
public static Member findBySubject(GrouperSession s, Subject subj, boolean createIfNotExist, QueryOptions queryOptions)
@Deprecated public static Member findByUuid(GrouperSession s, String uuid) throws MemberNotFoundException
// Get a member by uuid.
try {
Member m = MemberFind.findByUuid(s, uuid);
}
catch (MemberNotFoundException e) {
// Member not found
}
s - Get Member within this session context.uuid - Get Member with this UUID.Member object.MemberNotFoundExceptionpublic static Member findByUuid(GrouperSession s, String uuid, boolean exceptionIfNotFound) throws MemberNotFoundException
// Get a member by uuid. Member m = MemberFind.findByUuid(s, uuid, false);
s - Get Member within this session context.uuid - Get Member with this UUID.exceptionIfNotFound - true to throw exception if not foundMember object.MemberNotFoundExceptionpublic static Member internal_findAllMember() throws GrouperException
Grouper internal method only
GrouperExceptionpublic static Member internal_findRootMember() throws GrouperException
Grouper internal method only
GrouperExceptionpublic static Member internal_findBySubject(Subject subj, String uuidIfCreate, boolean createIfNotExist)
Grouper internal method only
find a member, perhaps create a new one if not theresubj - uuidIfCreate - uuid to use if creatingcreateIfNotExist - public static Member internal_findBySubject(Subject subj, String uuidIfCreate, boolean createIfNotExist, QueryOptions queryOptions)
Grouper internal method only
find a member, perhaps create a new one if not theresubj - uuidIfCreate - uuid to use if creatingcreateIfNotExist - public static Member internal_findOrCreateBySubject(String id, String src, String type)
Grouper internal method only
find a memberid - src - type - public static void memberCreatedCacheDelete(String sourceId, String subjectId)
Grouper internal method only
sourceId - subjectId - public static Member internal_createMember(Subject subj, String memberUuidIfCreate)
Grouper internal method only
create a membersubj - memberUuidIfCreate - public static Member internal_findViewableMemberBySubject(GrouperSession s, Subject subj, boolean exceptionIfNotExist) throws InsufficientPrivilegeException, MemberNotFoundException
Grouper internal method only
s - subj - exceptionIfNotExist - InsufficientPrivilegeExceptionMemberNotFoundExceptionpublic static Member internal_findReadableMemberBySubject(GrouperSession grouperSession, Subject subject, boolean exceptionIfNotExist) throws MemberNotFoundException, InsufficientPrivilegeException
Grouper internal method only
find a member object and if group, make sure it is readablegrouperSession - subject - exceptionIfNotExist - MemberNotFoundExceptionInsufficientPrivilegeExceptionpublic static void clearInternalMembers()
Grouper internal method only
Copyright © 2016 Internet2. All rights reserved.