Class Status


  • public class Status
    extends Object
    This class represents the Status element. It corresponds to <samlp:StatusType> in SAML protocol schema.
    • 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 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
    • Method Detail

      • getStatusCode

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

        public 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 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 String toString()
        This method translates the AssertionArtifact to an XML document String based on the SAML schema.
        Overrides:
        toString in class Object
        Returns:
        An XML String representing the AssertionArtifact.
      • 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 converted
        declareNS - Determines whether or not the namespace is declared within the Element.
        Returns:
        A string containing the valid XML for this element