Class BasePersonAttributeDao

java.lang.Object
org.apereo.cas.authentication.attribute.BasePersonAttributeDao
All Implemented Interfaces:
Comparable<org.apereo.cas.authentication.principal.attribute.PersonAttributeDao>, org.apereo.cas.authentication.principal.attribute.PersonAttributeDao, org.springframework.core.Ordered
Direct Known Subclasses:
AbstractFlatteningPersonAttributeDao, StubPersonAttributeDao

public abstract class BasePersonAttributeDao extends Object implements org.apereo.cas.authentication.principal.attribute.PersonAttributeDao
Base PersonAttributeDao that provides implementations of the deprecated methods.
Since:
7.1.0
  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE

    Fields inherited from interface org.apereo.cas.authentication.principal.attribute.PersonAttributeDao

    WILDCARD, WILDCARD_PATTERN
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compareTo(org.apereo.cas.authentication.principal.attribute.PersonAttributeDao o)
     
    boolean
     
     
    int
     
     
    int
     
    boolean
     
    static Map<String,Set<String>>
    Translate from a more flexible Attribute to Attribute mapping format to a Map from String to Set of Strings.
    putTag(String name, Object value)
    Put tag into this DAO and override/remove existing tags by name.
    void
    setEnabled(boolean enabled)
     
    void
    setId(String... id)
     
    void
    setOrder(int order)
     
    void
     
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apereo.cas.authentication.principal.attribute.PersonAttributeDao

    getAvailableQueryAttributes, getPeople, getPeople, getPeople, getPeople, getPeopleWithMultivaluedAttributes, getPeopleWithMultivaluedAttributes, getPeopleWithMultivaluedAttributes, getPeopleWithMultivaluedAttributes, getPerson, getPerson, getPerson, getPossibleUserAttributeNames, stuffAttributesIntoList
  • Constructor Details

    • BasePersonAttributeDao

      public BasePersonAttributeDao()
  • Method Details

    • compareTo

      public int compareTo(org.apereo.cas.authentication.principal.attribute.PersonAttributeDao o)
      Specified by:
      compareTo in interface Comparable<org.apereo.cas.authentication.principal.attribute.PersonAttributeDao>
    • setId

      public void setId(String... id)
    • putTag

      public BasePersonAttributeDao putTag(String name, Object value)
      Put tag into this DAO and override/remove existing tags by name.
      Parameters:
      name - the name
      value - the value
      Returns:
      the base person attribute dao
    • parseAttributeToAttributeMapping

      public static Map<String,Set<String>> parseAttributeToAttributeMapping(Map<String,?> mapping)
      Translate from a more flexible Attribute to Attribute mapping format to a Map from String to Set of Strings.

      The point of the map is to map from attribute names in the underlying data store (e.g., JDBC column names, LDAP attribute names) to uPortal attribute names. Any given underlying data store attribute might map to zero uPortal attributes (not appear in the map at all), map to exactly one uPortal attribute (appear in the Map as a mapping from a String to a String or as a mapping from a String to a Set containing just one String), or map to several uPortal attribute names (appear in the Map as a mapping from a String to a Set of Strings).

      This method takes as its argument a Map that must have keys of type String and values of type String or Set of Strings. The argument must not be null and must have no null keys. It must contain no keys other than Strings and no values other than Strings or Sets of Strings. This method will convert any non-string values to a String using the object's toString() method.

      This method returns a Map equivalent to its argument except wherever there was a String value in the Map there will instead be an immutable Set containing the String value. That is, the return value is normalized to be a Map from String to Set (of String).

      Parameters:
      mapping - Map from String names of attributes in the underlying store to attribute names or Sets of such names.
      Returns:
      a Map from String to Set of Strings
    • toString

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

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

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

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
      Specified by:
      getOrder in interface org.apereo.cas.authentication.principal.attribute.PersonAttributeDao
    • setOrder

      public void setOrder(int order)
    • getId

      public String[] getId()
      Specified by:
      getId in interface org.apereo.cas.authentication.principal.attribute.PersonAttributeDao
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface org.apereo.cas.authentication.principal.attribute.PersonAttributeDao
    • setEnabled

      public void setEnabled(boolean enabled)
    • getTags

      public Map<String,Object> getTags()
      Specified by:
      getTags in interface org.apereo.cas.authentication.principal.attribute.PersonAttributeDao
    • setTags

      public void setTags(Map<String,Object> tags)