com.sun.identity.saml.protocol
Class AbstractRequest

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

public abstract class AbstractRequest
extends java.lang.Object

This AbstractRequest class is an abstract base class for all SAML Request in samlp namespace. It corresponds to RequestAbstractType in SAML protocol schema.


Method Summary
 boolean addRespondWith(java.lang.String respondWith)
          Add a RespondWith to the Request.
 java.util.Date getIssueInstant()
          Gets the IssueInstant of the Request.
 int getMajorVersion()
          Gets the MajorVersion of the Request.
 int getMinorVersion()
          Gets the MinorVersion of the Request.
 java.lang.String getRequestID()
          Gets the RequestID of the Request.
 java.util.List getRespondWith()
          Gets 0 or more of RespondWith in the Request.
 org.w3c.dom.Element getSignature()
          Gets 0 or 1 of Signature in the Request.
 boolean isSignatureValid()
          Return whether the signature on the object is valid or not.
 boolean isSigned()
          Return whether the object is signed or not.
 boolean setIssueInstant(java.util.Date issueInstant)
          Set the IssueInstant of the Request.
 boolean setRequestID(java.lang.String requestID)
          Set the RequestID of the Request.
 boolean setSignature(org.w3c.dom.Element elem)
          Set the signature for the Request
abstract  void signXML()
          An abstract method to sign 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()
Return whether the signature on the object is valid or not.
Returns:
true if the signature is valid; false otherwise.

signXML

public abstract void signXML()
                      throws SAMLException
An abstract method to sign the object.
Throws:
SAMLException - If couldn't sign the object.

getRespondWith

public java.util.List getRespondWith()
Gets 0 or more of RespondWith in the Request.
Returns:
A List of Strings

addRespondWith

public boolean addRespondWith(java.lang.String respondWith)
Add a RespondWith to the Request.
Parameters:
respondWith - A String that needs to be added to the Request.
Returns:
A boolean value: true if the operation is successful; false otherwise.

getSignature

public org.w3c.dom.Element getSignature()
Gets 0 or 1 of Signature in the Request.
Returns:
The signature Element the Request contains. It returns null if the Request has no signature.

setSignature

public boolean setSignature(org.w3c.dom.Element elem)
Set the signature for the Request
Parameters:
elem - ds:Signature element
Returns:
A boolean value: true if the operation succeeds; false otherwise.

getRequestID

public java.lang.String getRequestID()
Gets the RequestID of the Request.
Returns:
the RequestID of the Request.

setRequestID

public boolean setRequestID(java.lang.String requestID)
Set the RequestID of the Request.
Parameters:
requestID - A String that is the RequestID attribute of the Request.
Returns:
A boolean value: true if the operation is successful; false otherwise.

getMajorVersion

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

getMinorVersion

public int getMinorVersion()
Gets the MinorVersion of the Request.
Returns:
The MinorVersion.

getIssueInstant

public java.util.Date getIssueInstant()
Gets the IssueInstant of the Request.

setIssueInstant

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