com.sun.identity.federation.message
Class FSRequest

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

public class FSRequest
extends Request

This Request class represents a Request XML document. It extends from the abstract base class AbstractRequest.


Field Summary
 
Fields inherited from class com.sun.identity.saml.protocol.Request
ASSERTION_ARTIFACT, ASSERTION_ID_REFERENCE, ATTRIBUTE_QUERY, AUTHENTICATION_QUERY, AUTHORIZATION_DECISION_QUERY, NOT_SUPPORTED
 
Constructor Summary
FSRequest(org.w3c.dom.Element root)
          Constructs a FSRequest.
FSRequest(java.lang.String requestId, java.util.List contents)
          This constructor shall only be used at the client side to construct a Request object.
FSRequest(java.lang.String requestId, Query query)
          This constructor shall only be used at the client side to construct a Request object.
 
Method Summary
 java.lang.String getID()
          Returns ID of this request.
 int getMinorVersion()
          Gets minor version
static Request parseXML(java.lang.String xml)
          This method shall only be used at the server side to reconstruct a Request object based on the XML document received from client.
 void setID(java.lang.String id)
          Set ID of this request.
 void setMinorVersion(int version)
          Sets minor version
 java.lang.String toXMLString()
          This method translates the request to an XML document String based on the Request schema described above.
 java.lang.String toXMLString(boolean includeNS, boolean declareNS)
          Creates a String representation of the <samlp:Request> element.
 java.lang.String toXMLString(boolean includeNS, boolean declareNS, boolean includeHeader)
          Creates a String representation of the <samlp:Request> element.
 
Methods inherited from class com.sun.identity.saml.protocol.Request
getAssertionArtifact, getAssertionIDReference, getContentType, getQuery, setSignature, signXML, toString, toString, toString
 
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, wait, wait, wait
 

Constructor Detail

FSRequest

public FSRequest(java.lang.String requestId,
                 Query query)
          throws SAMLException
This constructor shall only be used at the client side to construct a Request object. NOTE: The content here is just the body for the Request. The constructor will add MajorVersion, MinorVersion, etc. to form a complete Request.

Parameters:
requestId - If it's null, the constructor will create one.
query - A Query to be included in the Request.
Throws:
SAMLException

FSRequest

public FSRequest(java.lang.String requestId,
                 java.util.List contents)
          throws SAMLException
This constructor shall only be used at the client side to construct a Request object. NOTE: The content here is just the body for the Request. The constructor will add MajorVersion, MinorVersion, etc. to form a complete Request.

Parameters:
requestId - If it's null, the constructor will create one.
contents - A List of objects that are the contents of Request that the client wants to send to the server. It could be an AuthenticationQuery, AuthorizationDecisionQuery, AttributeQuery, 1 or more AssertionIDReference, or 1 or more of AssertionArtifact.
Throws:
SAMLException

FSRequest

public FSRequest(org.w3c.dom.Element root)
          throws SAMLException
Constructs a FSRequest.

Parameters:
root - XML root node.
Throws:
SAMLException
Method Detail

getID

public java.lang.String getID()
Returns ID of this request.

Returns:
ID of this request.

setID

public void setID(java.lang.String id)
Set ID of this request.

Parameters:
id - ID of this request.

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

parseXML

public static Request parseXML(java.lang.String xml)
                        throws SAMLException
This method shall only be used at the server side to reconstruct a Request object based on the XML document received from client. The schema of this XML document is described above.

Parameters:
xml - The Request XML String. NOTE: this is a complete SAML request XML string with RequestID, MajorVersion, etc.
Returns:
Request object
Throws:
SAMLException - when an error occurs.

toXMLString

public java.lang.String toXMLString()
This method translates the request to an XML document String based on the Request schema described above. NOTE: this is a complete SAML request XML string with RequestID, MajorVersion, etc.

Returns:
An XML String representing the request.

toXMLString

public java.lang.String toXMLString(boolean includeNS,
                                    boolean declareNS)
Creates a String representation of the <samlp:Request> element.

Parameters:
includeNS - Determines whether or not the names pace qualifier is prepended to the Element when converted
declareNS - Determines whether or not the name space is declared within the Element.
Returns:
A string containing the valid XML for this element

toXMLString

public java.lang.String toXMLString(boolean includeNS,
                                    boolean declareNS,
                                    boolean includeHeader)
Creates a String representation of the <samlp:Request> element.

Parameters:
includeNS - Determines whether or not the name space qualifier is prepended to the Element when converted
declareNS - Determines whether or not the name space 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.


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