***  This class is subject to change   ***

com.sas.webapp.contextsharing
Class WebappContextParams

java.lang.Object
  |
  +--com.sas.webapp.contextsharing.WebappContextParams

public class WebappContextParams
extends Object

This class encapsulates the setting and getting of shared data between web applications.

Usage

To use this class for setting parameters, use the constructor which takes a SessionContextInterface and a startURL. Then call the various set methods to set the needed data. When done setting the data, call the getURL method to get the full URL that should be used to start the application.

To use this class for getting parameters, use the constructor which takes a HttpServletRequest. then call the various get methods needed. When you are done with the parameter data (not the session context), call the term method to cleanup the shared parameters.

Since:
07NOV2002

Constructor Summary
WebappContextParams(com.sas.services.session.SessionContextInterface sessionContext, String url)
          Constructs the class with the intent of populating the context parameters and then calling the getURL method to get the full URL.
WebappContextParams(com.sas.services.user.UserContextInterface user, HttpServletRequest request)
          Constructs the class with the intent of reading the context parameters.
WebappContextParams(com.sas.services.user.UserContextInterface user, HttpServletRequest request, boolean useRemoteServices)
          Constructs the class with the intent of reading the context parameters.
 
Method Summary
static void cleanSessionParams(com.sas.services.session.SessionContextInterface sessionContext, String sessionRequestId)
          Removes the context parameters from the session.
 String getParamRequestAction()
          Gets the PFS_REQUEST_ACTION parameter.
 RequestActionMenuData[] getParamRequestActionmenu()
          Gets the PFS_REQUEST_ACTIONMENU parameter.
 String getParamRequestAuthDomain()
          Gets the PFS_REQUEST_AUTH_DOMAIN parameter.
 String getParamRequestBacklabel()
          Deprecated. Use getParamRequestBacklabelList instead.
 List getParamRequestBacklabelList()
          Gets the PFS_REQUEST_BACKLABEL_LIST parameter.
 String getParamRequestBackurl()
          Deprecated. Use getParamRequestBackurlList instead.
 List getParamRequestBackurlList()
          Gets the PFS_REQUEST_BACKURL_LIST parameter.
 Object getParamRequestEntity()
          Gets the PFS_REQUEST_ENTITY parameter.
 String getParamRequestEntitykey()
          Gets the PFS_REQUEST_ENTITYKEY parameter.
 String getParamRequestLogoffurl()
          Gets the PFS_REQUEST_LOGOFFURL parameter.
 String getParamRequestPathUrl()
          Gets the PFS_REQUEST_PATH_URL parameter.
 String getParamRequestSource()
          Gets the PFS_REQUEST_SOURCE parameter.
 String getParamRequestTimeoutBackurl()
          The location to return to if the webapp times out.
 String getParamRequestType()
          Gets the PFS_REQUEST_TYPE parameter.
 String getPortletid()
          Returns the PORTAL_PORTLETID parameter.
 Map getRequestParams()
          Returns the map of request parameters.
 com.sas.services.session.SessionContextInterface getSessionContext()
          Returns the session context for this class.
static com.sas.services.session.SessionContextInterface getSessionContext(String sessionKey)
          Gets the session context for the specified sessionKey.
static com.sas.services.session.SessionContextInterface getSessionContext(String sessionKey, boolean useRemoteServices)
          Deprecated.  
static com.sas.services.session.SessionContextInterface getSessionContext(com.sas.services.user.UserContextInterface user, String sessionKey, boolean useRemoteServices)
          Gets the session context for the specified sessionKey.
 String getSessionId()
          Returns the session id for this class.
 String getSessionRequestId()
          Returns the request parameters id.
 String getStartURL()
          Returns the starting url string before any other parameters are added.
 String getURL()
          Returns the full url based on the starting url and the parameters that were set.
 void setParamRequestAction(String requestAction)
          Sets the PFS_REQUEST_ACTION parameter.
 void setParamRequestActionmenu(RequestActionMenuData[] requestActionmenu)
          Sets the PFS_REQUEST_ACTIONMENU parameter.
 void setParamRequestAuthDomain(String authDomain)
          Sets the PFS_REQUEST_AUTH_DOMAIN parameter.
 void setParamRequestBacklabel(String requestBacklabel)
          Deprecated. Use setParamRequestBacklabelList instead.
 void setParamRequestBacklabelList(List requestBacklabelList)
          Sets the PFS_REQUEST_BACKLABEL_LIST parameter.
 void setParamRequestBackurl(String requestBackurl)
          Deprecated. Use setParamRequestBackurlList instead.
 void setParamRequestBackurlList(List requestBackurlList)
          Sets the PFS_REQUEST_BACKURL_LIST parameter.
 void setParamRequestEntity(Object requestEntity)
          Sets the PFS_REQUEST_ENTITY parameter.
 void setParamRequestEntitykey(String requestEntitykey)
          Sets the PFS_REQUEST_ENTITYKEY parameter.
 void setParamRequestLogoffurl(String requestLogoffurl)
          Sets the PFS_REQUEST_LOGOFFURL parameter.
 void setParamRequestPathUrl(String requestPathUrl)
          Sets the PFS_REQUEST_PATH_URL parameter.
 void setParamRequestSource(String requestSource)
          Sets the PFS_REQUEST_SOURCE parameter.
 void setParamRequestTimeoutBackurl(String requestBackurl)
          Sets the PFS_REQUEST_TIMEOUT_BACKURL parameter.
 void setParamRequestType(String requestType)
          Sets the PFS_REQUEST_TYPE parameter.
 void setPortletid(String portletid)
          Sets the PORTAL_PORTLETID parameter.
 void term()
          Removes the context parameters from the session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebappContextParams

