public interface Attribute
Attribute
element identifies an attribute by name and
optionally includes its value(s). It has the AttributeType
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>
Modifier and Type | Method and Description |
---|---|
EncryptedAttribute |
encrypt(EncryptionConfig encryptionConfig,
String recipientEntityID)
Returns an
EncryptedAttribute object. |
Map |
getAnyAttribute()
Returns the
anyAttribute of the attribute. |
List |
getAttributeValue()
Returns the
AttributeValue (s) of the Attribute . |
List<String> |
getAttributeValueString()
Returns the
AttributeValue (s) of the Attribute . |
String |
getFriendlyName()
Returns the
FriendlyName of the attribute. |
String |
getName()
Returns the
Name of the attribute. |
String |
getNameFormat()
Returns the
NameFormat of the attribute. |
boolean |
isMutable()
Returns the mutability of the object.
|
void |
makeImmutable()
Makes the object immutable.
|
void |
setAnyAttribute(Map value)
Sets the
anyAttribute of the attribute. |
void |
setAttributeValue(List value)
Sets the
AttributeValue (s) of the Attribute . |
void |
setAttributeValueString(List value)
Sets the value of
AttributeValue element(s). |
void |
setFriendlyName(String value)
Sets the
FriendlyName of the attribute. |
void |
setName(String value)
Sets the
Name of the attribute. |
void |
setNameFormat(String value)
Sets the
NameFormat of the attribute. |
String |
toXMLString()
Returns a String representation of the element.
|
String |
toXMLString(boolean includeNS,
boolean declareNS)
Returns a String representation of the element.
|
void makeImmutable()
boolean isMutable()
true
if the object is mutable;
false
otherwise.List getAttributeValue()
AttributeValue
(s) of the Attribute
.AttributeValue
(s)
of the Attribute
.Attribute.setAttributeValue(List)
void setAttributeValue(List value) throws SAML2Exception
AttributeValue
(s) of the Attribute
.value
- List of xml String representing the new
AttributeValue
element(s).SAML2Exception
- if the object is immutable.Attribute.getAttributeValue()
List<String> getAttributeValueString()
AttributeValue
(s) of the Attribute
.AttributeValue
(s).Attribute.setAttributeValueString(List)
void setAttributeValueString(List value) throws SAML2Exception
AttributeValue
element(s).value
- List of String representing the value of the new
AttributeValue
element(s).SAML2Exception
- if the object is immutable.Attribute.getAttributeValueString()
String getName()
Name
of the attribute.Name
of the attribute.Attribute.setName(String)
void setName(String value) throws SAML2Exception
Name
of the attribute.value
- new Name
of the attribute.SAML2Exception
- if the object is immutable.Attribute.getName()
String getNameFormat()
NameFormat
of the attribute.NameFormat
.Attribute.setNameFormat(String)
void setNameFormat(String value) throws SAML2Exception
NameFormat
of the attribute.value
- new NameFormat
of the attribute.SAML2Exception
- if the object is immutable.Attribute.getNameFormat()
String getFriendlyName()
FriendlyName
of the attribute.FriendlyName
of the attribute.Attribute.setFriendlyName(String)
void setFriendlyName(String value) throws SAML2Exception
FriendlyName
of the attribute.value
- new FriendlyName
of the attribute.SAML2Exception
- if the object is immutable.Attribute.getFriendlyName()
Map getAnyAttribute()
anyAttribute
of the attribute.anyAttribute
.
Both the name and value are String object types.Attribute.setAnyAttribute(Map)
void setAnyAttribute(Map value) throws SAML2Exception
anyAttribute
of the attribute.value
- Map of name/value pairs to be set. Both the name and value
are String object types.SAML2Exception
- if the object is immutable.Attribute.getAnyAttribute()
EncryptedAttribute encrypt(EncryptionConfig encryptionConfig, String recipientEntityID) throws SAML2Exception
EncryptedAttribute
object.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.EncryptedAttribute
objectSAML2Exception
- if error occurs during the encryption process.String toXMLString() throws SAML2Exception
SAML2Exception
- if the object does not conform to the schema.String toXMLString(boolean includeNS, boolean declareNS) throws SAML2Exception
includeNS
- Determines whether or not the namespace qualifier is
prepended to the Element when converteddeclareNS
- Determines whether or not the namespace is declared
within the Element.SAML2Exception
- if the object does not conform to the schema.Copyright © 2010-2018, ForgeRock All Rights Reserved.