com.sun.identity.saml.assertion
Class Attribute

java.lang.Object
  extended by com.sun.identity.saml.assertion.AttributeDesignator
      extended by com.sun.identity.saml.assertion.Attribute

public class Attribute
extends AttributeDesignator

The 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.


Field Summary
protected  List _attributeValue
           
 
Fields inherited from class com.sun.identity.saml.assertion.AttributeDesignator
_attributeName, _attributeNameSpace
 
Constructor Summary
Attribute(Element element)
          Constructs an attribute element from an existing XML block.
Attribute(String name, String nameSpace, List values)
          Constructs an instance of Attribute.
Attribute(String name, String nameSpace, String attributeValue)
          Constructs an instance of Attribute.
 
Method Summary
 void addAttributeValue(Element element)
          Adds AttributeValue to the Attribute.
 void addAttributeValue(String value)
          Adds AttributeValue to the Attribute.
 List 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.
 
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 of Attribute.

Parameters:
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.
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 of Attribute.

Parameters:
name - The name of the attribute.
nameSpace - The namespace in which AttributeName elements are interpreted.
attributeValue - an AttributeValue object.
Throws:
SAMLException - if there is an error in the sender or in the element definition.
Method Detail

getAttributeValue

public List getAttributeValue()
                       throws SAMLException
Returns AttributeValue from the Attribute.

Returns:
A list of DOM Element representing the AttributeValue block.
Throws:
SAMLException

addAttributeValue

public void addAttributeValue(String value)
                       throws SAMLException
Adds AttributeValue to the Attribute.

Parameters:
value - A String representing AttributeValue.
Throws:
SAMLException

addAttributeValue

public void addAttributeValue(Element element)
                       throws SAMLException
Adds AttributeValue to the Attribute.

Parameters:
element - An Element object representing AttributeValue.
Throws:
SAMLException

toString

public String toString()
Returns a String representation of the <saml:Attribute> element,

Overrides:
toString in class AttributeDesignator
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 class AttributeDesignator
Parameters:
includeNS - Determines whether or not the namespace qualifier is prepended to the Element when converted
declareNS - Determines whether or not the namespace is declared within the Element.
Returns:
A string containing the valid XML for this element