public WebappContextParams(com.sas.services.session.SessionContextInterface sessionContext,
                           String url)
                    throws RemoteException
Constructs the class with the intent of populating the context parameters and then calling the getURL method to get the full URL.
Parameters:
sessionContext - The session context that is to be shared with the web application.
url - The url for the web application (before the parameters are added to it.
Throws:
RemoteException - If there is an error communicating.

WebappContextParams

public WebappContextParams(com.sas.services.user.UserContextInterface user,
                           HttpServletRequest request)
                    throws com.sas.services.InitializationException,
                           RemoteException,
                           com.sas.services.ServiceException
Constructs the class with the intent of reading the context parameters. It will use remote services to get the session context.
Parameters:
user - The identity of the caller of this method
request - The request object from the servlet that is used to retrieve the parameters from.
Throws:
RemoteException - If there is an error communicating.
com.sas.services.InitializationException - If there is an error getting a service.
com.sas.services.ServiceException - If there is an error in the service.

WebappContextParams

public WebappContextParams(com.sas.services.user.UserContextInterface user,
                           HttpServletRequest request,
                           boolean useRemoteServices)
                    throws com.sas.services.InitializationException,
                           RemoteException,
                           com.sas.services.ServiceException
Constructs the class with the intent of reading the context parameters.
Parameters:
user - Identity of the user making this call
request - The request object from the servlet that is used to retrieve the parameters from.
useRemoteServices - true if remote services should be used to retreive the session context, false otherwise.
Throws:
RemoteException - If there is an error communicating.
com.sas.services.InitializationException - If there is an error getting a service.
com.sas.services.ServiceException - If there is an error in the service.
Method Detail

term

public void term()
          throws RemoteException
Removes the context parameters from the session. Any parameters that need special clean-up should implement the WebappContextParamsCleanupInterface interface so that its cleanup method. NOTE: this method should only be called by the RECEIVING application (ctor with HttpServletRequest).
Throws:
RemoteException - If there is an error communicating.

getURL

public String getURL()
              throws RemoteException
Returns the full url based on the starting url and the parameters that were set.
Returns:
The full url.
Throws:
RemoteException - If there is a communications error.

getSessionContext

public com.sas.services.session.SessionContextInterface getSessionContext()
Returns the session context for this class. It can return null if the session id was not set in the http request.
Returns:
The session context for this class.

getSessionId

public String getSessionId()
Returns the session id for this class. It can return null if the session id was not set in the http request.
Returns:
The session id for this class.

getStartURL

public String getStartURL()
Returns the starting url string before any other parameters are added.
Parameters:
The - starting url string.

getRequestParams

public Map getRequestParams()
Returns the map of request parameters. It can return null if the session request id was not specified in the http request or there were no parameters added.
Returns:
The map of request parameters.

getSessionRequestId

public String getSessionRequestId()
Returns the request parameters id. It can return null if the session request id was not specified in the http request or there were no parameters added.
Returns:
The request parameters id.

getPortletid

public String getPortletid()
Returns the PORTAL_PORTLETID parameter.
Returns:
The PORTAL_PORTLETID.

getParamRequestType

public String getParamRequestType()
Gets the PFS_REQUEST_TYPE parameter.
Returns:
The PFS_REQUEST_TYPE parameter.

getParamRequestSource

public String getParamRequestSource()
Gets the PFS_REQUEST_SOURCE parameter.
Returns:
The PFS_REQUEST_SOURCE parameter.

getParamRequestAction

public String getParamRequestAction()
Gets the PFS_REQUEST_ACTION parameter.
Returns:
The PFS_REQUEST_ACTION parameter.

getParamRequestEntity

public Object getParamRequestEntity()
Gets the PFS_REQUEST_ENTITY parameter.
Returns:
The PFS_REQUEST_ENTITY parameter.

getParamRequestEntitykey

public String getParamRequestEntitykey()
Gets the PFS_REQUEST_ENTITYKEY parameter.
Returns:
The PFS_REQUEST_ENTITYKEY parameter.

getParamRequestPathUrl

public String getParamRequestPathUrl()
Gets the PFS_REQUEST_PATH_URL parameter.
Returns:
The PFS_REQUEST_PATH_URL parameter.

getParamRequestActionmenu

public RequestActionMenuData[] getParamRequestActionmenu()
Gets the PFS_REQUEST_ACTIONMENU parameter.
Returns:
The PFS_REQUEST_ACTIONMENU parameter.

getParamRequestBackurl

public String getParamRequestBackurl()
Deprecated. Use getParamRequestBackurlList instead.

Gets the PFS_REQUEST_BACKURL parameter.
Returns:
The PFS_REQUEST_BACKURL parameter.

getParamRequestTimeoutBackurl

public String getParamRequestTimeoutBackurl()
The location to return to if the webapp times out.
Returns:
String The PFS_REQUEST_TIMEOUT_BACKURL parameter.

getParamRequestBacklabel

public String getParamRequestBacklabel()
Deprecated. Use getParamRequestBacklabelList instead.

Gets the PFS_REQUEST_BACKLABEL parameter.
Returns:
The PFS_REQUEST_BACKLABEL parameter.

getParamRequestBackurlList

public List getParamRequestBackurlList()
Gets the PFS_REQUEST_BACKURL_LIST parameter.
Returns:
The PFS_REQUEST_BACKURL_LIST parameter.

getParamRequestBacklabelList

public List getParamRequestBacklabelList()
Gets the PFS_REQUEST_BACKLABEL_LIST parameter.
Returns:
The PFS_REQUEST_BACKLABEL_LIST parameter.

getParamRequestLogoffurl

public String getParamRequestLogoffurl()
Gets the PFS_REQUEST_LOGOFFURL parameter.
Returns:
The PFS_REQUEST_LOGOFFURL parameter.

getParamRequestAuthDomain

public String getParamRequestAuthDomain()
Gets the PFS_REQUEST_AUTH_DOMAIN parameter.
Returns:
The PFS_REQUEST_AUTH_DOMAIN parameter.

setPortletid

public void setPortletid(String portletid)
Sets the PORTAL_PORTLETID parameter.
Parameters:
The - value to add to the PORTAL_PORTLETID key.

setParamRequestType

public void setParamRequestType(String requestType)
                         throws RemoteException
Sets the PFS_REQUEST_TYPE parameter.
Parameters:
The - value to add to the PFS_REQUEST_TYPE key.
Throws:
RemoteException - If there is an error creating the parameters map.

setParamRequestSource

public void setParamRequestSource(String requestSource)
                           throws RemoteException
Sets the PFS_REQUEST_SOURCE parameter.
Parameters:
The - value to add to the PFS_REQUEST_SOURCE key.
Throws:
RemoteException - If there is an error creating the parameters map.

setParamRequestAction

public void setParamRequestAction(String requestAction)
                           throws RemoteException
Sets the PFS_REQUEST_ACTION parameter.
Parameters:
The - value to add to the PFS_REQUEST_ACTION key.
Throws:
RemoteException - If there is an error creating the parameters map.

setParamRequestEntity

public void setParamRequestEntity(Object requestEntity)
                           throws RemoteException
Sets the PFS_REQUEST_ENTITY parameter.
Parameters:
The - value to add to the PFS_REQUEST_ENTITY key.
Throws:
RemoteException - If there is an error creating the parameters map.

setParamRequestEntitykey

public void setParamRequestEntitykey(String requestEntitykey)
                              throws RemoteException
Sets the PFS_REQUEST_ENTITYKEY parameter.
Parameters:
The - value to add to the PFS_REQUEST_ENTITYKEY key.
Throws:
RemoteException - If there is an error creating the parameters map.

setParamRequestPathUrl

public void setParamRequestPathUrl(String requestPathUrl)
                            throws RemoteException
Sets the PFS_REQUEST_PATH_URL parameter.
Parameters:
The - value to add to the PFS_REQUEST_PATH_URL key.
Throws:
RemoteException - If there is an error creating the parameters map.

setParamRequestActionmenu

public void setParamRequestActionmenu(RequestActionMenuData[] requestActionmenu)
                               throws RemoteException
Sets the PFS_REQUEST_ACTIONMENU parameter.
Parameters:
The - value to add to the PFS_REQUEST_ACTIONMENU key.
Throws:
RemoteException - If there is an error creating the parameters map.

setParamRequestBackurl

public void setParamRequestBackurl(String requestBackurl)
                            throws RemoteException
Deprecated. Use setParamRequestBackurlList instead.

Sets the PFS_REQUEST_BACKURL parameter.
Parameters:
The - value to add to the PFS_REQUEST_BACKURL key.
Throws:
RemoteException - If there is an error creating the parameters map.

setParamRequestTimeoutBackurl

public void setParamRequestTimeoutBackurl(String requestBackurl)
                                   throws RemoteException
Sets the PFS_REQUEST_TIMEOUT_BACKURL parameter.
Parameters:
The - value to add to the PFS_REQUEST_TIMEOUT_BACKURL key.
Throws:
RemoteException - If there is an error creating the parameters map.

setParamRequestBacklabel

public void setParamRequestBacklabel(String requestBacklabel)
                              throws RemoteException
Deprecated. Use setParamRequestBacklabelList instead.

Sets the PFS_REQUEST_BACKLABEL parameter.
Parameters:
The - value to add to the PFS_REQUEST_BACKLABEL key.
Throws:
RemoteException - If there is an error creating the parameters map.

setParamRequestBackurlList

public void setParamRequestBackurlList(List requestBackurlList)
                                throws RemoteException
Sets the PFS_REQUEST_BACKURL_LIST parameter.
Parameters:
The - value to add to the PFS_REQUEST_BACKURL_LIST key.
Throws:
RemoteException - If there is an error creating the parameters map.

setParamRequestBacklabelList

public void setParamRequestBacklabelList(List requestBacklabelList)
                                  throws RemoteException
Sets the PFS_REQUEST_BACKLABEL_LIST parameter.
Parameters:
The - value to add to the PFS_REQUEST_BACKLABEL_LIST key.
Throws:
RemoteException - If there is an error creating the parameters map.

setParamRequestLogoffurl

public void setParamRequestLogoffurl(String requestLogoffurl)
                              throws RemoteException
Sets the PFS_REQUEST_LOGOFFURL parameter.
Parameters:
The - value to add to the PFS_REQUEST_LOGOFFURL key.
Throws:
RemoteException - If there is an error creating the parameters map.

setParamRequestAuthDomain

public void setParamRequestAuthDomain(String authDomain)
                               throws RemoteException
Sets the PFS_REQUEST_AUTH_DOMAIN parameter.
Parameters:
The - value to add to the PFS_REQUEST_AUTH_DOMAIN key.
Throws:
RemoteException - If there is an error creating the parameters map.

getSessionContext

public static com.sas.services.session.SessionContextInterface getSessionContext(String sessionKey)
                                                                          throws com.sas.services.InitializationException,
                                                                                 RemoteException,
                                                                                 com.sas.services.ServiceException
Gets the session context for the specified sessionKey. It will use remote services to get the session context.
Parameters:
sessionKey - The session key that specifies the session context.
Returns:
The session context.

getSessionContext

public static com.sas.services.session.SessionContextInterface getSessionContext(String sessionKey,
                                                                                 boolean useRemoteServices)
                                                                          throws com.sas.services.InitializationException,
                                                                                 RemoteException,
                                                                                 com.sas.services.ServiceException
Deprecated.  

Gets the session context for the specified sessionKey.
Parameters:
sessionKey - The session key that specifies the session context.
useRemoteServices - true if remote services should be used to retreive the session context, false otherwise.
Returns:
The session context.

getSessionContext

public static com.sas.services.session.SessionContextInterface getSessionContext(com.sas.services.user.UserContextInterface user,
                                                                                 String sessionKey,
                                                                                 boolean useRemoteServices)
                                                                          throws com.sas.services.InitializationException,
                                                                                 RemoteException,
                                                                                 com.sas.services.ServiceException
Gets the session context for the specified sessionKey.
Parameters:
user - The user calling the method
sessionKey - The session key that specifies the session context.
useRemoteServices - true if remote services should be used to retreive the session context, false otherwise.
Returns:
The session context.

cleanSessionParams

public static void cleanSessionParams(com.sas.services.session.SessionContextInterface sessionContext,
                                      String sessionRequestId)
                               throws RemoteException
Removes the context parameters from the session. Any parameters that need special clean-up should implement the WebappContextParamsCleanupInterface interface so that its cleanup method. NOTE: this method should only be called by the RECEIVING application.
Parameters:
sessionContext - The session context that holds the context parameters.
sessionRequestId - The id of the context parameters within the session context.
Throws:
RemoteException - If there is an error communicating.

***  This class is subject to change   ***




Copyright © 2005 SAS Institute Inc. All Rights Reserved.
javadoc generated Fri, 10 Feb 2006 17:05:13