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 StatusCode
getStatusCode()
Gets theStatusCode
of the Response.Element
getStatusDetail()
Gets theStatusDetail
of the Response.String
getStatusMessage()
Returns theStatusMessage
of the Response.String
toString()
This method translates theAssertionArtifact
to an XML document String based on the SAML schema.String
toString(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 theStatusMessage
of the response. It could be null when there is noStatusMessage
.detail
- A DOM tree element that is theStatusDetail
of 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 theStatusCode
of the Response.- Returns:
StatusCode
of the response.
-
getStatusMessage
public String getStatusMessage()
Returns theStatusMessage
of the Response.- Returns:
- A String that represents the
StatusMessage
of the response. null is returned when there is noStatusMessage
in the response.
-
getStatusDetail
public Element getStatusDetail()
Gets theStatusDetail
of the Response.- Returns:
- A DOM tree element that represents the
StatusDetail
of the response. Null is returned if noStatusDetail
in the response.
-
toString
public String toString()
This method translates theAssertionArtifact
to 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
-
-