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
Since:
6.2.0
  • Constructor Details

    • DefaultAttributeDefinitionStore

      public DefaultAttributeDefinitionStore(org.springframework.core.io.Resource resource) throws Exception
      Throws:
      Exception
    • DefaultAttributeDefinitionStore

      public DefaultAttributeDefinitionStore(org.apereo.cas.authentication.attribute.AttributeDefinition... definitions)
  • 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:
      registerAttributeDefinition in interface org.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:
      registerAttributeDefinition in interface org.apereo.cas.authentication.attribute.AttributeDefinitionStore
    • removeAttributeDefinition

      @CanIgnoreReturnValue public org.apereo.cas.authentication.attribute.AttributeDefinitionStore removeAttributeDefinition(String key)
      Specified by:
      removeAttributeDefinition in interface org.apereo.cas.authentication.attribute.AttributeDefinitionStore
    • locateAttributeDefinitionByName

      public Optional<org.apereo.cas.authentication.attribute.AttributeDefinition> locateAttributeDefinitionByName(String name)
      Specified by:
      locateAttributeDefinitionByName in interface org.apereo.cas.authentication.attribute.AttributeDefinitionStore
    • locateAttributeDefinition

      public Optional<org.apereo.cas.authentication.attribute.AttributeDefinition> locateAttributeDefinition(String key)
      Specified by:
      locateAttributeDefinition in interface org.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:
      locateAttributeDefinition in interface org.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:
      locateAttributeDefinition in interface org.apereo.cas.authentication.attribute.AttributeDefinitionStore
    • getAttributeDefinitions

      public Collection<org.apereo.cas.authentication.attribute.AttributeDefinition> getAttributeDefinitions()
      Specified by:
      getAttributeDefinitions in interface org.apereo.cas.authentication.attribute.AttributeDefinitionStore
    • getAttributeDefinitionsBy

      public <T extends org.apereo.cas.authentication.attribute.AttributeDefinition> Stream<T> getAttributeDefinitionsBy(Class<T> type)
      Specified by:
      getAttributeDefinitionsBy in interface org.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:
      resolveAttributeValues in interface org.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:
      resolveAttributeValues in interface org.apereo.cas.authentication.attribute.AttributeDefinitionStore
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.apereo.cas.authentication.attribute.AttributeDefinitionStore
    • store

      @CanIgnoreReturnValue public org.apereo.cas.authentication.attribute.AttributeDefinitionStore store(org.springframework.core.io.Resource resource)
      Specified by:
      store in interface org.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:
      close in interface AutoCloseable
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
    • watchStore

      public void watchStore(org.springframework.core.io.Resource resource) throws Exception
      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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setScope

      public void setScope(String scope)
    • getScope

      public String getScope()