Package com.sun.identity.saml.protocol
Class StatusCode
- java.lang.Object
-
- com.sun.identity.saml.protocol.StatusCode
-
public class StatusCode extends Object
This class represents theStatusCodeandSubStatusCodeelement. It corresponds tosamlp:StatusCodeTypein SAML protocol schema.
-
-
Constructor Summary
Constructors Constructor Description StatusCode(String value)Construct aStatusCodeobject from a value String.StatusCode(String value, StatusCode subCode)Construct aStatusCodeobject from a value String and a subStatusCode.StatusCode(Element statusCode)Constructs an instance ofStatusCodefrom a DOM element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatusCodegetStatusCode()Gets the subStatusCodeof theStatusCode.StringgetValue()Gets the value of theStatusCode.voidsetStatusCode(StatusCode subcode)Sets the subStatusCode.StringtoString()Translates theStatusCodeto an XML document String based on the SAML schema.StringtoString(boolean includeNS, boolean declareNS)Creates a String representation of the<samlp:StatusCode>element.
-
-
-
Constructor Detail
-
StatusCode
public StatusCode(Element statusCode) throws SAMLException
Constructs an instance ofStatusCodefrom a DOM element.- Parameters:
statusCode- An DOM Element that's rooted by<StatusCode>.- Throws:
SAMLException- when an error occurs.
-
StatusCode
public StatusCode(String value, StatusCode subCode) throws SAMLException
Construct aStatusCodeobject from a value String and a subStatusCode.- Parameters:
value- The value of theStatusCode. This could be prefixed bysamlp:. If it is not prefixed, or prefixed by prefix other thansamlp:,samlp:will be used instead.subCode- The optional subStatusCode.- Throws:
SAMLException- if value string is null, empty, or contains wrong value.
-
StatusCode
public StatusCode(String value) throws SAMLException
Construct aStatusCodeobject from a value String.- Parameters:
value- The value of theStatusCode. This could be prefixed bysamlp:. It it is not prefixed, or prefixed by prefix other thansamlp:,samlp:will be used instead.- Throws:
SAMLException- if value string is null, empty, or contains wrong value.
-
-
Method Detail
-
setStatusCode
public void setStatusCode(StatusCode subcode)
Sets the subStatusCode.- Parameters:
subcode-StatusCodeto be included.
-
getStatusCode
public StatusCode getStatusCode()
Gets the subStatusCodeof theStatusCode.- Returns:
StatusCode.
-
getValue
public String getValue()
Gets the value of theStatusCode.- Returns:
- A String representing the value of the
StatusCode.
-
toString
public String toString()
Translates theStatusCodeto an XML document String based on the SAML schema.
-
toString
public String toString(boolean includeNS, boolean declareNS)
Creates a String representation of the<samlp:StatusCode>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.
-
-