com.sun.identity.saml.protocol
Class Status

java.lang.Object
  |
  +--com.sun.identity.saml.protocol.Status

public class Status
extends java.lang.Object

This class represents the Status element. It corresponds to <samlp:StatusType> in SAML protocol schema.


Constructor Summary
Status(org.w3c.dom.Element status)
          This constructor is used to construct a Status from a DOM element.
Status(StatusCode code)
          Constructs a Status object from a StatusCode.
Status(StatusCode code, java.lang.String message, org.w3c.dom.Element detail)
          Constructor.
 
Method Summary
 StatusCode getStatusCode()
          Gets the StatusCode of the Response.
 org.w3c.dom.Element getStatusDetail()
          Gets the StatusDetail of the Response.
 java.lang.String getStatusMessage()
          Returns the StatusMessage of the Response.
 java.lang.String toString()
          This method translates the AssertionArtifact to an XML document String based on the SAML schema.
 java.lang.String toString(boolean includeNS, boolean declareNS)
          Creates a String representation of the <samlp:Status> element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Status

public Status(org.w3c.dom.Element status)
       throws SAMLException
This constructor is used to construct a Status from a DOM element.
Parameters:
status - An DOM Element that's rooted by <Status>.
Throws:
SAMLException - when an error occurs.

Status

public Status(StatusCode code,
              java.lang.String message,
              org.w3c.dom.Element detail)
       throws SAMLException
Constructor.
Parameters:
code - StatusCode.
message - A String that is the StatusMessage of the response. It could be null when there is no StatusMessage.
detail - A DOM tree element that is the StatusDetail of the response. It could be null when there is no StatusDetail.
Throws:
SAMLException -  

Status

public Status(StatusCode code)
       throws SAMLException
Constructs a Status object from a StatusCode.
Parameters:
code - StatusCode.
Throws:
SAMLException -  
Method Detail

getStatusCode

public StatusCode getStatusCode()
Gets the StatusCode of the Response.
Returns:
StatusCode of the response.

getStatusMessage

public java.lang.String getStatusMessage()
Returns the StatusMessage of the Response.
Returns:
A String that represents the StatusMessage of the response. null is returned when there is no StatusMessage in the response.

getStatusDetail

public org.w3c.dom.Element getStatusDetail()
Gets the StatusDetail of the Response.
Returns:
A DOM tree element that represents the StatusDetail of the response. Null is returned if no StatusDetail in the response.

toString

public java.lang.String toString()
This method translates the AssertionArtifact to an XML document String based on the SAML schema.
Overrides:
toString in class java.lang.Object
Returns:
An XML String representing the AssertionArtifact.

toString

public java.lang.String toString(boolean includeNS,
                                 boolean declareNS)
Creates a String representation of the <samlp:Status> element.
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