|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.identity.saml.protocol.AbstractResponse | +--com.sun.identity.saml.protocol.Response
This Response
class represents a Response XML document.
The schema of Response is defined as the following:
...
Constructor Summary | |
Response(org.w3c.dom.Element root)
Constructor. |
|
Response(java.lang.String responseID,
Status status,
java.util.List contents)
This constructor shall only be used at the server side to construct a Response object. |
|
Response(java.lang.String responseID,
Status status,
java.lang.String recipient,
java.util.List contents)
This constructor shall only be used at the server side to construct a Response object. |
|
Response(java.lang.String responseID,
java.lang.String inResponseTo,
Status status,
java.util.List contents)
This constructor shall only be used at the server side to construct a Response object. |
|
Response(java.lang.String responseID,
java.lang.String inResponseTo,
Status status,
java.lang.String recipient,
java.util.List contents)
This constructor shall only be used at the server side to construct a Response object. |
Method Summary | |
boolean |
addAssertion(Assertion assertion)
Add an assertion to the Response. |
java.util.List |
getAssertion()
This method returns the set of Assertions that is the content of the response. |
Status |
getStatus()
Gets the Status of the Response. |
static Response |
parseXML(java.io.InputStream is)
|
static Response |
parseXML(java.lang.String xml)
This method is used primarily at the client side to reconstruct a Response object based on the XML document received from server. |
boolean |
setSignature(org.w3c.dom.Element elem)
Set the signature for the Response. |
boolean |
setStatus(Status status)
Set the Status of the Response. |
void |
signXML()
Method that signs the Response. |
java.lang.String |
toString()
This method translates the response to an XML document String based on the Response schema described above. |
java.lang.String |
toString(boolean includeNS,
boolean declareNS)
Creates a String representation of the <samlp:Response> element. |
java.lang.String |
toString(boolean includeNS,
boolean declareNS,
boolean includeHeader)
Creates a String representation of the <samlp:Response> element. |
Methods inherited from class com.sun.identity.saml.protocol.AbstractResponse |
getInResponseTo, getIssueInstant, getMajorVersion, getMinorVersion, getRecipient, getResponseID, getSignature, isSignatureValid, isSigned, setInResponseTo, setIssueInstant, setRecipient, setResponseID |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Response(java.lang.String responseID, java.lang.String inResponseTo, Status status, java.util.List contents) throws SAMLException
responseID
- If it's null, the constructor will create one.inResponseTo
- the RequestID that this response is corresponding.
It could be null or empty string "".status
- The status of the response.contents
- A List of Assertions that are the content of the
Response. It could be null when there is no Assertion.public Response(java.lang.String responseID, java.lang.String inResponseTo, Status status, java.lang.String recipient, java.util.List contents) throws SAMLException
responseID
- If it's null, the constructor will create one.inResponseTo
- the RequestID that this response is corresponding.
It could be null or empty string "".status
- The status of the response.recipient
- The intended recipient of the response. It could be
null or empty string since it's optional.contents
- A List of Assertions that are the content of the
Response. It could be null when there is no Assertion.public Response(java.lang.String responseID, Status status, java.lang.String recipient, java.util.List contents) throws SAMLException
responseID
- If it's null, the constructor will create one.status
- The status of the response.recipient
- The intended recipient of the response. It could be
null or empty string since it's optional.contents
- A List of Assertions that are the content of the
Response. It could be null when there is no Assertion.public Response(java.lang.String responseID, Status status, java.util.List contents) throws SAMLException
responseID
- If it's null, the constructor will create one.status
- The status of the response.contents
- A List of Assertions that are the content of the
Response. It could be null when there is no Assertion.public Response(org.w3c.dom.Element root) throws SAMLException
Method Detail |
public void signXML() throws SAMLException
signXML
in class AbstractResponse
SAMLException
- if couldn't sign the Response.public static Response parseXML(java.lang.String xml) throws SAMLException
xml
- The Response XML document String.
NOTE: this is a complete SAML response xml string with
ResponseID, MajorVersion, etc.SAMLException
- when an error occurs.public static Response parseXML(java.io.InputStream is) throws SAMLException
public java.util.List getAssertion()
public boolean addAssertion(Assertion assertion)
assertion
- The assertion to be added.public Status getStatus()
public boolean setStatus(Status status)
status
- The Status of the Response to be set.public boolean setSignature(org.w3c.dom.Element elem)
setSignature
in class AbstractResponse
elem
- ds:Signature elementpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean includeNS, boolean declareNS)
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.public java.lang.String toString(boolean includeNS, boolean declareNS, boolean includeHeader)
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.includeHeader:
- Determines whether the output include the xml
declaration header.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |