com.sun.identity.saml2.protocol
Interface RequestAbstract

All Known Subinterfaces:
ArtifactResolve, AuthnRequest, LogoutRequest, ManageNameIDRequest

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
 java.lang.String getConsent()
          Returns the value of the Consent attribute.
 java.lang.String getDestination()
          Returns the value of the Destination attribute.
 Extensions getExtensions()
          Returns the Extensions Object.
 java.lang.String getID()
          Returns the value of the ID attribute.
 java.util.Date getIssueInstant()
          Returns the value of IssueInstant attribute.
 Issuer getIssuer()
          Returns the Issuer Object.
 java.lang.String getSignature()
          Returns the Signature Object as a string.
 java.lang.String getVersion()
          Returns the value of the Version attribute.
 boolean isMutable()
          Returns true if object is mutable.
 boolean isSignatureValid(java.security.cert.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(java.lang.String consent)
          Sets the value of the Consent attribute.
 void setDestination(java.lang.String destinationURI)
          Sets the value of the Destination attribute.
 void setExtensions(Extensions extensions)
          Sets the Extensions Object.
 void setID(java.lang.String id)
          Sets the value of the ID attribute.
 void setIssueInstant(java.util.Date dateTime)
          Sets the value of IssueInstant attribute.
 void setIssuer(Issuer nameID)
          Sets the Issuer object.
 void setVersion(java.lang.String version)
          Sets the value of the Version attribute.
 void sign(java.security.PrivateKey privateKey, java.security.cert.X509Certificate cert)
          Signs the Request.
 java.lang.String toXMLString()
          Returns a String representation of this Object.
 java.lang.String toXMLString(boolean includeNSPrefix, boolean declareNS)
          Returns a String representation of this Object.
 

Method Detail

setIssuer

public 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:
getIssuer()

getIssuer

public Issuer getIssuer()
Returns the Issuer Object.

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

getSignature

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

Returns:
the Signature object as a string.

sign

public void sign(java.security.PrivateKey privateKey,
                 java.security.cert.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

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

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

getExtensions

public Extensions getExtensions()
Returns the Extensions Object.

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

setID

public void setID(java.lang.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:
getID()

getID

public java.lang.String getID()
Returns the value of the ID attribute.

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

setVersion

public void setVersion(java.lang.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:
getVersion()

getVersion

public java.lang.String getVersion()
Returns the value of the Version attribute.

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

setIssueInstant

public void setIssueInstant(java.util.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:
getIssueInstant()

getIssueInstant

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

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

setDestination

public void setDestination(java.lang.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:
getDestination()

getDestination

public java.lang.String getDestination()
Returns the value of the Destination attribute.

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

setConsent

public void setConsent(java.lang.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:
getConsent()

getConsent

public java.lang.String getConsent()
Returns the value of the Consent attribute.

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

isSigned

public boolean isSigned()
Returns true if message is signed.

Returns:
true if message is signed.

isSignatureValid

public boolean isSignatureValid(java.security.cert.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

public java.lang.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

public java.lang.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

public void makeImmutable()
Makes this object immutable.


isMutable

public boolean isMutable()
Returns true if object is mutable.

Returns:
true if object is mutable.


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