com.sun.identity.saml.assertion
Class AttributeStatement

java.lang.Object
  extended by com.sun.identity.saml.assertion.Statement
      extended by com.sun.identity.saml.assertion.SubjectStatement
          extended by com.sun.identity.saml.assertion.AttributeStatement

public class AttributeStatement
extends SubjectStatement

The AttributeStatement element supplies a statement by the issuer that the specified subject is associated with the specified attributes.


Field Summary
 
Fields inherited from class com.sun.identity.saml.assertion.SubjectStatement
_subject
 
Fields inherited from class com.sun.identity.saml.assertion.Statement
ATTRIBUTE_STATEMENT, AUTHENTICATION_STATEMENT, AUTHORIZATION_DECISION_STATEMENT, NOT_SUPPORTED
 
Constructor Summary
protected AttributeStatement()
          Dafault constructor
  AttributeStatement(Element element)
          Constructs an AttributStatement element from an existing XML block
  AttributeStatement(Subject subject, List attribute)
          Constructs an instance of AttributeStatement.
 
Method Summary
protected  Attribute createAttribute(Element attributeElement)
           
protected  Subject createSubject(Element subjectElement)
           
 List getAttribute()
          Gets attribute from Attribute statement
 int getStatementType()
          Gets the type of statement.
 String toString()
          Creates a String representation of the attribute statement
 String toString(boolean includeNS, boolean declareNS)
          Returns a String representation of the Attribute statement.
 
Methods inherited from class com.sun.identity.saml.assertion.SubjectStatement
getSubject, setSubject
 

Constructor Detail

AttributeStatement

protected AttributeStatement()
Dafault constructor


AttributeStatement

public AttributeStatement(Element element)
                   throws SAMLException
Constructs an AttributStatement 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.

AttributeStatement

public AttributeStatement(Subject subject,
                          List attribute)
                   throws SAMLException
Constructs an instance of AttributeStatement.

Parameters:
subject - (required) A Subject object.
attribute - (one or more) A List of Attribute objects.
Throws:
SAMLException - if there is an error in the sender.
Method Detail

getAttribute

public List getAttribute()
Gets attribute from Attribute statement

Returns:
A list of Attributes contained in this statement

getStatementType

public int getStatementType()
Gets the type of statement.

Specified by:
getStatementType in class Statement
Returns:
an Integer which is Statement.ATTRIBUTE_STATEMENT.

toString

public String toString()
Creates a String representation of the attribute statement

Overrides:
toString in class Object
Returns:
A string representation of the AttributeStatement element

toString

public String toString(boolean includeNS,
                       boolean declareNS)
Returns a String representation of the Attribute statement.

Specified by:
toString in class SubjectStatement
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 representation of the <saml:AttributeStatement> element.

createSubject

protected Subject createSubject(Element subjectElement)
                         throws SAMLException
Throws:
SAMLException

createAttribute

protected Attribute createAttribute(Element attributeElement)
                             throws SAMLException
Throws:
SAMLException