com.sun.identity.federation.message
Class FSFederationTerminationNotification

java.lang.Object
  extended bycom.sun.identity.saml.protocol.AbstractRequest
      extended bycom.sun.identity.federation.message.FSFederationTerminationNotification

public class FSFederationTerminationNotification
extends AbstractRequest

This class FSFederationTerminationNotification is used to create/parse a federation termination notification.


Constructor Summary
FSFederationTerminationNotification()
          Default constructor.
FSFederationTerminationNotification(org.w3c.dom.Element root)
          Constructor.
FSFederationTerminationNotification(java.lang.String requestId, java.lang.String providerID, NameIdentifier nameId)
          Constructor
 
Method Summary
 java.lang.String getID()
          Returns ID of this request.
 int getMinorVersion()
          Gets minor version
 NameIdentifier getNameIdentifier()
          Gets name identifier
 java.lang.String getProviderId()
          Gets provider ID for this request.
 java.lang.String getRelayState()
          Gets RelayState parameter
static FSFederationTerminationNotification parseURLEncodedRequest(javax.servlet.http.HttpServletRequest request)
          Creates the FSFederationTerminationNotification from URL encoded string.
static FSFederationTerminationNotification parseXML(java.lang.String xml)
          Creates the FSFederationTerminationNotification object based on XML string.
 void setID(java.lang.String id)
          Set ID of this request.
 void setMinorVersion(int version)
          Sets minor version
 void setNameIdentifier(NameIdentifier nameId)
          Sets name identifier
 void setProviderId(java.lang.String providerID)
          Sets provider ID for this request.
 void setRelayState(java.lang.String relayState)
          Sets RelayState parameter
 boolean setSignature(org.w3c.dom.Element elem)
          Sets the Signature.
 void signXML()
          Signs the AuthnRequest.
 void signXML(java.lang.String certAlias)
          Signs the object FSFederationTerminationNotification.
 java.lang.String toBASE64EncodedString()
          Gets the BASE 64 encoded string representation of the object.
 java.lang.String toURLEncodedQueryString()
          Gets the URL encoded query string representation of the object.
 java.lang.String toXMLString()
          Creates a String representation of the object.
 java.lang.String toXMLString(boolean includeNS, boolean declareNS)
          Creates a String representation of the object.
 java.lang.String toXMLString(boolean includeNS, boolean declareNS, boolean includeHeader)
          Creates a String representation of the object.
 
Methods inherited from class com.sun.identity.saml.protocol.AbstractRequest
addRespondWith, getIssueInstant, getMajorVersion, getRequestID, getRespondWith, getSignature, isSignatureValid, isSigned, setIssueInstant, setMajorVersion, setRequestID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSFederationTerminationNotification

public FSFederationTerminationNotification()
Default constructor.


FSFederationTerminationNotification

public FSFederationTerminationNotification(org.w3c.dom.Element root)
                                    throws FSMsgException
Constructor.

Parameters:
root - FSFederationTerminationNotification as DOM Element
Throws:
FSMsgException - if unable to construct the object.

FSFederationTerminationNotification

public FSFederationTerminationNotification(java.lang.String requestId,
                                           java.lang.String providerID,
                                           NameIdentifier nameId)
                                    throws FSMsgException
Constructor

Parameters:
requestId - request ID, if null, a random ID will be generated.
providerID - provider ID.
nameId - name identifier of the subject for the notification.
Throws:
FSMsgException - if unable to construct the object.
Method Detail

getID

public java.lang.String getID()
Returns ID of this request.

Returns:
ID of this request.

setID

public void setID(java.lang.String id)
Set ID of this request.

Parameters:
id - ID of this request.

setRelayState

public void setRelayState(java.lang.String relayState)
Sets RelayState parameter

Parameters:
relayState - RelayState parameter to be set

getRelayState

public java.lang.String getRelayState()
Gets RelayState parameter

Returns:
RelayState parameter

getMinorVersion

public int getMinorVersion()
Gets minor version

Overrides:
getMinorVersion in class AbstractRequest
Returns:
minor version

setMinorVersion

public void setMinorVersion(int version)
Sets minor version

Overrides:
setMinorVersion in class AbstractRequest
Parameters:
version - minor version to be set

toXMLString

public java.lang.String toXMLString(boolean includeNS,
                                    boolean declareNS)
                             throws FSMsgException
Creates a String representation of the object.

Parameters:
includeNS - 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:
An XML String representing the request.
Throws:
FSMsgException - if error occurs.

toXMLString

public java.lang.String toXMLString(boolean includeNS,
                                    boolean declareNS,
                                    boolean includeHeader)
                             throws FSMsgException
Creates a String representation of the object.

Parameters:
includeNS - 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.
includeHeader - Determines whether the output include the xml declaration header.
Returns:
A string containing the valid XML for this element
Throws:
FSMsgException - if error occurs.

toXMLString

public java.lang.String toXMLString()
                             throws FSMsgException
Creates a String representation of the object.

Returns:
An XML String representing the request.
Throws:
FSMsgException - if error occurs.

parseXML

public static FSFederationTerminationNotification parseXML(java.lang.String xml)
                                                    throws FSMsgException
Creates the FSFederationTerminationNotification object based on XML string.

Parameters:
xml - XML string.
Returns:
FSFederationTerminationNotification object
Throws:
FSMsgException - if error occurs

getProviderId

public java.lang.String getProviderId()
Gets provider ID for this request.

Returns:
provider id.

setProviderId

public void setProviderId(java.lang.String providerID)
Sets provider ID for this request.

Parameters:
providerID - provider ID to be set.

getNameIdentifier

public NameIdentifier getNameIdentifier()
Gets name identifier

Returns:
name identifier

setNameIdentifier

public void setNameIdentifier(NameIdentifier nameId)
Sets name identifier

Parameters:
nameId - name identifier to be set.

toURLEncodedQueryString

public java.lang.String toURLEncodedQueryString()
                                         throws FSMsgException
Gets the URL encoded query string representation of the object.

Returns:
the URL encoded string representation of the object.
Throws:
FSMsgException - if unable to get the URL encoded string.

toBASE64EncodedString

public java.lang.String toBASE64EncodedString()
                                       throws FSMsgException
Gets the BASE 64 encoded string representation of the object.

Returns:
BASE 64 encoded string representation of the object.
Throws:
FSMsgException - if unable to get the BASE 64 encoded string.

parseURLEncodedRequest

public static FSFederationTerminationNotification parseURLEncodedRequest(javax.servlet.http.HttpServletRequest request)
                                                                  throws FSMsgException,
                                                                         SAMLException
Creates the FSFederationTerminationNotification from URL encoded string.

Parameters:
request - HttpServletRequest to get the URL encoded parameters.
Returns:
the FSFederationTerminationNotification object.
Throws:
SAMLException - if unable to create the object.
FSMsgException - if unable to create the object.

signXML

public void signXML(java.lang.String certAlias)
             throws SAMLException
Signs the object FSFederationTerminationNotification.

Parameters:
certAlias - alias of the certificate used to sign the FSFederationTerminationNotification
Throws:
SAMLException - if it could not sign the FSFederationTerminationNotification

signXML

public void signXML()
             throws SAMLException
Signs the AuthnRequest.

Specified by:
signXML in class AbstractRequest
Throws:
SAMLException - if it could not sign the AuthnRequest

setSignature

public boolean setSignature(org.w3c.dom.Element elem)
Sets the Signature.

Overrides:
setSignature in class AbstractRequest
Parameters:
elem - Signature element.
Returns:
true if setting successful, false otherwise


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