com.sun.identity.federation.message
Class FSLogoutNotification

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

public class FSLogoutNotification
extends AbstractRequest

This class FSLogoutNotification is used to construct/parse a ID-FF single logout notification element.


Constructor Summary
FSLogoutNotification()
          Default constructor
FSLogoutNotification(org.w3c.dom.Element root)
          Constructor
FSLogoutNotification(java.lang.String requestId, java.lang.String providerID, NameIdentifier nameId, java.lang.String relayState)
          Constructor
 
Method Summary
 java.lang.String getID()
          Gets id attribute.
 int getMinorVersion()
          Gets minor version
 NameIdentifier getNameIdentifier()
          Gets name identifier.
 java.lang.String getProviderId()
          Gets provider ID for this notification.
 java.lang.String getRelayState()
          Gets RelayState parameter
 java.lang.String getSessionIndex()
          Gets SessionIndex attribute.
 java.lang.String getSignatureString()
          Get the Signature Element as string
 java.lang.String getSignedXMLString()
          Get Signed XML String
static FSLogoutNotification parseURLEncodedRequest(javax.servlet.http.HttpServletRequest request)
          Creates the FSLogoutNotification from URL encoded string.
static FSLogoutNotification parseXML(java.lang.String xml)
          Creates the FSLogoutNotification on XML String
 void setID(java.lang.String id)
          Sets id attribute.
 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 notification.
 void setRelayState(java.lang.String relayState)
          Sets RelayState parameter
 void setSessionIndex(java.lang.String sessionIndex)
          Sets SessionIndex attribute.
 boolean setSignature(org.w3c.dom.Element elem)
          Sets the Signature.
 void signXML()
          Signs the FSLogoutNotification
 void signXML(java.lang.String certAlias)
          Signs the LogoutNotification object.
 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()
          Gets a String representation of the Response element.
 java.lang.String toXMLString(boolean includeNS, boolean declareNS)
          Gets a String representation of the object.
 java.lang.String toXMLString(boolean includeNS, boolean declareNS, boolean includeHeader)
          Gets a String representation of the Response element.
 
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

FSLogoutNotification

public FSLogoutNotification()
Default constructor


FSLogoutNotification

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

Parameters:
root - DOM Element representing the LogoutNotification
Throws:
FSMsgException - if error occurs.

FSLogoutNotification

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

Parameters:
requestId - If it's null, the constructor will create one.
providerID - provider ID
nameId - name identifier
relayState - relay state
Throws:
FSMsgException - if unable to construct the object
Method Detail

getID

public java.lang.String getID()
Gets id attribute. This is for ID-FF 1.1 only.

Returns:
id attribute.

setID

public void setID(java.lang.String id)
Sets id attribute. This is for ID-FF 1.1 only.

Parameters:
id - id to be set.

getRelayState

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

Returns:
RelayState parameter

setRelayState

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


getSignedXMLString

public java.lang.String getSignedXMLString()
Get Signed XML String

Returns:
String signed XML String, null if the FSLogoutNotification is not signed.

getSignatureString

public java.lang.String getSignatureString()
Get the Signature Element as string

Returns:
Signature string, null if the FSLogoutNotification is not signed.

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
Gets 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:
A string containing the valid XML for this element
Throws:
FSMsgException - if unable to get the XML string.

toXMLString

public java.lang.String toXMLString(boolean includeNS,
                                    boolean declareNS,
                                    boolean includeHeader)
                             throws FSMsgException
Gets a String representation of the Response element.

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 unable to get the XML string.

toXMLString

public java.lang.String toXMLString()
                             throws FSMsgException
Gets a String representation of the Response element.

Returns:
A string containing the valid XML for this element
Throws:
FSMsgException - if unable to get the XML string.

parseXML

public static FSLogoutNotification parseXML(java.lang.String xml)
                                     throws FSMsgException
Creates the FSLogoutNotification on XML String

Parameters:
xml - XML string representing the FSLogoutNotification object.
Returns:
the FSLogoutNotification object
Throws:
FSMsgException - if unable to construct the object

getProviderId

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

Returns:
provider id.

setProviderId

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

Parameters:
providerID - provider ID to be set.

getSessionIndex

public java.lang.String getSessionIndex()
Gets SessionIndex attribute.

Returns:
SessionIndex attribute.

setSessionIndex

public void setSessionIndex(java.lang.String sessionIndex)
Sets SessionIndex attribute.

Parameters:
sessionIndex - session index 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 FSLogoutNotification parseURLEncodedRequest(javax.servlet.http.HttpServletRequest request)
                                                   throws FSMsgException
Creates the FSLogoutNotification from URL encoded string.

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

signXML

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

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

signXML

public void signXML()
             throws SAMLException
Signs the FSLogoutNotification

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

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.