edu.internet2.middleware.grouper.misc
Class GrouperObjectFinder

java.lang.Object
  extended by edu.internet2.middleware.grouper.misc.GrouperObjectFinder

public class GrouperObjectFinder
extends Object

find object of multiple types, and allow paging

Author:
mchyzer

Nested Class Summary
static class GrouperObjectFinder.GrouperObjectFinderType
          type of objects to get
static class GrouperObjectFinder.ObjectPrivilege
          privilege type to query
 
Constructor Summary
GrouperObjectFinder()
           
 
Method Summary
 GrouperObjectFinder addGrouperObjectFinderType(GrouperObjectFinder.GrouperObjectFinderType grouperObjectFinderType1)
          add grouper object finder type
 GrouperObjectFinder assignFilterText(String theFilterText)
          if filtering names by certain strings
 GrouperObjectFinder assignGrouperObjectFinderType(Collection<GrouperObjectFinder.GrouperObjectFinderType> grouperObjectFinderTypes1)
          assign grouper object finder types (null or empty is all)
 GrouperObjectFinder assignObjectPrivilege(GrouperObjectFinder.ObjectPrivilege theObjectPrivilege)
          which privileges should be used, see the enum for examples
 GrouperObjectFinder assignParentStemId(String theParentStemId)
          if only looking for objects in this stem, also set stemScope
 GrouperObjectFinder assignQueryOptions(QueryOptions theQueryOptions)
          if sorting / paging
 GrouperObjectFinder assignSplitScope(boolean theSplitScope)
          if the scope has spaces in it, then split by whitespace, and find results that contain all of the scope strings
 GrouperObjectFinder assignStemScope(Stem.Scope theStemScope)
          if only looking for objects in a stem, this is if ONE or SUB
 GrouperObjectFinder assignSubject(edu.internet2.middleware.subject.Subject theSubject)
          subject to add to queries for example for privileges
 Set<GrouperObject> findGrouperObjects()
          find grouper objects based on the paramet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrouperObjectFinder

public GrouperObjectFinder()
Method Detail

addGrouperObjectFinderType

public GrouperObjectFinder addGrouperObjectFinderType(GrouperObjectFinder.GrouperObjectFinderType grouperObjectFinderType1)
add grouper object finder type

Parameters:
grouperObjectFinderType1 -
Returns:
this for chaining

assignGrouperObjectFinderType

public GrouperObjectFinder assignGrouperObjectFinderType(Collection<GrouperObjectFinder.GrouperObjectFinderType> grouperObjectFinderTypes1)
assign grouper object finder types (null or empty is all)

Parameters:
grouperObjectFinderTypes1 -
Returns:
this for chaining

assignObjectPrivilege

public GrouperObjectFinder assignObjectPrivilege(GrouperObjectFinder.ObjectPrivilege theObjectPrivilege)
which privileges should be used, see the enum for examples

Parameters:
theObjectPrivilege -
Returns:
this for chaining

assignSubject

public GrouperObjectFinder assignSubject(edu.internet2.middleware.subject.Subject theSubject)
subject to add to queries for example for privileges

Parameters:
theSubject -
Returns:
this for chaining

assignParentStemId

public GrouperObjectFinder assignParentStemId(String theParentStemId)
if only looking for objects in this stem, also set stemScope

Parameters:
theParentStemId -
Returns:
this for chaining

assignStemScope

public GrouperObjectFinder assignStemScope(Stem.Scope theStemScope)
if only looking for objects in a stem, this is if ONE or SUB

Parameters:
theStemScope -
Returns:
this for chaining

assignFilterText

public GrouperObjectFinder assignFilterText(String theFilterText)
if filtering names by certain strings

Parameters:
theFilterText -
Returns:
this for chaining

assignSplitScope

public GrouperObjectFinder assignSplitScope(boolean theSplitScope)
if the scope has spaces in it, then split by whitespace, and find results that contain all of the scope strings

Parameters:
theSplitScope -
Returns:
this for chaining

assignQueryOptions

public GrouperObjectFinder assignQueryOptions(QueryOptions theQueryOptions)
if sorting / paging

Parameters:
theQueryOptions -

findGrouperObjects

public Set<GrouperObject> findGrouperObjects()
find grouper objects based on the paramet

Returns:
the set of objects