Package net.shibboleth.idp.attribute
Class IdPAttribute
java.lang.Object
net.shibboleth.idp.attribute.IdPAttribute
- All Implemented Interfaces:
Cloneable,Comparable<IdPAttribute>
- Direct Known Subclasses:
IdPRequestedAttribute
@NotThreadSafe
public class IdPAttribute
extends Object
implements Comparable<IdPAttribute>, Cloneable
Each attribute represents one piece of information about a user and has associated encoders used to turn that
information in to protocol-specific formats.
Instances of
IdPAttribute are compared using their IDs. That is, two attributes are considered the same if
they have the same ID, regardless of whether their display names, descriptions, values, or encoders are the same.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringID of this attribute.private static final org.slf4j.LoggerLogger - static.Value for testing illegal name.private List<IdPAttributeValue>Values for this attribute. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones an attribute.intcompareTo(IdPAttribute other) booleanCheck for a string value amongst this object's value collection.booleangetId()Gets the unique ID of the attribute.Get the unmodifiable ordered collection of values of the attribute.inthashCode()static booleanisDeprecatedId(String id) Centralized method to police deprecated Identifiers.static booleanisInvalidId(String id) Centralized method to police invalid Identifiers.voidsetValues(List<IdPAttributeValue> newValues) Replaces the existing values for this attribute with the given values.toString()
-
Field Details
-
SPACE_CONTAINING
Value for testing illegal name. -
LOG
@Nonnull private static final org.slf4j.Logger LOGLogger - static. -
id
ID of this attribute. -
values
Values for this attribute.
-
-
Constructor Details
-
IdPAttribute
Constructor.- Parameters:
attributeId- unique identifier of the attribute
-
-
Method Details
-
isDeprecatedId
Centralized method to police deprecated Identifiers.- Parameters:
id- what to test- Returns:
- whether the name is currently deprecated.
-
isInvalidId
Centralized method to police invalid Identifiers.- Parameters:
id- what to test- Returns:
- whether the name is disallowed.
-
getId
Gets the unique ID of the attribute. This ID need not be related to any protocol-specific attribute identifiers.- Returns:
- unique ID of the attribute
-
getValues
Get the unmodifiable ordered collection of values of the attribute.- Returns:
- values of the attribute
-
setValues
Replaces the existing values for this attribute with the given values.Nulls are replaced inline by an
EmptyAttributeValuesuitably initialized.- Parameters:
newValues- the new values for this attribute
-
contains
Check for a string value amongst this object's value collection.- Parameters:
value- value to check for- Returns:
- true iff a
StringAttributeValueexists with the input value - Since:
- 4.3.0
-
compareTo
- Specified by:
compareToin interfaceComparable<IdPAttribute>
-
clone
Clones an attribute. The clone will contains defensive copies of this objects display descriptions and names, encoders, and values. The elements of each collection, however, are not themselves cloned.- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
hashCode
public int hashCode() -
equals
-
toString
-