com.sun.identity.federation.message
Class FSLogoutResponse

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

public class FSLogoutResponse
extends AbstractResponse

This class has methods to create a Liberty LogoutResponse.


Field Summary
protected  String id
           
protected  String signatureString
           
protected  String xmlString
           
 
Fields inherited from class com.sun.identity.saml.protocol.AbstractResponse
issueInstant, majorVersion, minorVersion, recipient, responseID, signature, signed, valid, validationDone
 
Constructor Summary
FSLogoutResponse()
          Default Constructor.
FSLogoutResponse(Element root)
          Constructor creates FSLogoutResponse object from a Document element.
FSLogoutResponse(String responseID, String inResponseTo, Status status, String providerId, String relayState)
          Constructor creates FSLogoutResponse object.
 
Method Summary
 String getID()
          Returns the value of id attribute.
 int getMinorVersion()
          Returns the value of MinorVersion attribute.
 String getProviderId()
          Returns the value of ProviderID attribute.
 String getRelayState()
          Returns the value of RelayState attribute.
 String getResponseTo()
          Returns the value of InResponseTo attribute.
 String getSignatureString()
          Returns the Signed LogoutResponse string.
 Status getStatus()
          Returns the Logout Status.
static FSLogoutResponse parseBASE64EncodedString(String encodedRes)
          Returns FSLogoutResponse object.
static FSLogoutResponse parseURLEncodedRequest(HttpServletRequest request)
          Returns FSLogoutResponse object.
static FSLogoutResponse parseXML(String xml)
          Returns the FSLogoutResponse object.
 void setID(String id)
          Sets the value of id attribute.
 void setMinorVersion(int version)
          Sets the value of MinorVersion attribute.
 void setProviderId(String providerId)
          Sets the value of ProviderID attribute.
 void setRelayState(String relayState)
          Set the value of RelayState attribute.
 void setResponseTo(String inResponseTo)
          Sets the value of InResponseTo attribute.
 boolean setSignature(Element elem)
          Sets the Signature.
 void setStatus(Status status)
          Sets the Logout Status.
 void setStatus(String status)
          Sets the Logout Status.
 void signXML()
          Unsupported operation.
 void signXML(String certAlias)
          Signs the LogoutResponse.
 String toBASE64EncodedString()
          Returns a Base64 Encoded String.
 String toURLEncodedQueryString()
          Returns an URL Encoded String.
 String toXMLString()
          Returns a String representation of the LogoutResponse object.
 String toXMLString(boolean includeNS, boolean declareNS)
          Returns a String representation of the LogoutResponse object.
 String toXMLString(boolean includeNS, boolean declareNS, boolean includeHeader)
          Returns a String representation of the LogoutResponse object.
 
Methods inherited from class com.sun.identity.saml.protocol.AbstractResponse
getInResponseTo, getIssueInstant, getMajorVersion, getRecipient, getResponseID, getSignature, isSignatureValid, isSigned, setInResponseTo, setIssueInstant, setMajorVersion, setRecipient, setResponseID
 

Field Detail

xmlString

protected String xmlString

signatureString

protected String signatureString

id

protected String id
Constructor Detail

FSLogoutResponse

public FSLogoutResponse()
Default Constructor.


FSLogoutResponse

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

Parameters:
responseID - the value of ResponseID attribute.
inResponseTo - the value of inResponseTo attribute.
status - the Logout Status object.
providerId - the value of ProviderID attribute.
relayState - the value of RelayState attribute.
Throws:
FSMsgException - if this object cannot be created.
FSMsgException

FSLogoutResponse

public FSLogoutResponse(Element root)
                 throws FSMsgException,
                        SAMLException
Constructor creates FSLogoutResponse object from a Document element.

Parameters:
root - the Document element object.
Throws:
FSMsgException - if this object cannot be created.
SAMLException - if there is an error.
Method Detail

getRelayState

public String getRelayState()
Returns the value of RelayState attribute.

Returns:
the value of RelayState attribute.
See Also:
FSLogoutResponse.setRelayState(String)

setRelayState

public void setRelayState(String relayState)
Set the value of RelayState attribute.

Parameters:
relayState - the value of RelayState attribute.
See Also:
FSLogoutResponse.getRelayState()

getResponseTo

public String getResponseTo()
Returns the value of InResponseTo attribute.

Returns:
the value of InResponseTo attribute.
See Also:
FSLogoutResponse.setResponseTo(String)

setResponseTo

public void setResponseTo(String inResponseTo)
Sets the value of InResponseTo attribute.

Parameters:
inResponseTo - the value of InResponseTo attribute.
See Also:
FSLogoutResponse.getResponseTo()

