com.sun.identity.liberty.ws.interaction
Class InteractionManager

java.lang.Object
  |
  +--com.sun.identity.liberty.ws.interaction.InteractionManager

public class InteractionManager
extends java.lang.Object

This class provides the interface and implementation for supporting resource owner interaction. WSC and WSP would collaborate with the singleton object instance of this class to provide and use resource owner interaction.


Field Summary
static java.lang.String IDP
          Name of URL query parameter to be used by WSC to include providerID of IDP, that was used to authenticate user.
static java.lang.String INTERACTION_NAMESPACE
          Name space URI of interaction service
static java.lang.String REQUEST_ID
          Name of suggested URL query parameter to be used by WSC to include an ID to refer to request message that led to user agent redirect.
static java.lang.String RESEND_MESSAGE
          Name of URL query parameter to be used by WSP to include an ID to indicate that user agent is redirected back to WSC from WSP
static java.lang.String RETURN_TO_URL
          Name of URL query parameter to be used by WSC to include returnToURL, while redirecting user agent to WSP.
 
Constructor Summary
InteractionManager()
           
 
Method Summary
static InteractionManager getInstance()
          Gets singleton object instance of InteractionManager
 com.sun.identity.liberty.ws.interaction.jaxb.InteractionResponseElement getInteractionResponseElement(com.sun.identity.liberty.ws.soapbinding.Message requestMessage)
          Gets interaction response that was gathered from resource owner by InteractionManager
 com.sun.identity.liberty.ws.soapbinding.Message handleInteraction(com.sun.identity.liberty.ws.soapbinding.Message requestMessage, com.sun.identity.liberty.ws.interaction.jaxb.InquiryElement inquiryElement, java.lang.String language)
          Handles resource owner interactions on behalf of WSP.
 com.sun.identity.liberty.ws.soapbinding.Message resendRequest(java.lang.String returnToURL, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
          Resends a previously cached SOAP request message to WSP.
 com.sun.identity.liberty.ws.soapbinding.Message resendRequest(java.lang.String returnToURL, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, com.sun.identity.liberty.ws.soapbinding.Message requestMessage)
          Resends a SOAP request message to WSP.
 com.sun.identity.liberty.ws.soapbinding.Message sendRequest(com.sun.identity.liberty.ws.soapbinding.Message requestMessage, java.lang.String connectTo, java.lang.String returnToURL, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
          Sends SOAP request to WSP.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RETURN_TO_URL

public static final java.lang.String RETURN_TO_URL
Name of URL query parameter to be used by WSC to include returnToURL, while redirecting user agent to WSP.

REQUEST_ID

public static final java.lang.String REQUEST_ID
Name of suggested URL query parameter to be used by WSC to include an ID to refer to request message that led to user agent redirect.

IDP

public static final java.lang.String IDP
Name of URL query parameter to be used by WSC to include providerID of IDP, that was used to authenticate user.

RESEND_MESSAGE

public static final java.lang.String RESEND_MESSAGE
Name of URL query parameter to be used by WSP to include an ID to indicate that user agent is redirected back to WSC from WSP

INTERACTION_NAMESPACE

public static final java.lang.String INTERACTION_NAMESPACE
Name space URI of interaction service
Constructor Detail

InteractionManager

public InteractionManager()
Method Detail

getInstance

public static InteractionManager getInstance()
Gets singleton object instance of InteractionManager
Returns:
singleton object instance of InteractionManager

sendRequest

public com.sun.identity.liberty.ws.soapbinding.Message sendRequest(com.sun.identity.liberty.ws.soapbinding.Message requestMessage,
                                                                   java.lang.String connectTo,
                                                                   java.lang.String returnToURL,
                                                                   javax.servlet.http.HttpServletRequest httpRequest,
                                                                   javax.servlet.http.HttpServletResponse httpResponse)
                                                            throws InteractionException,
                                                                   InteractionRedirectException,
                                                                   com.sun.identity.liberty.ws.soapbinding.SOAPBindingException,
                                                                   com.sun.identity.liberty.ws.soapbinding.SOAPFaultException
Sends SOAP request to WSP. This would be invoked at WSC side.
Parameters:
requestMessage - request message.
connectTo - SOAP URL to which to send the SOAP request
returnToURL - URL to which to redirect user agent after WSP - resource owner interactions
httpRequest - HTTP request object of current user agent request
httpResponse - HTTP response object of current user agent request
Returns:
response SOAP response message sent by WSP.
Throws:
InteractionException - for generic interaction error
InteractionRedirectException - if user agent is redirected to WSP for resource owner interactions
com.sun.identity.liberty.ws.soapbinding.SOAPBindingException - for generic SOAP binding errors
com.sun.identity.liberty.ws.soapbinding.SOAPFaultException - if the response message has SOAP fault

resendRequest

public com.sun.identity.liberty.ws.soapbinding.Message resendRequest(java.lang.String returnToURL,
                                                                     javax.servlet.http.HttpServletRequest httpRequest,
                                                                     javax.servlet.http.HttpServletResponse httpResponse)
                                                              throws InteractionRedirectException,
                                                                     InteractionException,
                                                                     com.sun.identity.liberty.ws.soapbinding.SOAPBindingException,
                                                                     com.sun.identity.liberty.ws.soapbinding.SOAPFaultException
Resends a previously cached SOAP request message to WSP. This would be invoked at WSC side. Message ID for the cached message should be provided as value of REQUEST_ID query parameter in httpRequest.
Parameters:
returnToURL - URL to which to redirect user agent after WSP - resource owner interactions
httpRequest - HTTP request object of current user agent request
httpResponse - HTTP response object of current user agent request
Returns:
response SOAP message sent by WSP.
Throws:
InteractionException - for generic interaction error
InteractionRedirectException - if user agent is redirected to WSP for resource owner interactions
com.sun.identity.liberty.ws.soapbinding.SOAPBindingException - if there are generic SOAP errors
com.sun.identity.liberty.ws.soapbinding.SOAPFaultException - if the response message has SOAP fault
See Also:
REQUEST_ID

resendRequest

public com.sun.identity.liberty.ws.soapbinding.Message resendRequest(java.lang.String returnToURL,
                                                                     javax.servlet.http.HttpServletRequest httpRequest,
                                                                     javax.servlet.http.HttpServletResponse httpResponse,
                                                                     com.sun.identity.liberty.ws.soapbinding.Message requestMessage)
                                                              throws InteractionRedirectException,
                                                                     InteractionException,
                                                                     com.sun.identity.liberty.ws.soapbinding.SOAPBindingException,
                                                                     com.sun.identity.liberty.ws.soapbinding.SOAPFaultException
Resends a SOAP request message to WSP. This would be invoked at WSC side.
Parameters:
returnToURL - URL to which to redirect user agent after WSP - resource owner interactions
httpRequest - HTTP request object of current user agent request
httpResponse - HTTP response object of current user agent request
requestMessage - SOAP message to be resent.
Returns:
response SOAP message sent by WSP.
Throws:
InteractionException - for generic interaction error
InteractionRedirectException - if user agent is redirected to WSP for resource owner interactions
com.sun.identity.liberty.ws.soapbinding.SOAPBindingException - for generic SOAP errors
com.sun.identity.liberty.ws.soapbinding.SOAPFaultException - if the response message has SOAP fault

handleInteraction

public com.sun.identity.liberty.ws.soapbinding.Message handleInteraction(com.sun.identity.liberty.ws.soapbinding.Message requestMessage,
                                                                         com.sun.identity.liberty.ws.interaction.jaxb.InquiryElement inquiryElement,
                                                                         java.lang.String language)
                                                                  throws InteractionException,
                                                                         InteractionSOAPFaultException,
                                                                         com.sun.identity.liberty.ws.soapbinding.SOAPFaultException
Handles resource owner interactions on behalf of WSP. This is invoked at WSP side.
Parameters:
requestMessage - SOAP request that requires resource owner interactions
inquiryElement - query that WSP wants to pose to resource owner
language - language in which the query page needs to be rendered
Returns:
SOAP message that contains InteractionResponse, gathered by InteractionManager
Throws:
InteractionException - for generic interaction error
InteractionSOAPFaultException - if a SOAP fault has to be returned to WSC
com.sun.identity.liberty.ws.soapbinding.SOAPFaultException - if the response message has SOAP fault

getInteractionResponseElement

public com.sun.identity.liberty.ws.interaction.jaxb.InteractionResponseElement getInteractionResponseElement(com.sun.identity.liberty.ws.soapbinding.Message requestMessage)
                                                                                                      throws InteractionException
Gets interaction response that was gathered from resource owner by InteractionManager
Parameters:
requestMessage - request message.
Returns:
interaction response that was gathered by InteractionManager.
Throws:
InteractionException - for interaction error