Package com.sun.identity.saml.protocol
Class AbstractRequest
- java.lang.Object
-
- com.sun.identity.saml.protocol.AbstractRequest
-
- Direct Known Subclasses:
FSAuthnRequest,FSFederationTerminationNotification,FSLogoutNotification,FSNameIdentifierMappingRequest,FSNameRegistrationRequest,Request
public abstract class AbstractRequest extends Object
ThisAbstractRequestclass is an abstract base class for all SAML Request insamlpnamespace. It corresponds toRequestAbstractTypein SAML protocol schema.
-
-
Field Summary
Fields Modifier and Type Field Description protected DateissueInstantprotected intmajorVersionprotected intminorVersionprotected StringrequestIDprotected ListrespondWithsprotected Elementsignatureprotected booleansignedprotected booleanvalid
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractRequest()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanaddRespondWith(String respondWith)Adds aRespondWithto the Request.DategetIssueInstant()Returns theIssueInstantof the Request.intgetMajorVersion()Returns theMajorVersionof the Request.intgetMinorVersion()Returns theMinorVersionof the Request.StringgetRequestID()Gets theRequestIDof the Request.ListgetRespondWith()Gets 0 or more ofRespondWithin the Request.ElementgetSignature()Gets 0 or 1 of Signature in the Request.booleanisSignatureValid()Return whether the signature on the object is valid or not.booleanisSigned()Return whether the object is signed or not.booleansetIssueInstant(Date issueInstant)Set theIssueInstantof the Request.voidsetMajorVersion(int majorVersion)Sets theMajorVersionof the Request.voidsetMinorVersion(int minorVersion)Sets theMinorVersionof the Request.booleansetRequestID(String requestID)Set theRequestIDof the Request.booleansetSignature(Element elem)Set the signature for the Requestabstract voidsignXML()An abstract method to sign the object.
-
-
-
Field Detail
-
respondWiths
protected List respondWiths
-
signature
protected Element signature
-
requestID
protected String requestID
-
majorVersion
protected int majorVersion
-
minorVersion
protected int minorVersion
-
issueInstant
protected Date issueInstant
-
signed
protected boolean signed
-
valid
protected boolean valid
-
-
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 SAMLExceptionAn abstract method to sign the object.- Throws:
SAMLException- If could not sign the object.
-
getRespondWith
public List getRespondWith()
Gets 0 or more ofRespondWithin the Request.- Returns:
- A List of Strings.
-
addRespondWith
public boolean addRespondWith(String respondWith)
Adds aRespondWithto the Request.- Parameters:
respondWith- A String that needs to be added to the Request.- Returns:
- true if the operation is successful.
-
getSignature
public 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(Element elem)
Set the signature for the Request- Parameters:
elem-ds:Signatureelement- Returns:
- true if the operation succeeds.
-
getRequestID
public String getRequestID()
Gets theRequestIDof the Request.- Returns:
- the
RequestIDof the Request.
-
setRequestID
public boolean setRequestID(String requestID)
Set theRequestIDof the Request.- Parameters:
requestID- A String that is theRequestIDattribute of the Request.- Returns:
- true if the operation is successful.
-
getMajorVersion
public int getMajorVersion()
Returns theMajorVersionof the Request.- Returns:
- The
MajorVersionof the Request.
-
getMinorVersion
public int getMinorVersion()
Returns theMinorVersionof the Request.- Returns:
- The
MinorVersionof the request.
-
setMajorVersion
public void setMajorVersion(int majorVersion)
Sets theMajorVersionof the Request.- Parameters:
majorVersion- the intended major version for SAML Request
-
setMinorVersion
public void setMinorVersion(int minorVersion)
Sets theMinorVersionof the Request.- Parameters:
minorVersion- the intended minor version for SAML Request
-
getIssueInstant
public Date getIssueInstant()
Returns theIssueInstantof the Request.- Returns:
- the
IssueInstantof the Request.
-
setIssueInstant
public boolean setIssueInstant(Date issueInstant)
Set theIssueInstantof the Request.- Parameters:
issueInstant- a Date object representing the time when the Request is issued.- Returns:
- true if the operation succeeds.
-
-