public class Attribute extends AttributeDesignator
Attribute
element specifies an attribute of the assertion
subject. The Attribute
element is an extension of the
AttributeDesignator
element
that allows the attribute value to be specified.Constructor and Description |
---|
Attribute(Element element)
Constructs an attribute element from an existing XML block.
|
Attribute(String name,
String nameSpace,
List<Element> values)
Constructs an instance of
Attribute . |
Attribute(String name,
String nameSpace,
String attributeValue)
Constructs an instance of
Attribute . |
Modifier and Type | Method and Description |
---|---|
void |
addAttributeValue(Element element)
Adds
AttributeValue to the Attribute. |
void |
addAttributeValue(String value)
Adds
AttributeValue to the Attribute. |
List<Element> |
getAttributeValue()
Returns
AttributeValue from the Attribute. |
String |
toString()
Returns a String representation of the
<saml:Attribute> element, |
String |
toString(boolean includeNS,
boolean declareNS)
Returns a String representation of the
<saml:Attribute> element. |
getAttributeName, getAttributeNamespace
public Attribute(Element element) throws SAMLException
element
- representing a DOM tree element.SAMLException
- if there is an error in the sender or in the
element definition.public Attribute(String name, String nameSpace, List<Element> values) throws SAMLException
Attribute
.name
- A String representing AttributeName
(the name
of the attribute).nameSpace
- A String representing the namespace in which
AttributeName
elements are interpreted.values
- A List of DOM element representing the
AttributeValue
object.SAMLException
- if there is an error in the sender or in the
element definition.public Attribute(String name, String nameSpace, String attributeValue) throws SAMLException
Attribute
.name
- The name of the attribute.nameSpace
- The namespace in which AttributeName
elements are interpreted.attributeValue
- an AttributeValue
object.SAMLException
- if there is an error in the sender or in
the element definition.public List<Element> getAttributeValue() throws SAMLException
AttributeValue
from the Attribute.AttributeValue
block.SAMLException
- If there was an error.public void addAttributeValue(String value) throws SAMLException
AttributeValue
to the Attribute.value
- A String representing AttributeValue
.SAMLException
- If there was an error.public void addAttributeValue(Element element) throws SAMLException
AttributeValue
to the Attribute.element
- An Element object representing
AttributeValue
.SAMLException
- If there was an error.public String toString()
<saml:Attribute>
element,toString
in class AttributeDesignator
public String toString(boolean includeNS, boolean declareNS)
<saml:Attribute>
element.toString
in class AttributeDesignator
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.Copyright © 2010-2018, ForgeRock All Rights Reserved.