com.sun.identity.federation.message
Class FSResponse

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

public class FSResponse
extends Response

This class contains methods for creating a Liberty Response.


Field Summary
protected  String id
           
 
Fields inherited from class com.sun.identity.saml.protocol.Response
assertions, issuer, signatureString, status, xmlString
 
Fields inherited from class com.sun.identity.saml.protocol.AbstractResponse
inResponseTo, issueInstant, majorVersion, minorVersion, recipient, responseID, signature, signed, valid, validationDone
 
Constructor Summary
FSResponse(Element root)
          Constructor creates FSResponse object form a Document Element.
FSResponse(String responseID, String inResponseTo, Status status, List contents)
          Constructor creates FSResponse object.
 
Method Summary
 String getID()
          Returns the value of id attribute.
 int getMinorVersion()
          Returns the MinorVersion.
 String getSignatureString()
          Returns the signed XML string.
static FSResponse parseBASE64EncodedString(String encodedRes)
          Returns FSResponse object.
static FSResponse parseResponseXML(String xml)
           
 void setID(String id)
          Sets the value of id attribute.
 void setMinorVersion(int version)
          Sets the MinorVersion.
 void signXML()
          Unsupported operation.
 void signXML(String certAlias)
          Signs the Response.
 String toBASE64EncodedString()
          Returns a Base64 Encoded String.
 String toXMLString()
          Returns a String representation of the Logout Response.
 String toXMLString(boolean includeNS, boolean declareNS)
          Returns a String representation of the Logout Response.
 String toXMLString(boolean includeNS, boolean declareNS, boolean includeHeader)
           
 
Methods inherited from class com.sun.identity.saml.protocol.Response
addAssertion, getAssertion, getStatus, isSignatureValid, parseXML, parseXML, setSignature, setStatus, toString, toString, toString
 
Methods inherited from class com.sun.identity.saml.protocol.AbstractResponse
getInResponseTo, getIssueInstant, getMajorVersion, getRecipient, getResponseID, getSignature, isSigned, setInResponseTo, setIssueInstant, setMajorVersion, setRecipient, setResponseID
 

Field Detail

id

protected String id
Constructor Detail

FSResponse

public FSResponse(String responseID,
                  String inResponseTo,
                  Status status,
                  List contents)
           throws SAMLException,
                  FSMsgException
Constructor creates FSResponse object.

Parameters:
responseID - value of ResponseId attribute.
inResponseTo - value of inResponseTo attribute.
status - the Status object.
contents - list containing response elements.
Throws:
SAMLException - it there is an error creating this object.
FSMsgException - it there is an error creating this object.

FSResponse

public FSResponse(Element root)
           throws SAMLException,
                  FSMsgException
Constructor creates FSResponse object form a Document Element.

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

getID

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

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

setID

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

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

getSignatureString

public String getSignatureString()
Returns the signed XML string.

Returns:
the signed XML string.

getMinorVersion

public int getMinorVersion()
Returns the MinorVersion.

Overrides:
getMinorVersion in class AbstractResponse
Returns:
the MinorVersion.
See Also:
FSResponse.setMinorVersion(int)

setMinorVersion

public void setMinorVersion(int version)
Sets the MinorVersion.

Overrides:
setMinorVersion in class AbstractResponse
Parameters:
version - the MinorVersion.
See Also:
FSResponse.getMinorVersion()

parseResponseXML

public static FSResponse parseResponseXML(String xml)
                                   throws SAMLException,
                                          FSMsgException
Throws:
SAMLException
FSMsgException

toXMLString

public String toXMLString()
                   throws FSMsgException
Returns a String representation of the Logout Response.

Returns:
a string containing the valid XML for this element
Throws:
FSMsgException - if there is an error converting this object to a string.

toXMLString

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

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 there is an error converting this object ot a string.

toXMLString

public String toXMLString(boolean includeNS,
                          boolean declareNS,
                          boolean includeHeader)
                   throws FSMsgException
Throws:
FSMsgException

parseBASE64EncodedString

public static FSResponse parseBASE64EncodedString(String encodedRes)
                                           throws FSMsgException,
                                                  SAMLException
Returns FSResponse object. The object is created by parsing an Base64 encoded response string.

Parameters:
encodedRes - the encoded response string
Throws:
FSMsgException - if there is an error creating FSResponse object.
FSMsgException - if there is an error creating FSResponse object.
SAMLException

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(String certAlias)
             throws SAMLException
Signs the Response.

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

signXML

public void signXML()
             throws SAMLException
Unsupported operation.

Overrides:
signXML in class Response
Throws:
SAMLException - if could not sign the Response.