Class AttributeDefNameFinder
java.lang.Object
edu.internet2.middleware.grouper.attr.finder.AttributeDefNameFinder
finder methods for attribute def name.
the chained API is secure based on the static grouper session
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddIdOfAttributeDefName
(String theIdsOfAttributeDefName) id of attribute def nameaddNameOfAttributeDefName
(String nameOfAttributeDefName) add a attribute def name name to search foraddPrivilege
(Privilege privilege) add a privilege to filter by that the subject has on the attribute definitionassignAnyRole
(boolean theAnyRole) mutually exclusive with serviceRole...assignAttributeAssignType
(AttributeAssignType theAttributeAssignType) the type of assignment that the attributes can haveassignAttributeDefId
(String theAttributeDefId) find attribute def names based on one attribute definitionassignFindByUuidOrName
(boolean theFindByUuidOrName) if we are looking up an attributedefname, only look by uuid or nameassignIdsOfAttributeDefNames
(Collection<String> theIdsOfAttributeDefNames) id of attribute def nameassignNamesOfAttributeDefNames
(Collection<String> theNamesOfAttributeDefNames) names of attribute def nameassignParentStemId
(String theParentStemId) parent or ancestor stem of the attribute defassignPrivileges
(Set<Privilege> thePrivileges) assign privileges to filter by that the subject has on the attribute definitionassignQueryOptions
(QueryOptions theQueryOptions) if sorting, paging, caching, etcassignScope
(String theScope) scope to look for attribute def names Wildcards will be appended or percent is the wildcardassignServiceRole
(ServiceRole theServiceRole) if filtering by service, this is the service role, or null for allassignSplitScope
(boolean theSplitScope) if the scope has spaces in it, then split by whitespace, and find results that contain all of the scope stringsassignStemScope
(Stem.Scope theStemScope) if passing in a stem, this is the stem scope...assignSubject
(Subject theSubject) this is the subject that has certain privileges or is in the servicestatic Set<AttributeDefName>
findAll
(String searchField, Set<String> searchInAttributeDefIds, QueryOptions queryOptions) search for attributeDefName by name, display name, or description.find the stemfind all the attribute def namesstatic AttributeDefName
find an attributeDefName by id.static AttributeDefName
findById
(String id, boolean exceptionIfNotFound, QueryOptions queryOptions) find an attributeDefName by id.static AttributeDefName
findByIdAsRoot
(String id, boolean exceptionIfNotFound) find an attributeDefName by id.static AttributeDefName
findByIdIndexSecure
(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions) Find an attributeDefName within the registry by ID index.static AttributeDefName
findByName
(String name, boolean exceptionIfNotFound) find an attributeDefName by name.static AttributeDefName
findByName
(String name, boolean exceptionIfNotFound, QueryOptions queryOptions) find an attributeDefName by name.static AttributeDefName
findByNameAsRoot
(String name, boolean exceptionIfNotFound) find an attributeDefName by name.static AttributeDefName
findByNameCache
(String name, boolean exceptionIfNotFound) Deprecated.
-
Constructor Details
-
AttributeDefNameFinder
public AttributeDefNameFinder()
-
-
Method Details
-
addIdOfAttributeDefName
id of attribute def name- Parameters:
theIdsOfAttributeDefName
-- Returns:
- this for chaining
-
addNameOfAttributeDefName
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
parent or ancestor stem of the attribute def- Parameters:
theParentStemId
-- Returns:
- this for chaining
-
assignStemScope
if passing in a stem, this is the stem scope...- Parameters:
theStemScope
-- Returns:
- this for chaining
-
assignScope
scope to look for attribute def names Wildcards will be appended or percent is the wildcard- Parameters:
theScope
-- Returns:
- this for chaining
-
assignAttributeDefId
find attribute def names based on one attribute definition- Parameters:
theAttributeDefId
-- Returns:
- this for chaining
-
assignServiceRole
if filtering by service, this is the service role, or null for all- Parameters:
theServiceRole
-- Returns:
- this for chaining
-
assignSubject
this is the subject that has certain privileges or is in the service- Parameters:
theSubject
-- Returns:
- this for chaining
-
assignPrivileges
assign privileges to filter by that the subject has on the attribute definition- Parameters:
thePrivileges
-- Returns:
- this for chaining
-
addPrivilege
add a privilege to filter by that the subject has on the attribute definition- Parameters:
privilege
- should be AttributeDefPrivilege- Returns:
- this for chaining
-
assignQueryOptions
if sorting, paging, caching, etc- Parameters:
theQueryOptions
-- Returns:
- this for chaining
-
assignSplitScope
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
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 attributeDefNameexceptionIfNotFound
- true if exception should be thrown if nullqueryOptions
-- Returns:
- the attribute def or null
- Throws:
AttributeDefNameNotFoundException
-
findById
find an attributeDefName by id. This is a secure method, a GrouperSession must be open- Parameters:
id
- of attributeDefNameexceptionIfNotFound
- true if exception should be thrown if null- Returns:
- the attribute def or null
- Throws:
AttributeDefNameNotFoundException
-
findByIdAsRoot
find an attributeDefName by id. This is a secure method, a GrouperSession must be open- Parameters:
id
- of attributeDefNameexceptionIfNotFound
- true if exception should be thrown if null- Returns:
- the attribute def or null
- Throws:
AttributeDefNameNotFoundException
-
findAttributeNames
find all the attribute def names- Returns:
- the set of attribute def names or the empty set if none found
-
assignAnyRole
mutually exclusive with serviceRole... this is true if looking for services where the user has any role- Parameters:
theAnyRole
-- Returns:
- this for chaining
-
assignFindByUuidOrName
if we are looking up an attributedefname, only look by uuid or name- Parameters:
theFindByUuidOrName
-- Returns:
- the attribute def name finder
-
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 foundqueryOptions
-- 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 attributeDefNameexceptionIfNotFound
- true if exception should be thrown if nullqueryOptions
-- Returns:
- the attribute def name or null
- Throws:
AttributeDefNameNotFoundException
-
findByName
find an attributeDefName by name. This is a secure method, a GrouperSession must be open- Parameters:
name
- of attributeDefNameexceptionIfNotFound
- true if exception should be thrown if null- Returns:
- the attribute def name or null
- Throws:
AttributeDefNameNotFoundException
-
findByNameAsRoot
find an attributeDefName by name. This is a secure method, a GrouperSession must be open- Parameters:
name
- of attributeDefNameexceptionIfNotFound
- 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 attributeDefNameexceptionIfNotFound
- 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 forsearchInAttributeDefIds
- ids to search in or null for allqueryOptions
-- Returns:
- the attribute def names or empty set
-