com.sun.identity.federation.message
Class FSFederationTerminationNotification

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

public class FSFederationTerminationNotification
extends AbstractRequest

This class has methods for creating object and message for Federation Termination.


Field Summary
protected  String id
           
protected  String signatureString
           
protected  String xmlString
           
 
Fields inherited from class com.sun.identity.saml.protocol.AbstractRequest
issueInstant, majorVersion, minorVersion, requestID, respondWiths, signature, signed, valid
 
Constructor Summary
FSFederationTerminationNotification()
          Default Constructor.
FSFederationTerminationNotification(Element root)
          Creates FSFederationTerminationNotification from a Document Element.
FSFederationTerminationNotification(String requestId, String providerID, NameIdentifier nameId)
          Creates FSFederationTerminationNotification object.
 
Method Summary
 String getID()
          Returns the value of id attribute.
 int getMinorVersion()
          Returns the value of MinorVersion attribute.
 NameIdentifier getNameIdentifier()
          Returns the NameIdentifier object.
 String getProviderId()
          Returns the value of ProviderID attribute.
 String getRelayState()
          Returns the value of RelayState attribute.
static FSFederationTerminationNotification parseURLEncodedRequest(HttpServletRequest request)
          Returns FSFederationTerminationNotification object.
static FSFederationTerminationNotification parseXML(String xml)
          Returns the FSAuthnRequest object.
 void setID(String id)
          Sets the value of id attribute.
 void setMinorVersion(int version)
          Sets the value of MinorVersion attribute.
 void setNameIdentifier(NameIdentifier nameId)
          Sets the NameIdentifier object.
 void setProviderId(String providerID)
          Sets the value of ProviderID attribute.
 void setRelayState(String relayState)
          Set the value of RelayState attribute.
 boolean setSignature(Element elem)
          Sets the Element signature.
 void signXML()
          Unsupported operation.
 void signXML(String certAlias)
          Signs the FSFederationTerminationNotification.
 String toBASE64EncodedString()
          Returns a Base64 encoded string representing this object.
 String toURLEncodedQueryString()
          Returns an URL encoded query string.
 String toXMLString()
          Returns the string representation of this object.
 String toXMLString(boolean includeNS, boolean declareNS)
          Returns the string representation of this object.
 String toXMLString(boolean includeNS, boolean declareNS, boolean includeHeader)
          Returns a String representation of the <samlp:Response> element.
 
Methods inherited from class com.sun.identity.saml.protocol.AbstractRequest
addRespondWith, getIssueInstant, getMajorVersion, getRequestID, getRespondWith, getSignature, isSignatureValid, isSigned, setIssueInstant, setMajorVersion, setRequestID
 

Field Detail

xmlString

protected String xmlString

signatureString

protected String signatureString

id

protected String id
Constructor Detail

FSFederationTerminationNotification

public FSFederationTerminationNotification()
Default Constructor.


FSFederationTerminationNotification

public FSFederationTerminationNotification(Element root)
                                    throws FSMsgException
Creates FSFederationTerminationNotification from a Document Element.

Parameters:
root - the Document Element.
Throws:
FSMsgException - if there is an error creating this object.

FSFederationTerminationNotification

public FSFederationTerminationNotification(String requestId,
                                           String providerID,
                                           NameIdentifier nameId)
                                    throws FSMsgException
Creates FSFederationTerminationNotification object.

Parameters:
requestId - the request identifier.
providerID - the provider identifier.
nameId - the NameIdentifier object.
Throws:
FSMsgException - if there is an error creating this object.
Method Detail

toXMLString

public String toXMLString(boolean includeNS,
                          boolean declareNS)
                   throws FSMsgException
Returns the string representation of this object. This method translates the response to an XML document string based on the Response schema described above.

Returns:
An XML String representing the response. NOTE: this is a complete SAML response xml string with ResponseID, MajorVersion, etc.
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 <samlp: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 there is an error converting this object ot a string.

toXMLString

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

Returns:
An XML String representing the response. NOTE: this is a complete SAML response xml string with ResponseID, MajorVersion, etc.
Throws:
FSMsgException

parseXML

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

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

getID

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

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

setID

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

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

setRelayState

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

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

getRelayState

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

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

getMinorVersion

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

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

setMinorVersion

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

Overrides:
setMinorVersion in class AbstractRequest
Parameters:
version - the value of MinorVersion attribute.
See Also:
FSFederationTerminationNotification.getMinorVersion()

getProviderId

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

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

setProviderId

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

Parameters:
providerID - the value of ProviderID attribute.
See Also:
FSFederationTerminationNotification.getProviderId()

getNameIdentifier

public NameIdentifier getNameIdentifier()
Returns the NameIdentifier object.

Returns:
the NameIdentifier object.

setNameIdentifier

public void setNameIdentifier(NameIdentifier nameId)
Sets the NameIdentifier object.

Parameters:
nameId - the NameIdentifier object.

toURLEncodedQueryString

public String toURLEncodedQueryString()
                               throws FSMsgException
Returns an URL encoded query string.

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

toBASE64EncodedString

public String toBASE64EncodedString()
                             throws FSMsgException
Returns a Base64 encoded string representing this object.

Returns:
a Base64 encoded string representing this object.
Throws:
FSMsgException - if there is an error creating a Base64 encoded string.

parseURLEncodedRequest

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

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

signXML

public void signXML()
             throws SAMLException
Unsupported operation.

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

signXML

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

Parameters:
certAlias - the Certificate Alias
Throws:
SAMLException - if FSFederationTerminationNotification cannot be signed.

setSignature

public boolean setSignature(Element elem)
Sets the Element signature.

Overrides:
setSignature in class AbstractRequest
Parameters:
elem - the Element object
Returns:
true if signature is set otherwise false