com.sun.identity.federation.message
Class FSNameRegistrationRequest

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

public class FSNameRegistrationRequest
extends AbstractRequest

This class FSNameRegistrationRequest is used to construct and/or parse Name Identifier Registration request.


Constructor Summary
FSNameRegistrationRequest()
          Default constructor
FSNameRegistrationRequest(org.w3c.dom.Element root)
          Constructor
FSNameRegistrationRequest(java.lang.String requestId, java.util.List respondWiths, java.lang.String providerId, SPProvidedNameIdentifier spProvidedNameIdentifier, IDPProvidedNameIdentifier idpProvidedNameIdentifier, OldProvidedNameIdentifier oldProvidedNameIdentifier, java.lang.String relayState)
          Constructor
 
Method Summary
 java.lang.String getID()
          Returns ID of this request.
 IDPProvidedNameIdentifier getIDPProvidedNameIdentifier()
          Gets name identifier provided by IDP
 int getMinorVersion()
          Gets minor version
 OldProvidedNameIdentifier getOldProvidedNameIdentifier()
          Gets old name identifier
 java.lang.String getProviderId()
          Gets provider ID
 java.lang.String getRelayState()
          Gets RelayState parameter
 java.lang.String getSignatureString()
          Get the Signature Element as string
 java.lang.String getSignedXMLString()
          Get Signed XML String
 SPProvidedNameIdentifier getSPProvidedNameIdentifier()
          Gets SP provided name identifier
static FSNameRegistrationRequest parseURLEncodedRequest(javax.servlet.http.HttpServletRequest request)
          Gets the FSNameRegistrationRequest from the query parameters.
static FSNameRegistrationRequest parseXML(java.lang.String xml)
          Parses the XML and creates an FSNameRegistrationRequest object
 void setID(java.lang.String id)
          Set ID of this request.
 void setIDPProvidedNameIdentifier(IDPProvidedNameIdentifier nameIdentifier)
          Sets IDP provided name identifier
 void setMinorVersion(int version)
          Sets minor version
 void setOldProvidedNameIdentifier(OldProvidedNameIdentifier nameIdentifier)
          Sets old name identifier
 void setProviderId(java.lang.String providerId)
          Sets provider ID
 void setRelayState(java.lang.String relayState)
          Sets RelayState parameter
 boolean setSignature(org.w3c.dom.Element elem)
          Sets the Signature element
 void setSPProvidedNameIdentifier(SPProvidedNameIdentifier nameIdentifier)
          Sets SP provided name identifier
 void signXML()
          Signs the FSNameRegistrationRequest object.
 void signXML(java.lang.String certAlias)
          Signs the FSNameRegistrationRequest object.
 java.lang.String toBASE64EncodedString()
          Gets base 64 encoded string representation of the object
 java.lang.String toURLEncodedQueryString()
          Gets the URL encoded string format of the request.
 java.lang.String toXMLString()
          Creates a String representation of the FSNameRegistrationRequest object
 java.lang.String toXMLString(boolean includeNS, boolean declareNS)
          Creates a String representation of the FSNameRegistrationRequest object
 java.lang.String toXMLString(boolean includeNS, boolean declareNS, boolean includeHeader)
          Creates a String representation of the FSNameRegistrationRequest object
 
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, toString, wait, wait, wait
 

Constructor Detail

FSNameRegistrationRequest

public FSNameRegistrationRequest()
Default constructor


FSNameRegistrationRequest

public FSNameRegistrationRequest(java.lang.String requestId,
                                 java.util.List respondWiths,
                                 java.lang.String providerId,
                                 SPProvidedNameIdentifier spProvidedNameIdentifier,
                                 IDPProvidedNameIdentifier idpProvidedNameIdentifier,
                                 OldProvidedNameIdentifier oldProvidedNameIdentifier,
                                 java.lang.String relayState)
                          throws FSMsgException
Constructor

