Interface PersonAttributes

All Superinterfaces:
Principal, Serializable

public interface PersonAttributes extends Principal, Serializable
An immutable representation of a person with a uid (username) and attributes. A user's attributes can be of any type and can be multi-valued.

Principal.getName() is used for the uid (username).

The equality and hashCode of an IPersonAttributes should ONLY include the name property and none of the attributes.

Since:
7.1.0
  • Method Details

    • getAttributes

      Map<String,List<Object>> getAttributes()
      Gets attributes.
      Returns:
      The immutable Map of all attributes for the person.
    • getAttributeValue

      Object getAttributeValue(String name)
      The value for the attribute, null if no value exists or the first value is null, if there are multiple values the first is returned.
      Parameters:
      name - The name of the attribute to get the value for
      Returns:
      The first value for the attribute
    • getAttributeValues

      List<Object> getAttributeValues(String name)
      All values of the attribute, null if no values exist.
      Parameters:
      name - The name of the attribute to get the values for
      Returns:
      All values for the attribute