Class GrouperObjectFinder

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

public class GrouperObjectFinder extends Object
find object of multiple types, and allow paging
  • Constructor Details

    • GrouperObjectFinder

      public GrouperObjectFinder()
  • Method Details

    • 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
    • decoratePaging

      public static boolean decoratePaging(QueryOptions queryOptions, int firstIndexOnPage, int lastIndexOnPage, int firstSetIndex, int lastSetIndex)
      figure out the paging for one set of objects in a multiset list
      Parameters:
      queryOptions -
      firstIndexOnPage -
      lastIndexOnPage -
      firstSetIndex -
      lastSetIndex -
      Returns:
      true if should run query, false if not
    • assignSubject

      public GrouperObjectFinder assignSubject(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
    • assignSourceIds

      public GrouperObjectFinder assignSourceIds(Set<String> sourceIds1)
      if not null, these are source ids to use for searching
      Parameters:
      sourceIds1 -
      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