Package com.sun.identity.saml.protocol
Class Status
- java.lang.Object
-
- com.sun.identity.saml.protocol.Status
-
public class Status extends Object
This class represents the Status element. It corresponds to<samlp:StatusType>in SAML protocol schema.
-
-
Constructor Summary
Constructors Constructor Description Status(StatusCode code)Constructs a Status object from aStatusCode.Status(StatusCode code, String message, Element detail)Constructor.Status(Element status)This constructor is used to construct a Status from a DOM element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatusCodegetStatusCode()Gets theStatusCodeof the Response.ElementgetStatusDetail()Gets theStatusDetailof the Response.StringgetStatusMessage()Returns theStatusMessageof the Response.StringtoString()This method translates theAssertionArtifactto an XML document String based on the SAML schema.StringtoString(boolean includeNS, boolean declareNS)Creates a String representation of the<samlp:Status>element.
-
-
-
Constructor Detail
-
Status
public Status(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, String message, Element detail) throws SAMLException
Constructor.- Parameters:
code-StatusCode.message- A String that is theStatusMessageof the response. It could be null when there is noStatusMessage.detail- A DOM tree element that is theStatusDetailof the response. It could be null when there is noStatusDetail.- Throws:
SAMLException
-
Status
public Status(StatusCode code) throws SAMLException
Constructs a Status object from aStatusCode.- Parameters:
code-StatusCode.- Throws:
SAMLException
-
-
Method Detail
-
getStatusCode
public StatusCode getStatusCode()
Gets theStatusCodeof the Response.- Returns:
StatusCodeof the response.
-
getStatusMessage
public String getStatusMessage()
Returns theStatusMessageof the Response.- Returns:
- A String that represents the
StatusMessageof the response. null is returned when there is noStatusMessagein the response.
-
getStatusDetail
public Element getStatusDetail()
Gets theStatusDetailof the Response.- Returns:
- A DOM tree element that represents the
StatusDetailof the response. Null is returned if noStatusDetailin the response.
-
toString
public String toString()
This method translates theAssertionArtifactto an XML document String based on the SAML schema.
-
toString
public 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 converteddeclareNS- Determines whether or not the namespace is declared within the Element.- Returns:
- A string containing the valid XML for this element
-
-