Class UserAttribute
java.lang.Object
se.swedenconnect.spring.saml.idp.attributes.UserAttribute
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- RequestedAttribute
A representation of a user (identity) attribute.
- Author:
- Martin Lindström
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classClass used to store attribute value types that we don't know how to parse.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe default name format for SAML attributes.
- 
Constructor SummaryConstructorsConstructorDescriptionUserAttribute(String id) Constructor.UserAttribute(String id, String friendlyName) Constructor.UserAttribute(String id, String friendlyName, Serializable value) Constructor.UserAttribute(String id, String friendlyName, List<? extends Serializable> values) Constructor.UserAttribute(Attribute attribute) Constructs anUserAttributegiven an OpenSAMLAttribute.
- 
Method SummaryModifier and TypeMethodDescriptionGets the attribute friendly name.getId()Gets the attribute ID (name).Gets the name format URI for the attribute.Gets the attribute value(s) in string format.List<? extends Serializable> Gets the attribute value(s).voidsetFriendlyName(String friendlyName) Assigns the friendly name.voidsetNameFormat(String nameFormat) Assigns the attribute name format.voidsetValue(Serializable value) Assigns the attribute value.voidsetValues(List<? extends Serializable> values) Assigns the attribute values.Converts this object into an OpenSAMLAttributeobject.toString()
- 
Field Details- 
DEFAULT_NAME_FORMATThe default name format for SAML attributes.- See Also:
 
 
- 
- 
Constructor Details- 
UserAttributeConstructor.- Parameters:
- id- the attribute ID (name)
 
- 
UserAttributeConstructor.- Parameters:
- id- the attribute ID (name)
- friendlyName- the attribute friendly name
 
- 
UserAttributeConstructor.- Parameters:
- id- the attribute ID (name)
- friendlyName- the attribute friendly name
- value- the attribute value
 
- 
UserAttributeConstructor.- Parameters:
- id- the attribute ID (name)
- friendlyName- the attribute friendly name
- values- the attribute values
 
- 
UserAttributeConstructs anUserAttributegiven an OpenSAMLAttribute.- Parameters:
- attribute- an OpenSAML- Attribute
 
 
- 
- 
Method Details- 
getIdGets the attribute ID (name).- Returns:
- the attribute ID (name)
 
- 
getFriendlyNameGets the attribute friendly name.- Returns:
- the attribute friendly name (or nullif none has been assigned)
 
- 
setFriendlyNameAssigns the friendly name.- Parameters:
- friendlyName- the friendly name
 
- 
getNameFormatGets the name format URI for the attribute.- Returns:
- the name format
 
- 
setNameFormatAssigns the attribute name format.- Parameters:
- nameFormat- the name format
 
- 
getValuesGets the attribute value(s).- Returns:
- the attribute value(s)
 
- 
getStringValuesGets the attribute value(s) in string format.- Returns:
- the attribute value(s) in string format
 
- 
setValueAssigns the attribute value.- Parameters:
- value- the value
- See Also:
 
- 
setValuesAssigns the attribute values.- Parameters:
- values- the values
- See Also:
 
- 
toOpenSamlAttributeConverts this object into an OpenSAMLAttributeobject.- Returns:
- an OpenSAML Attribute
 
- 
toString
- 
valuesToString
 
-