com.sun.identity.saml2.protocol
Interface RequestAbstract

All Known Subinterfaces:
ArtifactResolve, AssertionIDRequest, AttributeQuery, AuthnQuery, AuthnRequest, LogoutRequest, ManageNameIDRequest, NameIDMappingRequest, SubjectQueryAbstract, XACMLAuthzDecisionQuery
All Known Implementing Classes:
RequestAbstractImpl, XACMLAuthzDecisionQueryImpl

public interface RequestAbstract

This interface defines methods for setting and retrieving attributes and elements associated with a SAML request message used in SAML protocols.


Method Summary
 String getConsent()
          Returns the value of the Consent attribute.
 String getDestination()
          Returns the value of the Destination attribute.
 Extensions getExtensions()
          Returns the Extensions Object.
 String getID()
          Returns the value of the ID attribute.
 Date getIssueInstant()
          Returns the value of IssueInstant attribute.
 Issuer getIssuer()
          Returns the Issuer Object.
 String getSignature()
          Returns the Signature Object as a string.
 String getVersion()
          Returns the value of the Version attribute.
 boolean isMutable()
          Returns true if object is mutable.
 boolean isSignatureValid(X509Certificate senderCert)
          Return whether the signature is valid or not.
 boolean isSigned()
          Returns true if message is signed.
 void makeImmutable()
          Makes this object immutable.
 void setConsent(String consent)
          Sets the value of the Consent attribute.
 void setDestination(String destinationURI)
          Sets the value of the Destination attribute.
 void setExtensions(Extensions extensions)
          Sets the Extensions Object.
 void setID(String id)
          Sets the value of the ID attribute.
 void setIssueInstant(Date dateTime)
          Sets the value of IssueInstant attribute.
 void setIssuer(Issuer nameID)
          Sets the Issuer object.
 void setVersion(String version)
          Sets the value of the Version attribute.
 void sign(PrivateKey privateKey, X509Certificate cert)
          Signs the Request.
 String toXMLString()
          Returns a String representation of this Object.
 String toXMLString(boolean includeNSPrefix, boolean declareNS)
          Returns a String representation of this Object.
 

Method Detail

setIssuer

void setIssuer(Issuer nameID)
               throws SAML2Exception
Sets the Issuer object.

Parameters:
nameID - the new Issuer object.
Throws:
SAML2Exception - if the object is immutable.
See Also:
RequestAbstract.getIssuer()

getIssuer

Issuer getIssuer()
Returns the Issuer Object.

Returns:
the Issuer object.
See Also:
RequestAbstract.setIssuer(Issuer)

getSignature

String getSignature()
Returns the Signature Object as a string.

Returns:
the Signature object as a string.

sign

void sign(PrivateKey privateKey,
          X509Certificate cert)
          throws SAML2Exception
Signs the Request.

Parameters:
privateKey - Signing key
cert - Certificate which contain the public key correlated to the signing key; It if is not null, then the signature will include the certificate; Otherwise, the signature will not include any certificate.
Throws:
SAML2Exception - if it could not sign the Request.

setExtensions

void setExtensions(Extensions extensions)
                   throws SAML2Exception
Sets the Extensions Object.

Parameters:
extensions - the Extensions object.
Throws:
SAML2Exception - if the object is immutable.
See Also:
RequestAbstract.getExtensions()

getExtensions

Extensions getExtensions()
Returns the Extensions Object.

Returns:
the Extensions object.
See Also:
RequestAbstract.setExtensions(Extensions)

setID

void setID(String id)
           throws SAML2Exception
Sets the value of the ID attribute.

Parameters:
id - the new value of ID attribute.
Throws:
SAML2Exception - if the object is immutable.
See Also:
RequestAbstract.getID()

getID

String getID()
Returns the value of the ID attribute.

Returns:
the value of ID attribute.
See Also:
RequestAbstract.setID(String)

setVersion

void setVersion(String version)
                throws SAML2Exception
Sets the value of the Version attribute.

Parameters:
version - the value of Version attribute.
Throws:
SAML2Exception - if the object is immutable.
See Also:
RequestAbstract.getVersion()

getVersion

String getVersion()
Returns the value of the Version attribute.

Returns:
value of Version attribute.
See Also:
RequestAbstract.setVersion(String)

setIssueInstant

void setIssueInstant(Date dateTime)
                     throws SAML2Exception
Sets the value of IssueInstant attribute.

Parameters:
dateTime - new value of the IssueInstant attribute.
Throws:
SAML2Exception - if the object is immutable.
See Also:
RequestAbstract.getIssueInstant()

getIssueInstant

Date getIssueInstant()
Returns the value of IssueInstant attribute.

Returns:
value of the IssueInstant attribute.
See Also:
RequestAbstract.setIssueInstant(Date)

setDestination

void setDestination(String destinationURI)
                    throws SAML2Exception
Sets the value of the Destination attribute.

Parameters:
destinationURI - new value of Destination attribute.
Throws:
SAML2Exception - if the object is immutable.
See Also:
RequestAbstract.getDestination()

getDestination

String getDestination()
Returns the value of the Destination attribute.

Returns:
the value of Destination attribute.
See Also:
RequestAbstract.setDestination(String)

setConsent

void setConsent(String consent)
                throws SAML2Exception
Sets the value of the Consent attribute.

Parameters:
consent - new value of Consent attribute.
Throws:
SAML2Exception - if the object is immutable.
See Also:
RequestAbstract.getConsent()

getConsent

String getConsent()
Returns the value of the Consent attribute.

Returns:
value of Consent attribute.
See Also:
RequestAbstract.setConsent(String)

isSigned

boolean isSigned()
Returns true if message is signed.

Returns:
true if message is signed.

isSignatureValid

boolean isSignatureValid(X509Certificate senderCert)
                         throws SAML2Exception
Return whether the signature is valid or not.

Parameters:
senderCert - Certificate containing the public key which may be used for signature verification; This certificate may also may be used to check against the certificate included in the signature
Returns:
true if the signature is valid; false otherwise.
Throws:
SAML2Exception - if the signature could not be verified

toXMLString

String toXMLString()
                   throws SAML2Exception
Returns a String representation of this Object.

Returns:
a String representation of this Object.
Throws:
SAML2Exception - if it could not create String object

toXMLString

String toXMLString(boolean includeNSPrefix,
                   boolean declareNS)
                   throws SAML2Exception
Returns a String representation of this Object.

Parameters:
includeNSPrefix - determines whether or not the namespace qualifier is prepended to the Element when converted
declareNS - determines whether or not the namespace is declared within the Element.
Returns:
a String representation of this Object.
Throws:
SAML2Exception - if it could not create String object.

makeImmutable

void makeImmutable()
Makes this object immutable.


isMutable

boolean isMutable()
Returns true if object is mutable.

Returns:
true if object is mutable.