public class MembershipFinder extends Object
Use this class to find memberships within the Groups registry
A membership is the object which represents a join of member and group. Has metadata like type and creator, and, if an effective membership, the parent membership
Sample call
Membership membership1 = new MembershipFinder().addGroup(group1).addSubject(subject).assignEnabled(true).findMembership(true);
Sample call to find multiple memberships
Set
Constructor and Description |
---|
MembershipFinder() |
Modifier and Type | Method and Description |
---|---|
MembershipFinder |
addAttributeDef(AttributeDef attributeDef)
add a attributeDef to look for.
|
MembershipFinder |
addAttributeDef(String name)
add a attributeDef to look for by name.
|
MembershipFinder |
addAttributeDefId(String attributeDefId)
add a attributeDef id to the search criteria
|
MembershipFinder |
addField(Field field)
add a field to filter by
|
MembershipFinder |
addField(String name)
add a field to filter by
|
MembershipFinder |
addGroup(Group group)
add a role to look for.
|
MembershipFinder |
addGroup(String name)
add a role to look for by name.
|
MembershipFinder |
addGroupId(String groupId)
add a role id to the search criteria
|
MembershipFinder |
addMemberId(String memberId)
add a member id to the search criteria
|
MembershipFinder |
addMembershipId(String membershipId)
add a membership id to the search criteria
|
MembershipFinder |
addPrivilegeTheUserHas(Privilege field)
add a privilege the user has for group query
|
MembershipFinder |
addPrivilegeTheUserHas(String name)
add a privilege the user has for group query
|
MembershipFinder |
addSource(Source source)
add a source to the search criteria
|
MembershipFinder |
addSourceId(String sourceId)
add a sourceId to the search criteria
|
MembershipFinder |
addStem(Stem stem)
add a stem to look for.
|
MembershipFinder |
addStem(String name)
add a stem to look for by name.
|
MembershipFinder |
addStemId(String stemId)
add a stem id to the search criteria
|
MembershipFinder |
addSubject(Subject subject)
add a subject to look for.
|
MembershipFinder |
addSubjects(Collection<Subject> subjects)
add subjects
|
MembershipFinder |
assignAttributeDefIds(Collection<String> theAttributeDefIds)
assign a collection of attributeDef ids to look for
|
MembershipFinder |
assignCheckSecurity(boolean shouldCheckSecurity)
assign if this should check security or run as grouper system
|
MembershipFinder |
assignCustomCompositeGroup(Group theCustomCompositeGroup)
if we are are doing a custom composite, this is the group
|
MembershipFinder |
assignCustomCompositeType(CompositeType theCustomCompositeType)
if we are are doing a custom composite, this is the composite type (intersection or complement)
|
MembershipFinder |
assignEnabled(Boolean theEnabled)
true means enabled only, false, means disabled only, and null means all
|
MembershipFinder |
assignField(Field theField)
assign a field to filter by
|
MembershipFinder |
assignFieldName(String theFieldOrPrivilegeName)
assign a field to filter by, or a privilege name
|
MembershipFinder |
assignFields(Collection<Field> theFields)
assign a collection of fields to look for
|
MembershipFinder |
assignFieldsByName(Collection<String> theFieldNames)
assign a collection of fields to look for
|
MembershipFinder |
assignFieldType(FieldType theFieldType)
assign a field type, mutually exclusive with fieldId
|
MembershipFinder |
assignFindAllFields(boolean theFindAllFields)
if true then find all fields in all membership and priv owners
|
MembershipFinder |
assignGroupIds(Collection<String> theGroupIds)
assign a collection of group ids to look for
|
MembershipFinder |
assignHasDisabledDate(Boolean theHasDisabledDate)
true means memberships with disabled dates
false means memberships without disabled dates
null means don't filter based on this (default)
|
MembershipFinder |
assignHasEnabledDate(Boolean theHasEnabledDate)
true means memberships with enabled dates
false means memberships without enabled dates
null means don't filter based on this (default)
|
MembershipFinder |
assignHasFieldForAttributeDef(boolean theHasFieldForAttributeDef)
return memberships where the attributeDef has this field, note, it will return all the memberships for those attributeDefs
|
MembershipFinder |
assignHasFieldForGroup(boolean theHasFieldForGroup)
return memberships where the group has this field, note, it will return all the memberships for those members
|
MembershipFinder |
assignHasFieldForMember(boolean theHasField)
return memberships where the member has this field, note, it will return all the memberships for those members
|
MembershipFinder |
assignHasFieldForStem(boolean theHasFieldForStem)
return memberships where the stem has this field, note, it will return all the memberships for those stems
|
MembershipFinder |
assignHasMembershipTypeForAttributeDef(boolean theHasMembershipTypeForAttributeDef)
return memberships where the attributeDef has this field, note, it will return all the memberships for those attributeDefs
|
MembershipFinder |
assignHasMembershipTypeForGroup(boolean theHasMembershipTypeForGroup)
return memberships where the group has this field, note, it will return all the memberships for those groups
|
MembershipFinder |
assignHasMembershipTypeForMember(boolean theHasMembershipType)
return memberships where the member has this field, note, it will return all the memberships for those members
|
MembershipFinder |
assignHasMembershipTypeForStem(boolean theHasMembershipTypeForStem)
return memberships where the stem has this field, note, it will return all the memberships for those stems
|
MembershipFinder |
assignIncludeInheritedPrivileges(boolean theIncludeInheritedPrivileges)
if inherited effective privileges should be included.
|
MembershipFinder |
assignMemberIds(Collection<String> theMemberIds)
assign a collection of member ids to look for
|
MembershipFinder |
assignMembershipIds(Collection<String> theMembershipIds)
assign a collection of membership ids to look for
|
MembershipFinder |
assignMembershipType(MembershipType theMembershipType)
assign a membership type
|
MembershipFinder |
assignPointInTimeFrom(Timestamp pointInTimeFrom1)
if searching point in time data, the start of the range of the point in time query.
|
MembershipFinder |
assignPointInTimeTo(Timestamp pointInTimeTo1)
if searching point in time data, the end of the range of the point in time query.
|
MembershipFinder |
assignPrivileges(Collection<Privilege> thePrivileges)
assign a collection of privileges (fields) to look for
|
MembershipFinder |
assignPrivilegesTheUserHas(Collection<Privilege> thePrivilegesTheUserHas)
assign a collection of fields to look for the user has for groups
|
MembershipFinder |
assignPrivilegesTheUserHasByName(Collection<String> thePrivilegeNamesOfPrivilegesTheUserHas)
assign a collection of fields to look for the user has for groups
|
MembershipFinder |
assignQueryOptionsForAttributeDef(QueryOptions theQueryOptionsForAttributeDef)
query options for attributeDef.
|
MembershipFinder |
assignQueryOptionsForGroup(QueryOptions theQueryOptionsForGroup)
query options for group.
|
MembershipFinder |
assignQueryOptionsForMember(QueryOptions theQueryOptions) |
MembershipFinder |
assignQueryOptionsForMembership(QueryOptions theQueryOptions) |
MembershipFinder |
assignQueryOptionsForStem(QueryOptions theQueryOptionsForStem)
query options for stem.
|
MembershipFinder |
assignRoleIds(Collection<String> theRoleIds)
assign a collection of role ids to look for
|
MembershipFinder |
assignScope(String scope1)
sql like string to limit the results of the owner
|
MembershipFinder |
assignScopeForAttributeDef(String theScopeForAttributeDef)
if paging for attributeDef, then also filter for group
|
MembershipFinder |
assignScopeForGroup(String theScopeForGroup)
if paging for group, then also filter for member
|
MembershipFinder |
assignScopeForMember(String theFilterForMember)
if paging for member, then also filter for member
|
MembershipFinder |
assignScopeForStem(String theScopeForStem)
if paging for stem, then also filter for stem
|
MembershipFinder |
assignServiceId(String serviceId1)
if filtering by service role, this is the service id (id of the attributeDefName for service
|
MembershipFinder |
assignServiceRole(ServiceRole serviceRole1)
if filtering by service role, this is the service id (id of the attributeDefName for service
|
MembershipFinder |
assignSources(Set<Source> theSources)
assign a collection of sources to look for
|
MembershipFinder |
assignSplitScopeForAttributeDef(boolean theSplitScopeForAttributeDef)
if the scope for attributeDef has spaces in it, then split by whitespace, and find results that contain all of the scope strings
|
MembershipFinder |
assignSplitScopeForGroup(boolean theSplitScopeForGroup)
if the scope for group has spaces in it, then split by whitespace, and find results that contain all of the scope strings
|
MembershipFinder |
assignSplitScopeForMember(boolean theSplitScopeForMember)
if the scope for member has spaces in it, then split by whitespace, and find results that contain all of the scope strings
|
MembershipFinder |
assignSplitScopeForStem(boolean theSplitScopeForStem)
if the scope for stem has spaces in it, then split by whitespace, and find results that contain all of the scope strings
|
MembershipFinder |
assignStem(Stem theStem)
assign a stem to search in
|
MembershipFinder |
assignStemIds(Collection<String> theStemIds)
assign a collection of stem ids to look for
|
MembershipFinder |
assignStemScope(Stem.Scope theStemScope)
assign a stem scope to look in
|
MembershipFinder |
assignSubjectHasMembershipForGroup(Subject theSubjectHasMembershipForGroup)
if the subject has a membership in the group
|
static Set<MembershipSubjectContainer> |
findAllImmediateMemberhipSubjectContainers(GrouperSession grouperSession,
Subject subject)
Find all the membership subject containers for a given subject
|
static Set<Object[]> |
findAttributeDefMemberships(Collection<String> attributeDefIds,
Collection<String> memberIds,
Collection<String> membershipIds,
MembershipType membershipType,
Field field,
Set<Source> sources,
String scope,
Stem stem,
Stem.Scope stemScope,
Boolean enabled,
Boolean shouldCheckSecurity) |
static Membership |
findByUuid(GrouperSession grouperSession,
String uuid,
boolean exceptionIfNotFound,
boolean enabledOnly)
Find a membership within the registry by UUID.
|
static Membership |
findCompositeMembership(GrouperSession s,
Group g,
Subject subj)
Deprecated.
see overload
|
static Membership |
findCompositeMembership(GrouperSession s,
Group g,
Subject subj,
boolean exceptionOnNull)
Return the composite membership if it exists.
|
static Set<Membership> |
findEffectiveMemberships(GrouperSession s,
Group g,
Subject subj,
Field f,
Group via,
int depth)
Return effective memberships.
|
static Membership |
findImmediateMembership(GrouperSession s,
AttributeDef attributeDef,
Subject subj,
Field f,
boolean exceptionIfNotFound)
Return the immediate membership if it exists.
|
static Membership |
findImmediateMembership(GrouperSession s,
Group g,
Subject subj,
boolean exceptionIfNotFound)
Return the immediate membership if it exists.
|
static Membership |
findImmediateMembership(GrouperSession s,
Group g,
Subject subj,
Field f)
Deprecated.
see overload
|
static Membership |
findImmediateMembership(GrouperSession s,
Group g,
Subject subj,
Field f,
boolean exceptionIfNotFound)
Return the immediate membership if it exists.
|
static Membership |
findImmediateMembership(GrouperSession s,
Stem stem,
Subject subj,
Field f,
boolean exceptionIfNotFound)
Return the immediate membership if it exists.
|
static Set<Member> |
findMembers(Group group,
Field field) |
static Set<Member> |
findMembers(Group group,
Field field,
QueryOptions queryOptions) |
static Set<Member> |
findMembers(Group group,
Field field,
Set<Source> sources,
QueryOptions queryOptions) |
Membership |
findMembership(boolean exceptionIfNotFound)
find a membership
|
MembershipResult |
findMembershipResult()
membership result gives helper methods in processing the results
|
static Set<Object[]> |
findMemberships(Collection<String> groupIds,
Collection<String> memberIds,
Collection<String> membershipIds,
MembershipType membershipType,
Field field,
Set<Source> sources,
String scope,
Stem stem,
Stem.Scope stemScope,
Boolean enabled) |
static Set<Object[]> |
findMemberships(Collection<String> groupIds,
Collection<String> memberIds,
Collection<String> membershipIds,
MembershipType membershipType,
Field field,
Set<Source> sources,
String scope,
Stem stem,
Stem.Scope stemScope,
Boolean enabled,
Boolean shouldCheckSecurity) |
static Set<Object[]> |
findMemberships(Collection<String> groupIds,
Collection<String> memberIds,
Collection<String> membershipIds,
MembershipType membershipType,
Field field,
Set<Source> sources,
String scope,
Stem stem,
Stem.Scope stemScope,
Boolean enabled,
Boolean shouldCheckSecurity,
FieldType fieldType) |
static Set<Object[]> |
findMemberships(Collection<String> groupIds,
Collection<String> memberIds,
Collection<String> membershipIds,
MembershipType membershipType,
Field field,
Set<Source> sources,
String scope,
Stem stem,
Stem.Scope stemScope,
Boolean enabled,
Boolean shouldCheckSecurity,
FieldType fieldType,
String serviceId,
ServiceRole serviceRole) |
Set<Object[]> |
findMembershipsMembers()
find a set of object arrays which have a membership, group|stem|attributeDef, and member inside
|
Set<Object[]> |
findPITMembershipsMembers()
find a set of object arrays which have a PITMembershipView, PITGroup|PITStem|PITAttributeDef, PITMember, and Member inside
note that for now this only supports stem, stemScope, groupIds, memberIds, sources, checkSecurity, queryOptionsForMember, scopeForMember, hasFieldForMember, pointInTimeFrom, and pointInTimeTo
|
static Set<Object[]> |
findStemMemberships(Collection<String> stemIds,
Collection<String> memberIds,
Collection<String> membershipIds,
MembershipType membershipType,
Field field,
Set<Source> sources,
String scope,
Stem stem,
Stem.Scope stemScope,
Boolean enabled,
Boolean shouldCheckSecurity) |
boolean |
hasMembership()
based on what you are querying for, see if has membership.
|
static Set<Membership> |
internal_findAllByCreatedAfter(GrouperSession s,
Date d,
Field f)
Grouper internal method only
|
static Set<Membership> |
internal_findAllByCreatedBefore(GrouperSession s,
Date d,
Field f)
Grouper internal method only
|
static Set<Membership> |
internal_findAllByGroupAndFieldAndPage(Group group,
Field field,
int start,
int pageSize,
int sortLimit,
int[] numberOfRecords)
Grouper internal method only
|
static Set<Membership> |
internal_findAllByGroupOwnerAndFieldAndType(GrouperSession s,
Group groupOwner,
Field f,
String type)
Grouper internal method only
|
static Set<Membership> |
internal_findAllChildrenNoPriv(Membership dto)
Grouper internal method only
|
static Set<Membership> |
internal_findAllCompositeByGroupAndPage(Group group,
int start,
int pageSize,
int sortLimit,
int[] numberOfRecords)
Grouper internal method only
|
static Set<Membership> |
internal_findAllEffectiveByGroupAndFieldAndPage(Group group,
Field field,
int start,
int pageSize,
int sortLimit,
int[] numberOfRecords)
Grouper internal method only
|
static Set<Membership> |
internal_findAllEffectiveByMemberAndField(GrouperSession s,
Member m,
Field f)
Grouper internal method only
|
static Set<Membership> |
internal_findAllImmediateByGroupAndFieldAndPage(Group group,
Field field,
int start,
int pageSize,
int sortLimit,
int[] numberOfRecords)
Grouper internal method only
|
static Set<Membership> |
internal_findAllImmediateByMemberAndField(GrouperSession s,
Member m,
Field f)
Grouper internal method only
|
static Set<Membership> |
internal_findAllImmediateByMemberAndField(GrouperSession s,
Member m,
Field f,
boolean enabledOnly)
Grouper internal method only
|
static Set<Membership> |
internal_findAllNonImmediateByMemberAndField(GrouperSession s,
Member m,
Field f)
Grouper internal method only
|
static Set<Subject> |
internal_findAttributeDefSubjects(GrouperSession s,
AttributeDef attributeDef,
Field f)
Grouper internal method only
|
static Set<Subject> |
internal_findAttributeDefSubjectsImmediateOnly(GrouperSession s,
AttributeDef attributeDef,
Field f)
Grouper internal method only
|
static Set<Subject> |
internal_findGroupSubjects(GrouperSession s,
Group group,
Field f)
Grouper internal method only
|
static Set<Subject> |
internal_findGroupSubjectsImmediateOnly(GrouperSession s,
Group group,
Field f)
Grouper internal method only
|
static Set<Member> |
internal_findMembersByType(GrouperSession s,
Group g,
Field f,
String type)
Grouper internal method only
|
static Set<Membership> |
internal_findMemberships(GrouperSession s,
Member m,
Field f)
Grouper internal method only
|
static Set<Subject> |
internal_findStemSubjectsImmediateOnly(GrouperSession s,
Stem stem,
Field f)
Grouper internal method only
|
static Set<Subject> |
internal_findSubjectsStemPriv(GrouperSession s,
Stem stem,
Field f)
Grouper internal method only
|
String |
toString() |
public MembershipFinder assignSubjectHasMembershipForGroup(Subject theSubjectHasMembershipForGroup)
public MembershipFinder assignHasMembershipTypeForMember(boolean theHasMembershipType)
theHasMembershipType
- public MembershipFinder assignHasFieldForGroup(boolean theHasFieldForGroup)
public MembershipFinder assignHasFieldForMember(boolean theHasField)
theHasField
- public MembershipFinder assignPointInTimeFrom(Timestamp pointInTimeFrom1)
pointInTimeFrom1
- public MembershipFinder assignPointInTimeTo(Timestamp pointInTimeTo1)
pointInTimeTo1
- public MembershipFinder assignScope(String scope1)
scope1
- public MembershipFinder assignField(Field theField)
theField
- public MembershipFinder assignFieldName(String theFieldOrPrivilegeName)
theField
- public MembershipFinder assignFieldType(FieldType theFieldType)
theFieldType
- public MembershipFinder assignServiceId(String serviceId1)
serviceId1
- public MembershipFinder assignServiceRole(ServiceRole serviceRole1)
serviceRole1
- public MembershipFinder assignStemScope(Stem.Scope theStemScope)
theStemScope
- public MembershipFinder assignStem(Stem theStem)
theStem
- public MembershipFinder assignCheckSecurity(boolean shouldCheckSecurity)
shouldCheckSecurity
- public MembershipFinder addMemberId(String memberId)
memberId
- public MembershipFinder addMembershipId(String membershipId)
membershipId
- public MembershipFinder addSubjects(Collection<Subject> subjects)
subjects
- public MembershipFinder assignMemberIds(Collection<String> theMemberIds)
theMemberIds
- public MembershipFinder assignGroupIds(Collection<String> theGroupIds)
theGroupIds
- public MembershipFinder assignFields(Collection<Field> theFields)
theFields
- public MembershipFinder assignPrivileges(Collection<Privilege> thePrivileges)
thePrivileges
- public MembershipFinder assignFieldsByName(Collection<String> theFieldNames)
theFieldNames
- public MembershipFinder assignStemIds(Collection<String> theStemIds)
theStemIds
- public MembershipFinder assignAttributeDefIds(Collection<String> theAttributeDefIds)
theAttributeDefIds
- public MembershipFinder assignMembershipType(MembershipType theMembershipType)
theMembershipType
- public MembershipFinder assignMembershipIds(Collection<String> theMembershipIds)
theMembershipIds
- public MembershipFinder addSubject(Subject subject)
subject
- public MembershipFinder addGroupId(String groupId)
groupId
- public MembershipFinder assignRoleIds(Collection<String> theRoleIds)
theRoleIds
- public MembershipFinder assignSources(Set<Source> theSources)
theSources
- public MembershipFinder addGroup(Group group)
group
- public MembershipFinder addGroup(String name)
name
- public MembershipFinder addField(String name)
name
- public MembershipFinder addField(Field field)
field
- public MembershipFinder addPrivilegeTheUserHas(String name)
name
- public MembershipFinder addPrivilegeTheUserHas(Privilege field)
field
- public MembershipFinder assignCustomCompositeType(CompositeType theCustomCompositeType)
theCustomCompositeType
- public MembershipFinder assignCustomCompositeGroup(Group theCustomCompositeGroup)
theCustomCompositeGroup
- public MembershipFinder assignEnabled(Boolean theEnabled)
theEnabled
- public MembershipFinder assignHasEnabledDate(Boolean theHasEnabledDate)
theHasEnabledDate
- public MembershipFinder assignHasDisabledDate(Boolean theHasDisabledDate)
theHasDisabledDate
- public boolean hasMembership()
public MembershipResult findMembershipResult()
public MembershipFinder assignIncludeInheritedPrivileges(boolean theIncludeInheritedPrivileges)
theIncludeInheritedPrivileges
- public MembershipFinder assignFindAllFields(boolean theFindAllFields)
theFindAllFields
- public Set<Object[]> findMembershipsMembers()
public Set<Object[]> findPITMembershipsMembers()
public Membership findMembership(boolean exceptionIfNotFound)
exceptionIfNotFound
- true if exception should be thrown if permission not foundpublic String toString()
toString
in class Object
Object.toString()
public MembershipFinder addStem(Stem stem)
stem
- public MembershipFinder addStem(String name)
name
- public MembershipFinder addStemId(String stemId)
stemId
- public MembershipFinder addSourceId(String sourceId)
sourceId
- public MembershipFinder addSource(Source source)
source
- public MembershipFinder addAttributeDef(AttributeDef attributeDef)
attributeDef
- public MembershipFinder addAttributeDef(String name)
name
- public MembershipFinder addAttributeDefId(String attributeDefId)
attributeDefId
- public static Set<Object[]> findStemMemberships(Collection<String> stemIds, Collection<String> memberIds, Collection<String> membershipIds, MembershipType membershipType, Field field, Set<Source> sources, String scope, Stem stem, Stem.Scope stemScope, Boolean enabled, Boolean shouldCheckSecurity)
stemIds
- to limit memberships to (cant have more than 100 bind variables)memberIds
- to limit memberships to (cant have more than 100 bind variables)membershipIds
- to limit memberships to (cant have more than 100 bind variables)membershipType
- Immediate, NonImmediate, etcfield
- if finding one field, list here, otherwise all list fields will be returnedsources
- if limiting memberships of members in certain sources, list herescope
- sql like string which will have a % appended to itstem
- if looking in a certain stemstemScope
- if looking only in this stem, or all substemsenabled
- null for all, true for enabled only, false for disabled onlyshouldCheckSecurity
- if we should check security, default to trueMembershipDAO.findAllByGroupOwnerOptions(java.util.Collection, java.util.Collection, java.util.Collection, edu.internet2.middleware.grouper.membership.MembershipType, edu.internet2.middleware.grouper.Field, Set, java.lang.String, edu.internet2.middleware.grouper.Stem, edu.internet2.middleware.grouper.Stem.Scope, java.lang.Boolean)
public static Set<Object[]> findMemberships(Collection<String> groupIds, Collection<String> memberIds, Collection<String> membershipIds, MembershipType membershipType, Field field, Set<Source> sources, String scope, Stem stem, Stem.Scope stemScope, Boolean enabled, Boolean shouldCheckSecurity)
groupIds
- to limit memberships to (cant have more than 100 bind variables)memberIds
- to limit memberships to (cant have more than 100 bind variables)membershipIds
- to limit memberships to (cant have more than 100 bind variables)membershipType
- Immediate, NonImmediate, etcfield
- if finding one field, list here, otherwise all list fields will be returnedsources
- if limiting memberships of members in certain sources, list herescope
- sql like string which will have a % appended to itstem
- if looking in a certain stemstemScope
- if looking only in this stem, or all substemsenabled
- null for all, true for enabled only, false for disabled onlyshouldCheckSecurity
- if we should check security, default to trueMembershipDAO.findAllByGroupOwnerOptions(java.util.Collection, java.util.Collection, java.util.Collection, edu.internet2.middleware.grouper.membership.MembershipType, edu.internet2.middleware.grouper.Field, Set, java.lang.String, edu.internet2.middleware.grouper.Stem, edu.internet2.middleware.grouper.Stem.Scope, java.lang.Boolean)
public static Set<Object[]> findMemberships(Collection<String> groupIds, Collection<String> memberIds, Collection<String> membershipIds, MembershipType membershipType, Field field, Set<Source> sources, String scope, Stem stem, Stem.Scope stemScope, Boolean enabled, Boolean shouldCheckSecurity, FieldType fieldType)
groupIds
- to limit memberships to (cant have more than 100 bind variables)memberIds
- to limit memberships to (cant have more than 100 bind variables)membershipIds
- to limit memberships to (cant have more than 100 bind variables)membershipType
- Immediate, NonImmediate, etcfield
- if finding one field, list here, otherwise all list fields will be returnedsources
- if limiting memberships of members in certain sources, list herescope
- sql like string which will have a % appended to itstem
- if looking in a certain stemstemScope
- if looking only in this stem, or all substemsenabled
- null for all, true for enabled only, false for disabled onlyshouldCheckSecurity
- if we should check security, default to truefieldType
- is access or listMembershipDAO.findAllByGroupOwnerOptions(java.util.Collection, java.util.Collection, java.util.Collection, edu.internet2.middleware.grouper.membership.MembershipType, edu.internet2.middleware.grouper.Field, Set, java.lang.String, edu.internet2.middleware.grouper.Stem, edu.internet2.middleware.grouper.Stem.Scope, java.lang.Boolean)
public static Membership findImmediateMembership(GrouperSession s, Stem stem, Subject subj, Field f, boolean exceptionIfNotFound) throws MembershipNotFoundException, SchemaException
s
- Get membership within this session context.stem
- Immediate membership has this group.subj
- Immediate membership has this subject.f
- Immediate membership has this list.exceptionIfNotFound
- Membership
objectMembershipNotFoundException
SchemaException
public static Set<Object[]> findMemberships(Collection<String> groupIds, Collection<String> memberIds, Collection<String> membershipIds, MembershipType membershipType, Field field, Set<Source> sources, String scope, Stem stem, Stem.Scope stemScope, Boolean enabled)
groupIds
- to limit memberships to (cant have more than 100 bind variables)memberIds
- to limit memberships to (cant have more than 100 bind variables)membershipIds
- to limit memberships to (cant have more than 100 bind variables)membershipType
- Immediate, NonImmediate, etcfield
- if finding one field, list here, otherwise all list fields will be returnedsources
- if limiting memberships of members in certain sources, list herescope
- sql like string which will have a % appended to itstem
- if looking in a certain stemstemScope
- if looking only in this stem, or all substemsenabled
- null for all, true for enabled only, false for disabled onlyMembershipDAO.findAllByGroupOwnerOptions(java.util.Collection, java.util.Collection, java.util.Collection, edu.internet2.middleware.grouper.membership.MembershipType, edu.internet2.middleware.grouper.Field, Set, java.lang.String, edu.internet2.middleware.grouper.Stem, edu.internet2.middleware.grouper.Stem.Scope, java.lang.Boolean)
public static Set<Object[]> findAttributeDefMemberships(Collection<String> attributeDefIds, Collection<String> memberIds, Collection<String> membershipIds, MembershipType membershipType, Field field, Set<Source> sources, String scope, Stem stem, Stem.Scope stemScope, Boolean enabled, Boolean shouldCheckSecurity)
attributeDefIds
- to limit memberships to (cant have more than 100 bind variables)memberIds
- to limit memberships to (cant have more than 100 bind variables)membershipIds
- to limit memberships to (cant have more than 100 bind variables)membershipType
- Immediate, NonImmediate, etcfield
- if finding one field, list here, otherwise all list fields will be returnedsources
- if limiting memberships of members in certain sources, list herescope
- sql like string which will have a % appended to itstem
- if looking in a certain stemstemScope
- if looking only in this stem, or all substemsenabled
- null for all, true for enabled only, false for disabled onlyshouldCheckSecurity
- if we should check security, default to trueMembershipDAO.findAllByGroupOwnerOptions(java.util.Collection, java.util.Collection, java.util.Collection, edu.internet2.middleware.grouper.membership.MembershipType, edu.internet2.middleware.grouper.Field, Set, java.lang.String, edu.internet2.middleware.grouper.Stem, edu.internet2.middleware.grouper.Stem.Scope, java.lang.Boolean)
public static Set<Object[]> findMemberships(Collection<String> groupIds, Collection<String> memberIds, Collection<String> membershipIds, MembershipType membershipType, Field field, Set<Source> sources, String scope, Stem stem, Stem.Scope stemScope, Boolean enabled, Boolean shouldCheckSecurity, FieldType fieldType, String serviceId, ServiceRole serviceRole)
groupIds
- to limit memberships to (cant have more than 100 bind variables)memberIds
- to limit memberships to (cant have more than 100 bind variables)membershipIds
- to limit memberships to (cant have more than 100 bind variables)membershipType
- Immediate, NonImmediate, etcfield
- if finding one field, list here, otherwise all list fields will be returnedsources
- if limiting memberships of members in certain sources, list herescope
- sql like string which will have a % appended to itstem
- if looking in a certain stemstemScope
- if looking only in this stem, or all substemsenabled
- null for all, true for enabled only, false for disabled onlyshouldCheckSecurity
- if we should check security, default to trueserviceId
- is the id of the service (attributeDefName) if filtering memberships of people in a serviceserviceRole
- is the user/admin role of the user in the serviceMembershipDAO.findAllByGroupOwnerOptions(java.util.Collection, java.util.Collection, java.util.Collection, edu.internet2.middleware.grouper.membership.MembershipType, edu.internet2.middleware.grouper.Field, Set, java.lang.String, edu.internet2.middleware.grouper.Stem, edu.internet2.middleware.grouper.Stem.Scope, java.lang.Boolean)
@Deprecated public static Membership findCompositeMembership(GrouperSession s, Group g, Subject subj) throws MembershipNotFoundException, SchemaException
s
- Get membership within this session context.g
- Composite membership has this group.subj
- Composite membership has this subject.Membership
objectMembershipNotFoundException
SchemaException
public static Membership findCompositeMembership(GrouperSession s, Group g, Subject subj, boolean exceptionOnNull) throws MembershipNotFoundException, SchemaException
s
- Get membership within this session context.g
- Composite membership has this group.subj
- Composite membership has this subject.exceptionOnNull
- Membership
objectMembershipNotFoundException
SchemaException
public static Set<Membership> findEffectiveMemberships(GrouperSession s, Group g, Subject subj, Field f, Group via, int depth) throws MembershipNotFoundException, SchemaException
s
- Get membership within this session context.g
- Effective membership has this group.subj
- Effective membership has this subject.f
- Effective membership has this list.via
- Effective membership has this via group.depth
- Effective membership has this depth.Membership
objects.MembershipNotFoundException
SchemaException
@Deprecated public static Membership findImmediateMembership(GrouperSession s, Group g, Subject subj, Field f) throws MembershipNotFoundException, SchemaException
s
- Get membership within this session context.g
- Immediate membership has this group.subj
- Immediate membership has this subject.f
- Immediate membership has this list.Membership
objectMembershipNotFoundException
SchemaException
public static Membership findImmediateMembership(GrouperSession s, Group g, Subject subj, boolean exceptionIfNotFound) throws MembershipNotFoundException, SchemaException
s
- Get membership within this session context.g
- Immediate membership has this group.subj
- Immediate membership has this subject.f
- Immediate membership has this list.exceptionIfNotFound
- Membership
objectMembershipNotFoundException
SchemaException
public static Membership findImmediateMembership(GrouperSession s, Group g, Subject subj, Field f, boolean exceptionIfNotFound) throws MembershipNotFoundException, SchemaException
s
- Get membership within this session context.g
- Immediate membership has this group.subj
- Immediate membership has this subject.f
- Immediate membership has this list.exceptionIfNotFound
- Membership
objectMembershipNotFoundException
SchemaException
public static Membership findImmediateMembership(GrouperSession s, AttributeDef attributeDef, Subject subj, Field f, boolean exceptionIfNotFound) throws MembershipNotFoundException, SchemaException
s
- Get membership within this session context.SchemaException
- Immediate membership has this attribute def.subj
- Immediate membership has this subject.f
- Immediate membership has this list.exceptionIfNotFound
- Membership
objectMembershipNotFoundException
SchemaException
public static Set<Membership> internal_findAllChildrenNoPriv(Membership dto)
Grouper internal method only
dto
- public static Set<Member> findMembers(Group group, Field field) throws IllegalArgumentException
group
- field
- Member
's in group's list field.IllegalArgumentException
- if any parameter is null.public static Set<Member> findMembers(Group group, Field field, QueryOptions queryOptions) throws IllegalArgumentException
group
- field
- queryOptions
- Member
's in group's list field.IllegalArgumentException
- if any parameter is null.public static Set<Member> findMembers(Group group, Field field, Set<Source> sources, QueryOptions queryOptions) throws IllegalArgumentException
group
- field
- sources
- set of sources to retrieve from or null for allqueryOptions
- Member
's in group's list field.IllegalArgumentException
- if any parameter is null.public static Set<Subject> internal_findGroupSubjects(GrouperSession s, Group group, Field f) throws GrouperException
Grouper internal method only
s
- group
- f
- GrouperException
public static Set<Subject> internal_findAttributeDefSubjectsImmediateOnly(GrouperSession s, AttributeDef attributeDef, Field f) throws GrouperException
Grouper internal method only
s
- attributeDef
- f
- GrouperException
public static Set<Subject> internal_findStemSubjectsImmediateOnly(GrouperSession s, Stem stem, Field f) throws GrouperException
Grouper internal method only
s
- stem
- f
- GrouperException
public static Set<Subject> internal_findSubjectsStemPriv(GrouperSession s, Stem stem, Field f)
Grouper internal method only
s
- stem
- f
- public static Set<Member> internal_findMembersByType(GrouperSession s, Group g, Field f, String type)
Grouper internal method only
s
- g
- f
- type
- public MembershipFinder assignScopeForMember(String theFilterForMember)
theFilterForMember
- public MembershipFinder assignQueryOptionsForGroup(QueryOptions theQueryOptionsForGroup)
theQueryOptionsForGroup
- public MembershipFinder assignHasFieldForStem(boolean theHasFieldForStem)
theHasFieldForStem
- public MembershipFinder assignHasMembershipTypeForStem(boolean theHasMembershipTypeForStem)
public MembershipFinder assignQueryOptionsForStem(QueryOptions theQueryOptionsForStem)
theQueryOptionsForStem
- public MembershipFinder assignScopeForStem(String theScopeForStem)
theScopeForStem
- public MembershipFinder assignHasFieldForAttributeDef(boolean theHasFieldForAttributeDef)
theHasFieldForAttributeDef
- public MembershipFinder assignHasMembershipTypeForAttributeDef(boolean theHasMembershipTypeForAttributeDef)
theHasMembershipTypeForAttributeDef
- public MembershipFinder assignQueryOptionsForAttributeDef(QueryOptions theQueryOptionsForAttributeDef)
theQueryOptionsForAttributeDef
- public MembershipFinder assignScopeForAttributeDef(String theScopeForAttributeDef)
theScopeForAttributeDef
- public MembershipFinder assignSplitScopeForAttributeDef(boolean theSplitScopeForAttributeDef)
theSplitScopeForAttributeDef
- public MembershipFinder assignSplitScopeForStem(boolean theSplitScopeForStem)
theSplitScopeForStem
- public MembershipFinder assignScopeForGroup(String theScopeForGroup)
theScopeForGroup
- public MembershipFinder assignHasMembershipTypeForGroup(boolean theHasMembershipTypeForGroup)
theHasMembershipTypeForGroup
- public MembershipFinder assignSplitScopeForGroup(boolean theSplitScopeForGroup)
theSplitScopeForGroup
- public MembershipFinder assignSplitScopeForMember(boolean theSplitScopeForMember)
theSplitScopeForMember
- public MembershipFinder assignQueryOptionsForMember(QueryOptions theQueryOptions)
theQueryOptions
- public MembershipFinder assignQueryOptionsForMembership(QueryOptions theQueryOptions)
theQueryOptions
- public MembershipFinder assignPrivilegesTheUserHas(Collection<Privilege> thePrivilegesTheUserHas)
thePrivilegesTheUserHas
- public MembershipFinder assignPrivilegesTheUserHasByName(Collection<String> thePrivilegeNamesOfPrivilegesTheUserHas)
thePrivilegeNamesOfPrivilegesTheUserHas
- public static Set<Membership> internal_findAllByCreatedAfter(GrouperSession s, Date d, Field f) throws QueryException
Grouper internal method only
s
- d
- f
- QueryException
public static Set<Membership> internal_findAllByCreatedBefore(GrouperSession s, Date d, Field f) throws QueryException
Grouper internal method only
s
- d
- f
- QueryException
public static Set<Membership> internal_findAllByGroupOwnerAndFieldAndType(GrouperSession s, Group groupOwner, Field f, String type)
Grouper internal method only
s
- groupOwner
- f
- type
- public static Set<Membership> internal_findAllEffectiveByMemberAndField(GrouperSession s, Member m, Field f)
Grouper internal method only
s
- m
- f
- public static Set<Membership> internal_findAllImmediateByMemberAndField(GrouperSession s, Member m, Field f)
Grouper internal method only
s
- m
- f
- public static Set<Membership> internal_findAllImmediateByMemberAndField(GrouperSession s, Member m, Field f, boolean enabledOnly)
Grouper internal method only
s
- m
- f
- enabledOnly
- public static Set<Membership> internal_findAllNonImmediateByMemberAndField(GrouperSession s, Member m, Field f)
Grouper internal method only
s
- m
- f
- public static Set<Membership> internal_findMemberships(GrouperSession s, Member m, Field f)
Grouper internal method only
s
- m
- f
- public static Set<Membership> internal_findAllImmediateByGroupAndFieldAndPage(Group group, Field field, int start, int pageSize, int sortLimit, int[] numberOfRecords) throws SchemaException
Grouper internal method only
start
- pageSize
- group
- field
- sortLimit
- numberOfRecords
- (pass in array of size one to get the result size back)SchemaException
public static Set<Membership> internal_findAllCompositeByGroupAndPage(Group group, int start, int pageSize, int sortLimit, int[] numberOfRecords) throws SchemaException
Grouper internal method only
start
- pageSize
- group
- sortLimit
- numberOfRecords
- (pass in array of size one to get the result size back)SchemaException
public static Set<Membership> internal_findAllEffectiveByGroupAndFieldAndPage(Group group, Field field, int start, int pageSize, int sortLimit, int[] numberOfRecords) throws SchemaException
Grouper internal method only
start
- pageSize
- group
- field
- sortLimit
- numberOfRecords
- (pass in array of size one to get the result size back)SchemaException
public static Set<Membership> internal_findAllByGroupAndFieldAndPage(Group group, Field field, int start, int pageSize, int sortLimit, int[] numberOfRecords) throws SchemaException
Grouper internal method only
start
- pageSize
- group
- field
- sortLimit
- numberOfRecords
- (pass in array of size one to get the result size back)SchemaException
public static Set<Subject> internal_findAttributeDefSubjects(GrouperSession s, AttributeDef attributeDef, Field f) throws GrouperException
Grouper internal method only
s
- attributeDef
- f
- GrouperException
public static Set<Subject> internal_findGroupSubjectsImmediateOnly(GrouperSession s, Group group, Field f) throws GrouperException
Grouper internal method only
s
- group
- f
- GrouperException
public static Membership findByUuid(GrouperSession grouperSession, String uuid, boolean exceptionIfNotFound, boolean enabledOnly) throws MembershipNotFoundException
Membership membership = MembershipFinder.findByUuid(grouperSession, uuid);
grouperSession
- Find membership within this session context.uuid
- UUID of membership to find.exceptionIfNotFound
- true if exception if not foundenabledOnly
- true for enabled onlyMembership
MembershipNotFoundException
- if not found an exceptionIfNotFound is truepublic static Set<MembershipSubjectContainer> findAllImmediateMemberhipSubjectContainers(GrouperSession grouperSession, Subject subject)
grouperSession
- subject
- Copyright © 2016 Internet2. All rights reserved.