Parameters:
requestId - RequestID, if null, the constructor will create one.
respondWiths - List of respond withs
providerId - provider id of the requesting provider
spProvidedNameIdentifier - name identifier provided by SP
idpProvidedNameIdentifier - name identifier provided by IDP
oldProvidedNameIdentifier - old name identifier to be replaced
relayState - Relay State i.e. original URL to be redirected after SSO
Throws:
FSMsgException - if unable to construct the object.

FSNameRegistrationRequest

public FSNameRegistrationRequest(org.w3c.dom.Element root)
                          throws FSMsgException
Constructor

Parameters:
root - DOM Element representing the FSNameRegistrationRequest object
Throws:
FSMsgException - if unable to construct the object
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.

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

getSignedXMLString

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

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

getSignatureString

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

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

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 FSNameRegistrationRequest parseXML(java.lang.String xml)
                                          throws FSMsgException
Parses the XML and creates an FSNameRegistrationRequest object

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

toXMLString

public java.lang.String toXMLString()
                             throws FSMsgException
Creates a String representation of the FSNameRegistrationRequest object

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
Creates a String representation of the FSNameRegistrationRequest 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.
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
Creates a String representation of the FSNameRegistrationRequest 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 unable to get the XML string.

getIDPProvidedNameIdentifier

public IDPProvidedNameIdentifier getIDPProvidedNameIdentifier()
Gets name identifier provided by IDP

Returns:
name identifier provided by IDP

getOldProvidedNameIdentifier

public OldProvidedNameIdentifier getOldProvidedNameIdentifier()
Gets old name identifier

Returns:
old name identifier

getProviderId

public java.lang.String getProviderId()
Gets provider ID

Returns:
provider ID

setIDPProvidedNameIdentifier

public void setIDPProvidedNameIdentifier(IDPProvidedNameIdentifier nameIdentifier)
Sets IDP provided name identifier

Parameters:
nameIdentifier - IDP provided name identifier to be set.

setOldProvidedNameIdentifier

public void setOldProvidedNameIdentifier(OldProvidedNameIdentifier nameIdentifier)
Sets old name identifier

Parameters:
nameIdentifier - old name identifier to be set.

setSPProvidedNameIdentifier

public void setSPProvidedNameIdentifier(SPProvidedNameIdentifier nameIdentifier)
Sets SP provided name identifier

Parameters:
nameIdentifier - SP provided name identifier to be set.

setProviderId

public void setProviderId(java.lang.String providerId)
Sets provider ID

Parameters:
providerId - provider ID to be set

getSPProvidedNameIdentifier

public SPProvidedNameIdentifier getSPProvidedNameIdentifier()
Gets SP provided name identifier

Returns:
SP provided name identifier

toBASE64EncodedString

public java.lang.String toBASE64EncodedString()
                                       throws FSMsgException
Gets base 64 encoded string representation of the object

Returns:
base 64 encoded string representation of the object
Throws:
FSMsgException - if unable to get the string

signXML

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

Parameters:
certAlias - certification Alias used to sign the FSNameRegistrationRequest object
Throws:
SAMLException - if it could not sign the FSNameRegistrationRequest object

signXML

public void signXML()
             throws SAMLException
Signs the FSNameRegistrationRequest object.

Specified by:
signXML in class AbstractRequest
Throws:
SAMLException - if it could not sign the FSNameRegistrationRequest object

setSignature

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

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

toURLEncodedQueryString

public java.lang.String toURLEncodedQueryString()
                                         throws FSMsgException
Gets the URL encoded string format of the request.

Returns:
URL encoded string format of the request.
Throws:
FSMsgException - if unable to convert the request.

parseURLEncodedRequest

public static FSNameRegistrationRequest parseURLEncodedRequest(javax.servlet.http.HttpServletRequest request)
                                                        throws FSMsgException,
                                                               SAMLException
Gets the FSNameRegistrationRequest from the query parameters.

Parameters:
request - HttpServletRequest to retrieve query parameters
Returns:
FSNameRegistrationRequest object.
Throws:
SAMLException - if unable to construct the object.
FSMsgException - if unable to construct the object.


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