com.sun.identity.federation.message
Class FSNameRegistrationRequest

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

public class FSNameRegistrationRequest
extends AbstractRequest

This class contains methods to create NameRegistrationRequest object.


Field Summary
protected  String id
           
protected  int minorVersion
           
protected  String signatureString
           
protected  String xmlString
           
 
Fields inherited from class com.sun.identity.saml.protocol.AbstractRequest
issueInstant, majorVersion, requestID, respondWiths, signature, signed, valid
 
Constructor Summary
FSNameRegistrationRequest()
          Default Constructor.
FSNameRegistrationRequest(Element root)
          Constructor creates FSNameRegistrationRequest> object from a Document Element.
FSNameRegistrationRequest(String requestId, List respondWiths, String providerId, SPProvidedNameIdentifier spProvidedNameIdentifier, IDPProvidedNameIdentifier idpProvidedNameIdentifier, OldProvidedNameIdentifier oldProvidedNameIdentifier, String relayState)
          Constructor creates the FSNameRegistrationRequest object.
 
Method Summary
 String getID()
          Returns the value of id attribute.
 IDPProvidedNameIdentifier getIDPProvidedNameIdentifier()
          Returns the Identity Provider's NameIdentifier.
 int getMinorVersion()
          Returns the MinorVersion.
 OldProvidedNameIdentifier getOldProvidedNameIdentifier()
          Returns the original NameIdentifier.
 String getProviderId()
          Returns the value of ProviderID attribute.
 String getRelayState()
          Returns the value of RelayState attribute.
 String getSignatureString()
          Returns the signed XML string.
 SPProvidedNameIdentifier getSPProvidedNameIdentifier()
          Returns the NameIdentifier provided by the Service Provider.
static FSNameRegistrationRequest parseURLEncodedRequest(HttpServletRequest request)
          Returns FSNameRegistrationRequest object.
static FSNameRegistrationRequest parseXML(String xml)
           
 void setID(String id)
          Sets the value of id attribute.
 void setIDPProvidedNameIdentifier(IDPProvidedNameIdentifier nameIdentifier)
          Sets the Identity Provider's NameIdentifier.
 void setMinorVersion(int version)
          Sets the MinorVersion.
 void setOldProvidedNameIdentifier(OldProvidedNameIdentifier nameIdentifier)
          Sets the original NameIdentifier.
 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 Signature.
 void setSPProvidedNameIdentifier(SPProvidedNameIdentifier nameIdentifier)
          Sets the Service Provider's NameIdentifier.
 void signXML()
          An abstract method to sign the object.
 void signXML(String certAlias)
          Signs the FSNameRegistrationRequest object.
 String toBASE64EncodedString()
          Returns a Base64 Encoded String.
 String toURLEncodedQueryString()
          Returns an URL 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)
          Returns a String representation of the Logout Response.
 
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

minorVersion

protected int minorVersion
Constructor Detail

FSNameRegistrationRequest

public FSNameRegistrationRequest()
Default Constructor.


FSNameRegistrationRequest

public FSNameRegistrationRequest(String requestId,
                                 List respondWiths,
                                 String providerId,
                                 SPProvidedNameIdentifier spProvidedNameIdentifier,
                                 IDPProvidedNameIdentifier idpProvidedNameIdentifier,
                                 OldProvidedNameIdentifier oldProvidedNameIdentifier,
                                 String relayState)
                          throws FSMsgException
Constructor creates the FSNameRegistrationRequest object.

Parameters:
requestId - the value of RequestID attribute.
respondWiths - the value of RespondWiths attribute.
providerId - the value of ProviderID attribute.
spProvidedNameIdentifier - the Service Provider NameIdentifier.
idpProvidedNameIdentifier - the Identity Provider NameIdentifier.
oldProvidedNameIdentifier - the Original Provider NameIdentifier.
relayState - the value of RelayState attribute.
Throws:
FSMsgException - if there is an error creating this object.

FSNameRegistrationRequest

public FSNameRegistrationRequest(Element root)
                          throws FSMsgException
Constructor creates FSNameRegistrationRequest> object from a Document Element.

Parameters:
root - the Document Element.
Throws:
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:
FSNameRegistrationRequest.setID(String)

setID

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

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

getRelayState

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

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

setRelayState

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

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

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 AbstractRequest
Returns:
the MinorVersion.
See Also:
FSNameRegistrationRequest.setMinorVersion(int)

setMinorVersion

public void setMinorVersion(int version)
Sets the MinorVersion.

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

parseXML

public static FSNameRegistrationRequest parseXML(String xml)
                                          throws FSMsgException
Throws:
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 ot 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
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.
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.

getIDPProvidedNameIdentifier

public IDPProvidedNameIdentifier getIDPProvidedNameIdentifier()
Returns the Identity Provider's NameIdentifier.

Returns:
the Identity Provider's NameIdentifier.

getOldProvidedNameIdentifier

public OldProvidedNameIdentifier getOldProvidedNameIdentifier()
Returns the original NameIdentifier.

Returns:
the original NameIdentifier.

getProviderId

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

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

setIDPProvidedNameIdentifier

public void setIDPProvidedNameIdentifier(IDPProvidedNameIdentifier nameIdentifier)
Sets the Identity Provider's NameIdentifier.

Parameters:
nameIdentifier - the Identity Provider's NameIdentifier.
See Also:
FSNameRegistrationRequest.getIDPProvidedNameIdentifier()

setOldProvidedNameIdentifier

public void setOldProvidedNameIdentifier(OldProvidedNameIdentifier nameIdentifier)
Sets the original NameIdentifier.

Parameters:
nameIdentifier - the original provider's NameIdentifier.
See Also:
FSNameRegistrationRequest.getOldProvidedNameIdentifier()

setSPProvidedNameIdentifier

public void setSPProvidedNameIdentifier(SPProvidedNameIdentifier nameIdentifier)
Sets the Service Provider's NameIdentifier.

Parameters:
nameIdentifier - the Identity Provider's NameIdentifier.
See Also:
FSNameRegistrationRequest.getSPProvidedNameIdentifier()

setProviderId

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

Parameters:
providerId - the value of ProviderID attribute.

getSPProvidedNameIdentifier

public SPProvidedNameIdentifier getSPProvidedNameIdentifier()
Returns the NameIdentifier provided by the Service Provider.

Returns:
the NameIdentifier provided by the Service Provider.
See Also:
FSNameRegistrationRequest.setSPProvidedNameIdentifier(SPProvidedNameIdentifier)

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()
Description copied from class: AbstractRequest
An abstract method to sign the object.

Specified by:
signXML in class AbstractRequest

signXML

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

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

setSignature

public boolean setSignature(Element elem)
Sets the Signature.

Overrides:
setSignature in class AbstractRequest
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 FSNameRegistrationRequest parseURLEncodedRequest(HttpServletRequest request)
                                                        throws FSMsgException,
                                                               SAMLException
Returns FSNameRegistrationRequest 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.