Package com.sun.identity.saml.assertion
Class Attribute
- java.lang.Object
-
- com.sun.identity.saml.assertion.AttributeDesignator
-
- com.sun.identity.saml.assertion.Attribute
-
public class Attribute extends AttributeDesignator
TheAttributeelement specifies an attribute of the assertion subject. TheAttributeelement is an extension of theAttributeDesignatorelement that allows the attribute value to be specified.
-
-
Field Summary
Fields Modifier and Type Field Description protected List_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 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 voidaddAttributeValue(String value)AddsAttributeValueto the Attribute.voidaddAttributeValue(Element element)AddsAttributeValueto the Attribute.ListgetAttributeValue()ReturnsAttributeValuefrom the Attribute.StringtoString()Returns a String representation of the<saml:Attribute>element,StringtoString(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
-
-
-
-
Field Detail
-
_attributeValue
protected List _attributeValue
-
-
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 values) throws SAMLException
Constructs an instance ofAttribute.- Parameters:
name- A String representingAttributeName(the name of the attribute).nameSpace- A String representing the namespace in whichAttributeNameelements are interpreted.values- A List of DOM element representing theAttributeValueobject.- 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 whichAttributeNameelements are interpreted.attributeValue- anAttributeValueobject.- Throws:
SAMLException- if there is an error in the sender or in the element definition.
-
-
Method Detail
-
getAttributeValue
public List getAttributeValue() throws SAMLException
ReturnsAttributeValuefrom the Attribute.- Returns:
- A list of DOM Element representing the
AttributeValueblock. - Throws:
SAMLException
-
addAttributeValue
public void addAttributeValue(String value) throws SAMLException
AddsAttributeValueto the Attribute.- Parameters:
value- A String representingAttributeValue.- Throws:
SAMLException
-
addAttributeValue
public void addAttributeValue(Element element) throws SAMLException
AddsAttributeValueto the Attribute.- Parameters:
element- An Element object representingAttributeValue.- Throws:
SAMLException
-
toString
public String toString()
Returns a String representation of the<saml:Attribute>element,- Overrides:
toStringin 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:
toStringin 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
-
-