com.sun.identity.saml.protocol
Class AbstractResponse

java.lang.Object
  extended by com.sun.identity.saml.protocol.AbstractResponse
Direct Known Subclasses:
FSLogoutResponse, FSNameIdentifierMappingResponse, FSNameRegistrationResponse, Response

public abstract class AbstractResponse
extends Object

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


Field Summary
protected  String inResponseTo
           
protected  Date issueInstant
           
protected  int majorVersion
           
protected  int minorVersion
           
protected  String recipient
           
protected  String responseID
           
protected  Element signature
           
protected  boolean signed
           
protected  boolean valid
           
protected  boolean validationDone
           
 
Constructor Summary
protected AbstractResponse()
          Default constructor.
 
Method Summary
 String getInResponseTo()
          Gets the InResponseTo of the Response.
 Date getIssueInstant()
          Returns the IssueInstant of the Response.
 int getMajorVersion()
          Gets the MajorVersion of the Response.
 int getMinorVersion()
          Gets the MinorVersion of the Response.
 String getRecipient()
          Gets the recipient of the Response.
 String getResponseID()
          Gets the ResponseID of the Response.
 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(String inResponseTo)
          Set the InResponseTo of the Response.
 boolean setIssueInstant(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(String recipient)
          Set the Recipient attribute of the Response.
 boolean setResponseID(String responseID)
          Set the ResponseID of the Response.
 boolean setSignature(Element elem)
          Set the signature for the Response.
abstract  void signXML()
          An abstract method that signs the object.
 

Field Detail

responseID

protected String responseID

inResponseTo

protected String inResponseTo

majorVersion

protected int majorVersion

minorVersion

protected int minorVersion

signature

protected Element signature

issueInstant

protected Date issueInstant

recipient

protected String recipient

signed

protected boolean signed

valid

protected boolean valid

validationDone

protected boolean validationDone
Constructor Detail

AbstractResponse

protected AbstractResponse()
Default constructor.

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 String getResponseID()
Gets the ResponseID of the Response.

Returns:
the ResponseID of the Response.

setResponseID

public boolean setResponseID(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 String getInResponseTo()
Gets the InResponseTo of the Response.

Returns:
the InResponseTo of the Response.

setInResponseTo

public boolean setInResponseTo(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 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(Element elem)
Set the signature for the Response.

Parameters:
elem - ds:Signature element
Returns:
true if the operation succeeds.

getIssueInstant

public Date getIssueInstant()
Returns the IssueInstant of the Response.

Returns:
the IssueInstant of the Response.

setIssueInstant

public boolean setIssueInstant(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 String getRecipient()
Gets the recipient of the Response.

Returns:
The Recipient.

setRecipient

public boolean setRecipient(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;