Package com.sun.identity.saml.assertion
Class Attribute
- java.lang.Object
-
- com.sun.identity.saml.assertion.AttributeDesignator
-
- com.sun.identity.saml.assertion.Attribute
-
@SupportedAll public class Attribute extends AttributeDesignator
TheAttribute
element specifies an attribute of the assertion subject. TheAttribute
element is an extension of theAttributeDesignator
element that allows the attribute value to be specified.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Element>
_attributeValue
-
Fields inherited from class com.sun.identity.saml.assertion.AttributeDesignator
_attributeName, _attributeNameSpace
-
-
Constructor Summary
Constructors Constructor Description Attribute(String name, String nameSpace, String attributeValue)
Constructs an instance ofAttribute
.Attribute(String name, String nameSpace, List<Element> values)
Constructs an instance ofAttribute
.Attribute(Element element)
Constructs an attribute element from an existing XML block.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttributeValue(String value)
AddsAttributeValue
to the Attribute.void
addAttributeValue(Element element)
AddsAttributeValue
to the Attribute.List<Element>
getAttributeValue()
ReturnsAttributeValue
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.-
Methods inherited from class com.sun.identity.saml.assertion.AttributeDesignator
getAttributeName, getAttributeNamespace
-
-
-
-
Constructor Detail
-
Attribute
public Attribute(Element element) throws SAMLException
Constructs an attribute element from an existing XML block.- Parameters:
element
- representing a DOM tree element.- Throws:
SAMLException
- if there is an error in the sender or in the element definition.
-
Attribute
public Attribute(String name, String nameSpace, List<Element> values) throws SAMLException
Constructs an instance ofAttribute
.- Parameters:
name
- A String representingAttributeName
(the name of the attribute).nameSpace
- A String representing the namespace in whichAttributeName
elements are interpreted.values
- A List of DOM element representing theAttributeValue
object.- Throws:
SAMLException
- if there is an error in the sender or in the element definition.
-
Attribute
public Attribute(String name, String nameSpace, String attributeValue) throws SAMLException
Constructs an instance ofAttribute
.- Parameters:
name
- The name of the attribute.nameSpace
- The namespace in whichAttributeName
elements are interpreted.attributeValue
- anAttributeValue
object.- Throws:
SAMLException
- if there is an error in the sender or in the element definition.
-
-
Method Detail
-
getAttributeValue
public List<Element> getAttributeValue() throws SAMLException
ReturnsAttributeValue
from the Attribute.- Returns:
- A list of DOM Element representing the
AttributeValue
block. - Throws:
SAMLException
- If there was an error.
-
addAttributeValue
public void addAttributeValue(String value) throws SAMLException
AddsAttributeValue
to the Attribute.- Parameters:
value
- A String representingAttributeValue
.- Throws:
SAMLException
- If there was an error.
-
addAttributeValue
public void addAttributeValue(Element element) throws SAMLException
AddsAttributeValue
to the Attribute.- Parameters:
element
- An Element object representingAttributeValue
.- Throws:
SAMLException
- If there was an error.
-
toString
public String toString()
Returns a String representation of the<saml:Attribute>
element,- Overrides:
toString
in classAttributeDesignator
- Returns:
- A string containing the valid XML for this element.
-
toString
public String toString(boolean includeNS, boolean declareNS)
Returns a String representation of the<saml:Attribute>
element.- Overrides:
toString
in classAttributeDesignator
- Parameters:
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.- Returns:
- A string containing the valid XML for this element
-
-