getID

public String getID()
Returns the value of id attribute.

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

setID

public void setID(String id)
Sets the value of id attribute.

Parameters:
id - the value of id attribute.
See Also:
FSLogoutResponse.getID()

getProviderId

public String getProviderId()
Returns the value of ProviderID attribute.

Returns:
the value of ProviderID attribute.
See Also:
FSLogoutResponse.setProviderId(String).

setProviderId

public void setProviderId(String providerId)
Sets the value of ProviderID attribute.

Parameters:
providerId - the value of ProviderID attribute.
See Also:
FSLogoutResponse.getProviderId()

getSignatureString

public String getSignatureString()
Returns the Signed LogoutResponse string.

Returns:
signatureString the Signed LogoutResponse string.

getMinorVersion

public int getMinorVersion()
Returns the value of MinorVersion attribute.

Overrides:
getMinorVersion in class AbstractResponse
Returns:
the value of MinorVersion attribute.
See Also:
FSLogoutResponse.setMinorVersion(int)

setMinorVersion

public void setMinorVersion(int version)
Sets the value of MinorVersion attribute.

Overrides:
setMinorVersion in class AbstractResponse
Parameters:
version - thevalue of MinorVersion attribute.
See Also:
FSLogoutResponse.getMinorVersion()

getStatus

public Status getStatus()
Returns the Logout Status.

Returns:
the Logout Status.
See Also:
FSLogoutResponse.setStatus(String), FSLogoutResponse.setStatus(Status)

setStatus

public void setStatus(String status)
Sets the Logout Status.

Parameters:
status - the Logout StatusSee Also:
FSLogoutResponse.getStatus()

setStatus

public void setStatus(Status status)
Sets the Logout Status.

Parameters:
status - the Logout StatusSee Also:
FSLogoutResponse.getStatus()

parseXML

public static FSLogoutResponse parseXML(String xml)
                                 throws FSMsgException
Returns the FSLogoutResponse object.

Parameters:
xml - the XML string to be parsed.
Returns:
FSLogoutResponse object created from the XML string.
Throws:
FSMsgException - if there is error creating the object.

toXMLString

public String toXMLString()
                   throws FSMsgException
Returns a String representation of the LogoutResponse object. This method translates the response to an XML string.

Returns:
An XML String representing the logout response.
Throws:
FSMsgException

toXMLString

public String toXMLString(boolean includeNS,
                          boolean declareNS)
                   throws FSMsgException
Returns a String representation of the LogoutResponse object.

Returns:
An XML String representing the logout response.
Throws:
FSMsgException - if there is an error converting this object ot a string.

toXMLString

public String toXMLString(boolean includeNS,
                          boolean declareNS,
                          boolean includeHeader)
                   throws FSMsgException
Returns a String representation of the LogoutResponse 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 there is an error converting this object ot a string.

parseBASE64EncodedString

public static FSLogoutResponse parseBASE64EncodedString(String encodedRes)
                                                 throws FSMsgException,
                                                        SAMLException
Returns FSLogoutResponse object. The object is created by parsing an Base64 encode authentication request String.

Parameters:
encodedRes - the encode string
Throws:
FSMsgException - if there is an error creating this object.
SAMLException - if there is an error creating this object.

toBASE64EncodedString

public String toBASE64EncodedString()
                             throws FSMsgException
Returns a Base64 Encoded String.

Returns:
a Base64 Encoded String.
Throws:
FSMsgException - if there is an error encoding the string.

signXML

public void signXML()
Unsupported operation.

Specified by:
signXML in class AbstractResponse

signXML

public void signXML(String certAlias)
             throws SAMLException
Signs the LogoutResponse.

Parameters:
certAlias - the Certificate Alias.
Throws:
XMLSignatureException - if this object cannot be signed.
SAMLException

setSignature

public boolean setSignature(Element elem)
Sets the Signature.

Overrides:
setSignature in class AbstractResponse
Parameters:
elem - the Document Element.
Returns:
true if success otherwise false.

toURLEncodedQueryString

public String toURLEncodedQueryString()
                               throws FSMsgException
Returns an URL Encoded String.

Returns:
a url encoded query string.
Throws:
FSMsgException - if there is an error.

parseURLEncodedRequest

public static FSLogoutResponse parseURLEncodedRequest(HttpServletRequest request)
                                               throws FSMsgException,
                                                      SAMLException
Returns FSLogoutResponse object. The object is creating by parsing the HttpServletRequest object.

Parameters:
request - the HttpServletRequest object.
Throws:
FSMsgException - if there is an error creating this object.
SAMLException - if there is an error.