Class AttributeDefFinder
java.lang.Object
edu.internet2.middleware.grouper.attr.finder.AttributeDefFinder
finder methods for attribute def
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAttributeDefId
(String attributeDefId) add a attribute def id to search foraddAttributeDefNameId
(String attributeDefNameId) add a attribute def id to search foraddNameOfAttributeDef
(String nameOfAttributeDef) add a attribute def name to search foraddPrivilege
(Privilege privilege) add a privilege to filter by that the subject has on the attribute definitionassignAttributeDefIds
(Collection<String> theAttributeDefIds) assign attributeDef ids to search forassignAttributeDefNameIds
(Collection<String> theAttributeDefNameIds) assign attributeDef ids to search forassignFindByUuidOrName
(boolean theFindByUuidOrName) if we are looking up a attribute def, only look by uuid or nameassignNamesOfAttributeDefs
(Collection<String> theNamesOfAttributeDefs) assign attributeDef namesassignParentStemId
(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 defs Wildcards will be appended or percent is the wildcardassignSplitScope
(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 servicefind the attributeDeffind all the attribute defsstatic AttributeDef
findByAttributeDefNameId
(String id, boolean exceptionIfNotFound) find an attributeDef by attribute def name id.static AttributeDef
find an attributeDef by id.static AttributeDef
findById
(String id, boolean exceptionIfNotFound, QueryOptions queryOptions) find an attributeDef by id.static AttributeDef
findByIdAsRoot
(String id, boolean exceptionIfNotFound) find an attributeDef by id.static AttributeDef
findByIdIndexSecure
(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions) Find an attributeDef within the registry by ID index.static AttributeDef
findByName
(String name, boolean exceptionIfNotFound) find an attributeDef by name.static AttributeDef
findByName
(String name, boolean exceptionIfNotFound, QueryOptions queryOptions) find an attributeDef by name.static AttributeDef
findByNameAsRoot
(String name, boolean exceptionIfNotFound, QueryOptions queryOptions) find an attributeDef by name.findIdIndexesByNames
(Set<String> attributeDefNames2) this will cache for a minute, find id index by name
-
Constructor Details
-
AttributeDefFinder
public AttributeDefFinder()
-
-
Method Details
-
findById
public static AttributeDef findById(String id, boolean exceptionIfNotFound, QueryOptions queryOptions) find an attributeDef by id. This is a secure method, a GrouperSession must be open- Parameters:
id
- of attributeDefexceptionIfNotFound
- true if exception should be thrown if null GrouperDAOFactory.getFactory().getAttributeDef().findByIdSecure(id, exceptionIfNotFound, queryOptions);queryOptions
-- Returns:
- the attribute def or null
- Throws:
AttributeDefNotFoundException
-
findById
find an attributeDef by id. This is a secure method, a GrouperSession must be open- Parameters:
id
- of attributeDefexceptionIfNotFound
- true if exception should be thrown if null- Returns:
- the attribute def or null
- Throws:
AttributeDefNotFoundException
-
findByIdAsRoot
find an attributeDef by id. This is a secure method, a GrouperSession must be open- Parameters:
id
- of attributeDefexceptionIfNotFound
- true if exception should be thrown if null- Returns:
- the attribute def or null
- Throws:
AttributeDefNotFoundException
-
findByAttributeDefNameId
find an attributeDef by attribute def name id. This is a secure method, a GrouperSession must be open- Parameters:
id
- of attributeDefexceptionIfNotFound
- true if exception should be thrown if null- Returns:
- the attribute def or null
- Throws:
AttributeDefNotFoundException
-
findByName
public static AttributeDef findByName(String name, boolean exceptionIfNotFound, QueryOptions queryOptions) find an attributeDef by name. This is a secure method, a GrouperSession must be open- Parameters:
name
- of attributeDefexceptionIfNotFound
- true if exception should be thrown if nullqueryOptions
-- Returns:
- the attribute def or null
- Throws:
AttributeDefNotFoundException
-
findByNameAsRoot
public static AttributeDef findByNameAsRoot(String name, boolean exceptionIfNotFound, QueryOptions queryOptions) find an attributeDef by name. This is a secure method, a GrouperSession must be open- Parameters:
name
- of attributeDefexceptionIfNotFound
- true if exception should be thrown if nullqueryOptions
-- Returns:
- the attribute def or null
- Throws:
AttributeDefNotFoundException
-
findByName
find an attributeDef by name. This is a secure method, a GrouperSession must be open- Parameters:
name
- of attributeDefexceptionIfNotFound
- true if exception should be thrown if null- Returns:
- the attribute def or null
- Throws:
AttributeDefNotFoundException
-
findByIdIndexSecure
public static AttributeDef findByIdIndexSecure(Long idIndex, boolean exceptionIfNotFound, QueryOptions queryOptions) throws AttributeDefNotFoundException Find an attributeDef within the registry by ID index.- Parameters:
idIndex
- id index of attributeDef to find.exceptionIfNotFound
- true if exception if not foundqueryOptions
-- Returns:
- A
AttributeDef
- Throws:
AttributeDefNotFoundException
- if not found an exceptionIfNotFound is true
-
addPrivilege
add a privilege to filter by that the subject has on the attribute definition- Parameters:
privilege
- should be AttributeDefPrivilege- Returns:
- this for chaining
-
assignParentStemId
parent or ancestor stem of the attribute def- Parameters:
theParentStemId
-- Returns:
- this for chaining
-
assignPrivileges
assign privileges to filter by that the subject has on the attribute definition- Parameters:
thePrivileges
-- Returns:
- this for chaining
-
assignQueryOptions
if sorting, paging, caching, etc- Parameters:
theQueryOptions
-- Returns:
- this for chaining
-
assignScope
scope to look for attribute defs Wildcards will be appended or percent is the wildcard- Parameters:
theScope
-- 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
-
assignStemScope
if passing in a stem, this is the stem scope...- Parameters:
theStemScope
-- Returns:
- this for chaining
-
assignSubject
this is the subject that has certain privileges or is in the service- Parameters:
theSubject
-- Returns:
- this for chaining
-
findAttributes
find all the attribute defs- Returns:
- the set of attribute defs or the empty set if none found
-
assignFindByUuidOrName
if we are looking up a attribute def, only look by uuid or name- Parameters:
theFindByUuidOrName
-- Returns:
- the attribute def finder
-
findAttribute
find the attributeDef- Returns:
- the attributeDef or null
-
addAttributeDefId
add a attribute def id to search for- Parameters:
attributeDefId
-- Returns:
- this for chaining
-
addNameOfAttributeDef
add a attribute def name to search for- Parameters:
nameOfAttributeDef
-- Returns:
- this for chaining
-
addAttributeDefNameId
add a attribute def id to search for- Parameters:
attributeDefNameId
-- Returns:
- this for chaining
-
assignAttributeDefIds
assign attributeDef ids to search for- Parameters:
theAttributeDefIds
-- Returns:
- this for chaining
-
assignNamesOfAttributeDefs
assign attributeDef names- Parameters:
theNamesOfAttributeDefs
-- Returns:
- this for chaining
-
assignAttributeDefNameIds
assign attributeDef ids to search for- Parameters:
theAttributeDefNameIds
-- Returns:
- this for chaining
-
findIdIndexesByNames
this will cache for a minute, find id index by name- Parameters:
attributeDefNames2
-- Returns:
- the id indexes
-