Package com.sun.identity.saml2.assertion
Interface Attribute
-
- All Superinterfaces:
XmlSerializable
@SupportedAll public interface Attribute extends XmlSerializable
TheAttribute
element identifies an attribute by name and optionally includes its value(s). It has theAttributeType
complex type.<complexType name="AttributeType"> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <element ref="{urn:oasis:names:tc:SAML:2.0:assertion} AttributeValue" maxOccurs="unbounded" minOccurs="0"/> </sequence> <attribute name="FriendlyName" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="Name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="NameFormat" type="{http://www.w3.org/2001/XMLSchema}anyURI" /> </restriction> </complexContent> </complexType>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EncryptedAttribute
encrypt(com.sun.identity.saml2.key.EncryptionConfig encryptionConfig, String recipientEntityID)
Returns anEncryptedAttribute
object.Map
getAnyAttribute()
Returns theanyAttribute
of the attribute.List
getAttributeValue()
Returns theAttributeValue
(s) of theAttribute
.List<String>
getAttributeValueString()
Returns theAttributeValue
(s) of theAttribute
.String
getFriendlyName()
Returns theFriendlyName
of the attribute.String
getName()
Returns theName
of the attribute.String
getNameFormat()
Returns theNameFormat
of the attribute.boolean
isMutable()
Returns the mutability of the object.void
makeImmutable()
Makes the object immutable.void
setAnyAttribute(Map value)
Sets theanyAttribute
of the attribute.void
setAttributeValue(List value)
Sets theAttributeValue
(s) of theAttribute
.void
setAttributeValueString(List value)
Sets the value ofAttributeValue
element(s).void
setFriendlyName(String value)
Sets theFriendlyName
of the attribute.void
setName(String value)
Sets theName
of the attribute.void
setNameFormat(String value)
Sets theNameFormat
of the attribute.-
Methods inherited from interface com.sun.identity.saml2.common.XmlSerializable
toDocumentFragment, toXMLString, toXMLString
-
-
-
-
Method Detail
-
makeImmutable
void makeImmutable()
Makes the object immutable.
-
isMutable
boolean isMutable()
Returns the mutability of the object.- Returns:
true
if the object is mutable;false
otherwise.
-
getAttributeValue
List getAttributeValue()
Returns theAttributeValue
(s) of theAttribute
.- Returns:
- List of xml String representing
AttributeValue
(s) of theAttribute
. - See Also:
setAttributeValue(List)
-
setAttributeValue
void setAttributeValue(List value) throws SAML2Exception
Sets theAttributeValue
(s) of theAttribute
.- Parameters:
value
- List of xml String representing the newAttributeValue
element(s).- Throws:
SAML2Exception
- if the object is immutable.- See Also:
getAttributeValue()
-
getAttributeValueString
List<String> getAttributeValueString()
Returns theAttributeValue
(s) of theAttribute
.- Returns:
- List of String representing the value of
AttributeValue
(s). - See Also:
setAttributeValueString(List)
-
setAttributeValueString
void setAttributeValueString(List value) throws SAML2Exception
Sets the value ofAttributeValue
element(s).- Parameters:
value
- List of String representing the value of the newAttributeValue
element(s).- Throws:
SAML2Exception
- if the object is immutable.- See Also:
getAttributeValueString()
-
getName
String getName()
Returns theName
of the attribute.- Returns:
- the
Name
of the attribute. - See Also:
setName(String)
-
setName
void setName(String value) throws SAML2Exception
Sets theName
of the attribute.- Parameters:
value
- newName
of the attribute.- Throws:
SAML2Exception
- if the object is immutable.- See Also:
getName()
-
getNameFormat
String getNameFormat()
Returns theNameFormat
of the attribute.- Returns:
- the value of
NameFormat
. - See Also:
setNameFormat(String)
-
setNameFormat
void setNameFormat(String value) throws SAML2Exception
Sets theNameFormat
of the attribute.- Parameters:
value
- newNameFormat
of the attribute.- Throws:
SAML2Exception
- if the object is immutable.- See Also:
getNameFormat()
-
getFriendlyName
String getFriendlyName()
Returns theFriendlyName
of the attribute.- Returns:
- the value of
FriendlyName
of the attribute. - See Also:
setFriendlyName(String)
-
setFriendlyName
void setFriendlyName(String value) throws SAML2Exception
Sets theFriendlyName
of the attribute.- Parameters:
value
- newFriendlyName
of the attribute.- Throws:
SAML2Exception
- if the object is immutable.- See Also:
getFriendlyName()
-
getAnyAttribute
Map getAnyAttribute()
Returns theanyAttribute
of the attribute.- Returns:
- A Map containing name/value pairs of
anyAttribute
. Both the name and value are String object types. - See Also:
setAnyAttribute(Map)
-
setAnyAttribute
void setAnyAttribute(Map value) throws SAML2Exception
Sets theanyAttribute
of the attribute.- Parameters:
value
- Map of name/value pairs to be set. Both the name and value are String object types.- Throws:
SAML2Exception
- if the object is immutable.- See Also:
getAnyAttribute()
-
encrypt
EncryptedAttribute encrypt(com.sun.identity.saml2.key.EncryptionConfig encryptionConfig, String recipientEntityID) throws SAML2Exception
Returns anEncryptedAttribute
object.- Parameters:
encryptionConfig
- The encryption config.recipientEntityID
- Unique identifier of the recipient, it is used as the index to the cached secret key so that the key can be reused for the same recipient; It can be null in which case the secret key will be generated every time and will not be cached and reused. Note that the generation of a secret key is a relatively expensive operation.- Returns:
EncryptedAttribute
object- Throws:
SAML2Exception
- if error occurs during the encryption process.
-
-