Class DefaultAttributeDefinitionStore
java.lang.Object
org.apereo.cas.authentication.attribute.DefaultAttributeDefinitionStore
- All Implemented Interfaces:
AutoCloseable,org.apereo.cas.authentication.attribute.AttributeDefinitionStore,org.springframework.beans.factory.DisposableBean
public class DefaultAttributeDefinitionStore
extends Object
implements org.apereo.cas.authentication.attribute.AttributeDefinitionStore, org.springframework.beans.factory.DisposableBean, AutoCloseable
This is
DefaultAttributeDefinitionStore.- Since:
- 6.2.0
-
Field Summary
Fields inherited from interface org.apereo.cas.authentication.attribute.AttributeDefinitionStore
BEAN_NAME -
Constructor Summary
ConstructorsConstructorDescriptionDefaultAttributeDefinitionStore(org.apereo.cas.authentication.attribute.AttributeDefinition... definitions) DefaultAttributeDefinitionStore(org.springframework.core.io.Resource resource) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddestroy()booleanfrom(org.springframework.core.io.Resource resource) From resource.Collection<org.apereo.cas.authentication.attribute.AttributeDefinition> <T extends org.apereo.cas.authentication.attribute.AttributeDefinition>
Stream<T> getAttributeDefinitionsBy(Class<T> type) getScope()inthashCode()voidimportStore(org.springframework.core.io.Resource resource) Import store.booleanisEmpty()Optional<org.apereo.cas.authentication.attribute.AttributeDefinition> <T extends org.apereo.cas.authentication.attribute.AttributeDefinition>
Optional<T> locateAttributeDefinition(String key, Class<T> clazz) <T extends org.apereo.cas.authentication.attribute.AttributeDefinition>
Optional<T> locateAttributeDefinition(Predicate<org.apereo.cas.authentication.attribute.AttributeDefinition> predicate) Optional<org.apereo.cas.authentication.attribute.AttributeDefinition> org.apereo.cas.authentication.attribute.AttributeDefinitionStoreregisterAttributeDefinition(String key, org.apereo.cas.authentication.attribute.AttributeDefinition definition) org.apereo.cas.authentication.attribute.AttributeDefinitionStoreregisterAttributeDefinition(org.apereo.cas.authentication.attribute.AttributeDefinition definition) voidregisterAttributeDefinitions(Map<String, org.apereo.cas.authentication.attribute.AttributeDefinition> entries) Register attribute definitions.org.apereo.cas.authentication.attribute.AttributeDefinitionStoreOptional<org.apache.commons.lang3.tuple.Pair<org.apereo.cas.authentication.attribute.AttributeDefinition, List<Object>>> resolveAttributeValues(String key, org.apereo.cas.authentication.attribute.AttributeDefinitionResolutionContext context) resolveAttributeValues(Collection<String> attributeDefinitions, Map<String, List<Object>> availableAttributes, org.apereo.cas.authentication.principal.Principal principal, org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.Service service) voidorg.apereo.cas.authentication.attribute.AttributeDefinitionStorestore(org.springframework.core.io.Resource resource) toString()voidwatchStore(org.springframework.core.io.Resource resource) Watch store.Methods inherited from interface org.apereo.cas.authentication.attribute.AttributeDefinitionStore
locateAttributeDefinitionByName
-
Constructor Details
-
Method Details
-
registerAttributeDefinitions
public void registerAttributeDefinitions(Map<String, org.apereo.cas.authentication.attribute.AttributeDefinition> entries) Register attribute definitions.- Parameters:
entries- the entries
-
registerAttributeDefinition
@CanIgnoreReturnValue public org.apereo.cas.authentication.attribute.AttributeDefinitionStore registerAttributeDefinition(org.apereo.cas.authentication.attribute.AttributeDefinition definition) - Specified by:
registerAttributeDefinitionin interfaceorg.apereo.cas.authentication.attribute.AttributeDefinitionStore
-
registerAttributeDefinition
@CanIgnoreReturnValue public org.apereo.cas.authentication.attribute.AttributeDefinitionStore registerAttributeDefinition(String key, org.apereo.cas.authentication.attribute.AttributeDefinition definition) - Specified by:
registerAttributeDefinitionin interfaceorg.apereo.cas.authentication.attribute.AttributeDefinitionStore
-
removeAttributeDefinition
@CanIgnoreReturnValue public org.apereo.cas.authentication.attribute.AttributeDefinitionStore removeAttributeDefinition(String key) - Specified by:
removeAttributeDefinitionin interfaceorg.apereo.cas.authentication.attribute.AttributeDefinitionStore
-
locateAttributeDefinitionByName
public Optional<org.apereo.cas.authentication.attribute.AttributeDefinition> locateAttributeDefinitionByName(String name) - Specified by:
locateAttributeDefinitionByNamein interfaceorg.apereo.cas.authentication.attribute.AttributeDefinitionStore
-
locateAttributeDefinition
public Optional<org.apereo.cas.authentication.attribute.AttributeDefinition> locateAttributeDefinition(String key) - Specified by:
locateAttributeDefinitionin interfaceorg.apereo.cas.authentication.attribute.AttributeDefinitionStore
-
locateAttributeDefinition
public <T extends org.apereo.cas.authentication.attribute.AttributeDefinition> Optional<T> locateAttributeDefinition(String key, Class<T> clazz) - Specified by:
locateAttributeDefinitionin interfaceorg.apereo.cas.authentication.attribute.AttributeDefinitionStore
-
locateAttributeDefinition
public <T extends org.apereo.cas.authentication.attribute.AttributeDefinition> Optional<T> locateAttributeDefinition(Predicate<org.apereo.cas.authentication.attribute.AttributeDefinition> predicate) - Specified by:
locateAttributeDefinitionin interfaceorg.apereo.cas.authentication.attribute.AttributeDefinitionStore
-
getAttributeDefinitions
public Collection<org.apereo.cas.authentication.attribute.AttributeDefinition> getAttributeDefinitions()- Specified by:
getAttributeDefinitionsin interfaceorg.apereo.cas.authentication.attribute.AttributeDefinitionStore
-
getAttributeDefinitionsBy
public <T extends org.apereo.cas.authentication.attribute.AttributeDefinition> Stream<T> getAttributeDefinitionsBy(Class<T> type) - Specified by:
getAttributeDefinitionsByin interfaceorg.apereo.cas.authentication.attribute.AttributeDefinitionStore
-
resolveAttributeValues
public Map<String,List<Object>> resolveAttributeValues(Collection<String> attributeDefinitions, Map<String, List<Object>> availableAttributes, org.apereo.cas.authentication.principal.Principal principal, org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.principal.Service service) - Specified by:
resolveAttributeValuesin interfaceorg.apereo.cas.authentication.attribute.AttributeDefinitionStore
-
resolveAttributeValues
public Optional<org.apache.commons.lang3.tuple.Pair<org.apereo.cas.authentication.attribute.AttributeDefinition,List<Object>>> resolveAttributeValues(String key, org.apereo.cas.authentication.attribute.AttributeDefinitionResolutionContext context) - Specified by:
resolveAttributeValuesin interfaceorg.apereo.cas.authentication.attribute.AttributeDefinitionStore
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceorg.apereo.cas.authentication.attribute.AttributeDefinitionStore
-
store
@CanIgnoreReturnValue public org.apereo.cas.authentication.attribute.AttributeDefinitionStore store(org.springframework.core.io.Resource resource) - Specified by:
storein interfaceorg.apereo.cas.authentication.attribute.AttributeDefinitionStore
-
importStore
public void importStore(org.springframework.core.io.Resource resource) Import store.- Parameters:
resource- the resource
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
watchStore
Watch store.- Parameters:
resource- the resource- Throws:
Exception- the exception
-
from
public static Map<String,org.apereo.cas.authentication.attribute.AttributeDefinition> from(org.springframework.core.io.Resource resource) From resource.- Parameters:
resource- the resource- Returns:
- the map
-
equals
-
hashCode
public int hashCode() -
toString
-
setScope
-
getScope
-