com.sun.identity.saml.protocol
Class AbstractRequest

java.lang.Object
  extended bycom.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)
          Adds a RespondWith to the Request.
 java.util.Date getIssueInstant()
          Returns the IssueInstant of the Request.
 int getMajorVersion()
          Returns the MajorVersion of the Request.
 int getMinorVersion()
          Returns 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.
 void setMajorVersion(int majorVersion)
          Sets the MajorVersion of the Request.
 void setMinorVersion(int minorVersion)
          Sets the MinorVersion 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 could not 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)
Adds a RespondWith to the Request.

Parameters:
respondWith - A String that needs to be added to the Request.
Returns:
true if the operation is successful.

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:
true if the operation succeeds.

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:
true if the operation is successful.

getMajorVersion

public int getMajorVersion()
Returns the MajorVersion of the Request.

Returns:
The MajorVersion of the Request.

getMinorVersion

public int getMinorVersion()
Returns the MinorVersion of the Request.

Returns:
The MinorVersion of the request.

setMajorVersion

public void setMajorVersion(int majorVersion)
Sets the MajorVersion of the Request.

Parameters:
majorVersion - the intended major version for SAML Request

setMinorVersion

public void setMinorVersion(int minorVersion)
Sets the MinorVersion of the Request.

Parameters:
minorVersion - the intended minor version for SAML Request

getIssueInstant

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

Returns:
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:
true if the operation succeeds.


Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.