com.sun.identity.federation.message
Class FSLogoutResponse

java.lang.Object
  extended bycom.sun.identity.saml.protocol.AbstractResponse
      extended bycom.sun.identity.federation.message.FSLogoutResponse

public class FSLogoutResponse
extends AbstractResponse

this class FSLogoutResponse is used to construct/parse a federation single logout response element.


Constructor Summary
FSLogoutResponse()
          Default constructor
FSLogoutResponse(org.w3c.dom.Element root)
          Constructor
FSLogoutResponse(java.lang.String responseID, java.lang.String inResponseTo, Status status, java.lang.String providerId, java.lang.String relayState)
          Constructor
 
Method Summary
 java.lang.String getID()
          Gets id attribute, this applies to ID-FF 1.1 only.
 int getMinorVersion()
          Gets minor version
 java.lang.String getProviderId()
          Gets provider ID for this notification.
 java.lang.String getRelayState()
          Gets RelayState parameter
 java.lang.String getResponseTo()
          Gets inResponseTo attribute.
 java.lang.String getSignatureString()
          Get the Signature Element as string
 java.lang.String getSignedXMLString()
          Get Signed XML String
 Status getStatus()
          Gets the status object
static FSLogoutResponse parseBASE64EncodedString(java.lang.String encodedRes)
          Creates the response object based on the BASE 64 encoded string.
static FSLogoutResponse parseURLEncodedRequest(javax.servlet.http.HttpServletRequest request)
          Creates the FSLogoutResponse from URL encoded string.
static FSLogoutResponse parseXML(java.lang.String xml)
          Creates the LogoutResponse object from the XML string
 void setID(java.lang.String id)
          Sets id attribute, this applies to ID-FF 1.1 only.
 void setMinorVersion(int version)
          Sets minor version
 void setProviderId(java.lang.String providerId)
          Sets provider ID for this notification.
 void setRelayState(java.lang.String relayState)
          Sets RelayState parameter
 void setResponseTo(java.lang.String inResponseTo)
          Sets inResponseTo attribute.
 boolean setSignature(org.w3c.dom.Element elem)
          Sets the Signature element
 void setStatus(Status status)
          Sets the status object
 void setStatus(java.lang.String status)
          Sets the status
 void signXML()
          Signs the Response.
 void signXML(java.lang.String certAlias)
          Signs the response.
 java.lang.String toBASE64EncodedString()
          Gets the BASE64 encoded string of the response 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 LogoutResponse element.
 java.lang.String toXMLString(boolean includeNS, boolean declareNS)
          Gets a String representation of the LogoutResponse element.
 java.lang.String toXMLString(boolean includeNS, boolean declareNS, boolean includeHeader)
          Gets a String representation of the LogoutResponse element.
 
Methods inherited from class com.sun.identity.saml.protocol.AbstractResponse
getInResponseTo, getIssueInstant, getMajorVersion, getRecipient, getResponseID, getSignature, isSignatureValid, isSigned, setInResponseTo, setIssueInstant, setMajorVersion, setRecipient, setResponseID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSLogoutResponse

public FSLogoutResponse()
Default constructor


FSLogoutResponse

public FSLogoutResponse(java.lang.String responseID,
                        java.lang.String inResponseTo,
                        Status status,
                        java.lang.String providerId,
                        java.lang.String relayState)
                 throws FSMsgException
Constructor

Parameters:
responseID - response id
inResponseTo - the RequestID that this response is corresponding.
status - response status
providerId - provider ID
relayState - relay state
Throws:
FSMsgException - if unable to construct the object

FSLogoutResponse

public FSLogoutResponse(org.w3c.dom.Element root)
                 throws FSMsgException,
                        SAMLException
Constructor

Parameters:
root - DOM Element representing the LogoutResponse
Throws:
FSMsgException - if error occurs
SAMLException - if error occurs
Method Detail

getRelayState

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

Returns:
RelayState parameter

setRelayState

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

Parameters:
relayState - RelayState parameter to be set

getResponseTo

public java.lang.String getResponseTo()
Gets inResponseTo attribute.

Returns:
inResponseTo attribute.

setResponseTo

public void setResponseTo(java.lang.String inResponseTo)
Sets inResponseTo attribute.

Parameters:
inResponseTo - attribute to be set.

getID

public java.lang.String getID()
Gets id attribute, this applies to ID-FF 1.1 only.

Returns:
id attribute.

setID

public void setID(java.lang.String id)
Sets id attribute, this applies to ID-FF 1.1 only.

Parameters:
id - attribute to be set.

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.

getSignedXMLString

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

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

getSignatureString

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

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

getMinorVersion

public int getMinorVersion()
Gets minor version

Overrides:
getMinorVersion in class AbstractResponse
Returns:
minor version

setMinorVersion

public void setMinorVersion(int version)
Sets minor version

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

getStatus

public Status getStatus()
Gets the status object

Returns:
the status object

setStatus

public void setStatus(java.lang.String status)
Sets the status

Parameters:
status - string representing the Status object

setStatus

public void setStatus(Status status)
Sets the status object

Parameters:
status - the status object to be set

parseXML

public static FSLogoutResponse parseXML(java.lang.String xml)
                                 throws FSMsgException
Creates the LogoutResponse object from the XML string

Parameters:
xml - XML String representing the LogoutResponse object
Returns:
the LogoutResponse object
Throws:
FSMsgException - if unable to construct the object

toXMLString

public java.lang.String toXMLString()
                             throws FSMsgException
Gets a String representation of the LogoutResponse 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)
                             throws FSMsgException
Gets a String representation of the LogoutResponse 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.
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 LogoutResponse 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.

parseBASE64EncodedString

public static FSLogoutResponse parseBASE64EncodedString(java.lang.String encodedRes)
                                                 throws FSMsgException,
                                                        SAMLException
Creates the response object based on the BASE 64 encoded string.

Parameters:
encodedRes - BASE 64 encoded response.
Returns:
FSLogoutResponse object
Throws:
FSMsgException - if unable to get the BASE 64 encoded string
SAMLException - if unable to get the BASE 64 encoded string

toBASE64EncodedString

public java.lang.String toBASE64EncodedString()
                                       throws FSMsgException
Gets the BASE64 encoded string of the response object.

Returns:
BASE64 encoded string of the response object.
Throws:
FSMsgException - if unable to get the encoded string.

signXML

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

Parameters:
certAlias - certificate alias which will be used for signing,
Throws:
SAMLException - if could not sign the Response.

signXML

public void signXML()
             throws SAMLException
Signs the Response.

Specified by:
signXML in class AbstractResponse
Throws:
SAMLException - if could not sign the Response.

setSignature

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

Overrides:
setSignature in class AbstractResponse
Parameters:
elem - Signature element to be set.
Returns:
true if successful, false otherwise.

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 query string.

parseURLEncodedRequest

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

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


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