Class AttributeDefNameFinder

java.lang.Object
edu.internet2.middleware.grouper.attr.finder.AttributeDefNameFinder

public class AttributeDefNameFinder extends Object
finder methods for attribute def name. the chained API is secure based on the static grouper session
  • Constructor Details

    • AttributeDefNameFinder

      public AttributeDefNameFinder()
  • Method Details

    • addIdOfAttributeDefName

      public AttributeDefNameFinder addIdOfAttributeDefName(String theIdsOfAttributeDefName)
      id of attribute def name
      Parameters:
      theIdsOfAttributeDefName -
      Returns:
      this for chaining
    • addNameOfAttributeDefName

      public AttributeDefNameFinder addNameOfAttributeDefName(String nameOfAttributeDefName)
      add a attribute def name name to search for
      Parameters:
      nameOfAttributeDefName -
      Returns:
      this for chaining
    • assignIdsOfAttributeDefNames

      public AttributeDefNameFinder assignIdsOfAttributeDefNames(Collection<String> theIdsOfAttributeDefNames)
      id of attribute def name
      Parameters:
      theIdsOfAttributeDefNames -
      Returns:
      this for chaining
    • assignNamesOfAttributeDefNames

      public AttributeDefNameFinder assignNamesOfAttributeDefNames(Collection<String> theNamesOfAttributeDefNames)
      names of attribute def name
      Parameters:
      theNamesOfAttributeDefNames -
      Returns:
      this for chaining
    • assignParentStemId

      public AttributeDefNameFinder assignParentStemId(String theParentStemId)
      parent or ancestor stem of the attribute def
      Parameters:
      theParentStemId -
      Returns:
      this for chaining
    • assignStemScope

      public AttributeDefNameFinder assignStemScope(Stem.Scope theStemScope)
      if passing in a stem, this is the stem scope...
      Parameters:
      theStemScope -
      Returns:
      this for chaining
    • assignScope

      public AttributeDefNameFinder assignScope(String theScope)
      scope to look for attribute def names Wildcards will be appended or percent is the wildcard
      Parameters:
      theScope -
      Returns:
      this for chaining
    • assignAttributeDefId

      public AttributeDefNameFinder assignAttributeDefId(String theAttributeDefId)
      find attribute def names based on one attribute definition
      Parameters:
      theAttributeDefId -
      Returns:
      this for chaining
    • assignServiceRole

      public AttributeDefNameFinder assignServiceRole(ServiceRole theServiceRole)
      if filtering by service, this is the service role, or null for all
      Parameters:
      theServiceRole -
      Returns:
      this for chaining
    • assignSubject

      public AttributeDefNameFinder assignSubject(Subject theSubject)
      this is the subject that has certain privileges or is in the service
      Parameters:
      theSubject -
      Returns:
      this for chaining
    • assignPrivileges

      public AttributeDefNameFinder assignPrivileges(Set<Privilege> thePrivileges)
      assign privileges to filter by that the subject has on the attribute definition
      Parameters:
      thePrivileges -
      Returns:
      this for chaining
    • addPrivilege

      public AttributeDefNameFinder addPrivilege(Privilege privilege)
      add a privilege to filter by that the subject has on the attribute definition
      Parameters:
      privilege - should be AttributeDefPrivilege
      Returns:
      this for chaining
    • assignQueryOptions

      public AttributeDefNameFinder assignQueryOptions(QueryOptions theQueryOptions)
      if sorting, paging, caching, etc
      Parameters:
      theQueryOptions -
      Returns:
      this for chaining
    • assignSplitScope

      public AttributeDefNameFinder 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
    • assignAttributeAssignType

      public AttributeDefNameFinder assignAttributeAssignType(AttributeAssignType theAttributeAssignType)
      the type of assignment that the attributes can have
      Parameters:
      theAttributeAssignType -
      Returns:
      this for chaining
    • findById

      public static AttributeDefName findById(String id, boolean exceptionIfNotFound, QueryOptions queryOptions)
      find an attributeDefName by id. This is a secure method, a GrouperSession must be open
      Parameters:
      id - of attributeDefName
      exceptionIfNotFound - true if exception should be thrown if null
      queryOptions -
      Returns:
      the attribute def or null
      Throws:
      AttributeDefNameNotFoundException
    • findById

      public static AttributeDefName findById(String id, boolean exceptionIfNotFound)
      find an attributeDefName by id. This is a secure method, a GrouperSession must be open
      Parameters:
      id - of attributeDefName
      exceptionIfNotFound - true if exception should be thrown if null
      Returns:
      the attribute def or null
      Throws:
      AttributeDefNameNotFoundException
    • findByIdAsRoot

      public static AttributeDefName findByIdAsRoot(String id, boolean exceptionIfNotFound)
      find an attributeDefName by id. This is a secure method, a GrouperSession must be open
      Parameters:
      id - of attributeDefName
      exceptionIfNotFound - true if exception should be thrown if null
      Returns:
      the attribute def or null
      Throws:
      AttributeDefNameNotFoundException
    • findAttributeNames

      public Set<AttributeDefName> findAttributeNames()
      find all the attribute def names
      Returns:
      the set of attribute def names or the empty set if none found
    • assignAnyRole

      public AttributeDefNameFinder assignAnyRole(boolean theAnyRole)
      mutually exclusive with serviceRole... this is true if looking for services where the user has any role
      Parameters:
      theAnyRole -
      Returns:
      this for chaining
    • assignFindByUuidOrName

      public AttributeDefNameFinder assignFindByUuidOrName(boolean theFindByUuidOrName)
      if we are looking up an attributedefname, only look by uuid or name
      Parameters:
      theFindByUuidOrName -
      Returns:
      the attribute def name finder
    • findAttributeName

      public AttributeDefName findAttributeName()
      find the stem
      Returns:
      the stem or null
    • findByIdIndexSecure

      public static AttributeDefName findByIdIndexSecure(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions) throws AttributeDefNameNotFoundException
      Find an attributeDefName within the registry by ID index.
      Parameters:
      idIndex - id index of attributeDefName to find.
      exceptionIfNotFound - true if exception if not found
      queryOptions -
      Returns:
      A AttributeDefName
      Throws:
      AttributeDefNameNotFoundException - if not found an exceptionIfNotFound is true
    • findByName

      public static AttributeDefName findByName(String name, boolean exceptionIfNotFound, QueryOptions queryOptions)
      find an attributeDefName by name. This is a secure method, a GrouperSession must be open
      Parameters:
      name - of attributeDefName
      exceptionIfNotFound - true if exception should be thrown if null
      queryOptions -
      Returns:
      the attribute def name or null
      Throws:
      AttributeDefNameNotFoundException
    • findByName

      public static AttributeDefName findByName(String name, boolean exceptionIfNotFound)
      find an attributeDefName by name. This is a secure method, a GrouperSession must be open
      Parameters:
      name - of attributeDefName
      exceptionIfNotFound - true if exception should be thrown if null
      Returns:
      the attribute def name or null
      Throws:
      AttributeDefNameNotFoundException
    • findByNameAsRoot

      public static AttributeDefName findByNameAsRoot(String name, boolean exceptionIfNotFound)
      find an attributeDefName by name. This is a secure method, a GrouperSession must be open
      Parameters:
      name - of attributeDefName
      exceptionIfNotFound - true if exception should be thrown if null
      Returns:
      the attribute def name or null
      Throws:
      AttributeDefNameNotFoundException
    • findByNameCache

      @Deprecated public static AttributeDefName findByNameCache(String name, boolean exceptionIfNotFound)
      Deprecated.
      find an attributeDefName by name. This is a secure method, a GrouperSession must be open. This will cache the result
      Parameters:
      name - of attributeDefName
      exceptionIfNotFound - true if exception should be thrown if null
      Returns:
      the attribute def name or null
      Throws:
      AttributeDefNameNotFoundException
    • findAll

      public static Set<AttributeDefName> findAll(String searchField, Set<String> searchInAttributeDefIds, QueryOptions queryOptions)
      search for attributeDefName by name, display name, or description. This is a secure method, a GrouperSession must be open. You need to add %'s to it for wildcards
      Parameters:
      searchField - substring to search for
      searchInAttributeDefIds - ids to search in or null for all
      queryOptions -
      Returns:
      the attribute def names or empty set