@NotThreadSafe public class IdPAttribute extends Object implements Comparable<IdPAttribute>, Cloneable
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.| Modifier and Type | Field and Description |
|---|---|
private static com.google.common.base.Function<IdPAttributeValue<?>,IdPAttributeValue<?>> |
convertNullValues
helper
Function to convert null to EmptyAttributeValue. |
private Map<Locale,String> |
displayDescriptions
Localized human readable descriptions of attribute.
|
private Map<Locale,String> |
displayNames
Localized human intelligible attribute names.
|
private Set<AttributeEncoder<?>> |
encoders
Encoders that may be used to encode this attribute.
|
private String |
id
ID of this attribute.
|
private List<IdPAttributeValue<?>> |
values
Values for this attribute.
|
| Constructor and Description |
|---|
IdPAttribute(String attributeId)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private Map<Locale,String> |
checkedNamesFrom(Map<Locale,String> inputMap)
Process input to
setDisplayNames(Map) and {setDisplayDescriptions(Map) to strip out null input,
null keys, and null values. |
IdPAttribute |
clone()
Clones an attribute.
|
int |
compareTo(IdPAttribute other) |
boolean |
equals(Object obj) |
Map<Locale,String> |
getDisplayDescriptions()
Gets the localized human readable description of attribute.
|
Map<Locale,String> |
getDisplayNames()
Gets the localized human readable name of the attribute.
|
Set<AttributeEncoder<?>> |
getEncoders()
Gets the list of attribute encoders usable with this attribute.
|
String |
getId()
Gets the unique ID of the attribute.
|
List<IdPAttributeValue<?>> |
getValues()
Get the unmodifiable ordered collection of values of the attribute.
|
int |
hashCode() |
void |
setDisplayDescriptions(Map<Locale,String> newDescriptions)
Replaces the existing display descriptions for this attribute with the given ones.
|
void |
setDisplayNames(Map<Locale,String> newNames)
Replaces the existing display names for this attribute with the given ones.
|
void |
setEncoders(Collection<AttributeEncoder<?>> newEncoders)
Replaces the existing encoders for this attribute with the given encoders.
|
void |
setValues(Collection<? extends IdPAttributeValue<?>> newValues)
Replaces the existing values for this attribute with the given values.
|
String |
toString() |
private static com.google.common.base.Function<IdPAttributeValue<?>,IdPAttributeValue<?>> convertNullValues
Function to convert null to EmptyAttributeValue.@Nonnull private Map<Locale,String> displayNames
@Nonnull private Map<Locale,String> displayDescriptions
@Nonnull private List<IdPAttributeValue<?>> values
@Nonnull private Set<AttributeEncoder<?>> encoders
public IdPAttribute(@Nonnull@NotEmpty@ParameterName(name="attributeId") String attributeId)
attributeId - unique identifier of the attribute@Nonnull @NotEmpty public String getId()
@Nonnull @NonnullElements @Unmodifiable public Map<Locale,String> getDisplayNames()
@Nonnull @NonnullElements @Unmodifiable private Map<Locale,String> checkedNamesFrom(@Nullable@NullableElements Map<Locale,String> inputMap)
setDisplayNames(Map) and {setDisplayDescriptions(Map) to strip out null input,
null keys, and null values.inputMap - the input map.public void setDisplayNames(@Nullable@NullableElements Map<Locale,String> newNames)
newNames - the new names for this attribute@Nonnull @NonnullElements @Unmodifiable public Map<Locale,String> getDisplayDescriptions()
public void setDisplayDescriptions(@Nullable@NullableElements Map<Locale,String> newDescriptions)
newDescriptions - the new descriptions for this attribute@Nonnull @NonnullElements @Unmodifiable @NotLive public List<IdPAttributeValue<?>> getValues()
public void setValues(@Nullable@NullableElements Collection<? extends IdPAttributeValue<?>> newValues)
newValues - the new values for this attribute@Nonnull @NonnullElements @Unmodifiable @NotLive public Set<AttributeEncoder<?>> getEncoders()
public void setEncoders(@Nullable@NullableElements Collection<AttributeEncoder<?>> newEncoders)
newEncoders - the new encoders for this attributepublic int compareTo(IdPAttribute other)
compareTo in interface Comparable<IdPAttribute>@Nonnull public IdPAttribute clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.