com.sun.identity.saml.protocol
Class AbstractResponse

java.lang.Object
  |
  +--com.sun.identity.saml.protocol.AbstractResponse
Direct Known Subclasses:
Response

public abstract class AbstractResponse
extends java.lang.Object

This AbstractResponse class is an abstract base class for all SAML Response in samlp namespace. It corresponds to ResponseAbstractType in SAML protocol schema.


Method Summary
 java.lang.String getInResponseTo()
          Gets the InResponseTo of the Response.
 java.util.Date getIssueInstant()
          Returns the IssueInstant of the Response.
 int getMajorVersion()
          Gets the MajorVersion of the Response.
 int getMinorVersion()
          Gets the MinorVersion of the Response.
 java.lang.String getRecipient()
          Gets the recipient of the Response.
 java.lang.String getResponseID()
          Gets the ResponseID of the Response.
 org.w3c.dom.Element getSignature()
          Gets the signature of the Response.
 boolean isSignatureValid()
          Returns whether the signature on the object is valid or not.
 boolean isSigned()
          Return whether the object is signed or not.
 boolean setInResponseTo(java.lang.String inResponseTo)
          Set the InResponseTo of the Response.
 boolean setIssueInstant(java.util.Date issueInstant)
          Set the IssueInstant of the Response.
 void setMajorVersion(int majorVersion)
          Sets the MajorVersion of the Response.
 void setMinorVersion(int minorVersion)
          Sets the MinorVersion of the Response.
 boolean setRecipient(java.lang.String recipient)
          Set the Recipient attribute of the Response.
 boolean setResponseID(java.lang.String responseID)
          Set the ResponseID of the Response.
 boolean setSignature(org.w3c.dom.Element elem)
          Set the signature for the Response.
abstract  void signXML()
          An abstract method that signs the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isSigned

public boolean isSigned()
Return whether the object is signed or not.
Returns:
true if the object is signed; false otherwise.

isSignatureValid

public boolean isSignatureValid()
Returns whether the signature on the object is valid or not.
Returns:
boolean true if the signature is valid; false otherwise.

signXML

public abstract void signXML()
                      throws SAMLException
An abstract method that signs the object.
Throws:
SAMLException - if could not sign the object.

getResponseID

public java.lang.String getResponseID()
Gets the ResponseID of the Response.
Returns:
the ResponseID of the Response.

setResponseID

public boolean setResponseID(java.lang.String responseID)
Set the ResponseID of the Response.
Parameters:
responseID - A String that is the ResponseID attribute of the Response.
Returns:
true if the operation is successful.

getInResponseTo

public java.lang.String getInResponseTo()
Gets the InResponseTo of the Response.
Returns:
the InResponseTo of the Response.

setInResponseTo

public boolean setInResponseTo(java.lang.String inResponseTo)
Set the InResponseTo of the Response.
Parameters:
inResponseTo - The InResponseTo attribute of the Response.
Returns:
true if the operation is successful.

getMajorVersion

public int getMajorVersion()
Gets the MajorVersion of the Response.
Returns:
The MajorVersion of the Response.

getMinorVersion

public int getMinorVersion()
Gets the MinorVersion of the Response.
Returns:
The MinorVersion of the SAML response.

setMajorVersion

public void setMajorVersion(int majorVersion)
Sets the MajorVersion of the Response.
Parameters:
majorVersion - the intended major version of SAML response.

setMinorVersion

public void setMinorVersion(int minorVersion)
Sets the MinorVersion of the Response.
Parameters:
minorVersion - the intended minor version of SAML response.

getSignature

public org.w3c.dom.Element getSignature()
Gets the signature of the Response.
Returns:
The signature element of the Response. null is returned if the Response has no ds:Signature.

setSignature

public boolean setSignature(org.w3c.dom.Element elem)
Set the signature for the Response.
Parameters:
elem - ds:Signature element
Returns:
true if the operation succeeds.

getIssueInstant

public java.util.Date getIssueInstant()
Returns the IssueInstant of the Response.
Returns:
the IssueInstant of the Response.

setIssueInstant

public boolean setIssueInstant(java.util.Date issueInstant)
Set the IssueInstant of the Response.
Parameters:
issueInstant - a Date object representing the time when the Response is issued.
Returns:
true if the operation succeeds.

getRecipient

public java.lang.String getRecipient()
Gets the recipient of the Response.
Returns:
The Recipient.

setRecipient

public boolean setRecipient(java.lang.String recipient)
Set the Recipient attribute of the Response.
Parameters:
recipient - A String representing the Recipient attribute of the Response.
Returns:
true if the operation is successful;