com.plumtree.uiinfrastructure.interpreter
Class RequestData

java.lang.Object
  extended by com.plumtree.uiinfrastructure.interpreter.RequestData

public class RequestData
extends java.lang.Object

Helper class for managing the request data for the Interpreter.

Author:
Don Hayler

Field Summary
 IApplication m_Application
          application
 AActivitySpace m_asSpace
          Activity Space
 boolean m_bClearSession
          whether or not to clear the session after this request has finished.
 boolean m_bGetCacheNoID
          whether or not to get the item from the cache without knowing its ID
 boolean m_bGuest
          whether or not the current user is a guest user
 IDisplayPage m_dpNextDisplay
          display page
 int m_nSSOState
          SSO state
 java.lang.String m_sControl
          Control name
 java.lang.String m_sDevicesSpaceNameSuffix
          optional _WML, etc...
 ISessionManager m_SessionManager
          base session manager
 ISessionManager m_smCache
          Activity Space Cache
 ISessionManager m_smPersistentSandbox
          persistent sandbox session manager
 ISessionManager m_smPersonalSettings
          personal settings session manager
 ISessionManager m_smSandbox
          sandbox session manager
 java.lang.String m_sPage
          display page name
 java.lang.String m_sParentID
          parent space ID
 java.lang.String m_sParentName
          parent space name
 java.lang.String m_sSpaceID
          space id
 java.lang.String m_sSubSpaceKey
          sub-space key
 TimeTracker m_ttTimer
          A timer used to track various events in the requests lifetime
 WebData m_wdPageData
          web data
 XPHashtable m_xpmCacheList
          list of items in the cache
 IXPRequest m_xpRequest
          request
 IXPResponse m_xpResponse
          response
 
Constructor Summary
RequestData(IXPRequest request, IXPResponse response, ISessionManager session, IApplication application)
          Creates a new RequestData object.
 
Method Summary
 java.lang.String AppendRedirectURLTo302URL(java.lang.String _sTargetSpace, java.lang.String _sURL)
          JF- Adds the redirect URL to the URL where we are about to 302 redirect to.
 void ClearUserSession()
          Removes the User Session from the top-level session and on the Request Data object.
 boolean GetHasExternalRedirect()
          Helper method that checks whether or not an external redirect has been set on this object (i.e.
 boolean GetHasHTTPRedirect()
          Helper method that checks whether or not an HTTP redirect has been set on this object (i.e.
 XPHashtable GetQueryString()
          Helper method that constructs and returns a redirect .
 Redirect GetRedirect()
          Helper method that constructs and returns a redirect.
 java.lang.String GetRedirectURLFromQS()
          JF- In security mode 1, returns the redirect URL (ASConstants.REDIRECT_AFTER_LOGIN) from the QS.
 java.lang.String GetRequestFullURL()
          Returns the request full URL.
 java.lang.String GetRequestURL()
          Returns the request URL.
 java.lang.String GetRootSpaceName()
          Accessor method for the root space name (without devices suffix).
 java.lang.String GetSpaceName()
          Accessor method for the full space name (including devices suffix, if applicable).
 java.lang.Object GetUserSession()
          Gets the IPTSession from the Request Data object (originally off the top-level session).
 void LoadQSSettings()
          This method loads various settings from the query string.
 boolean RedirectWithMetaRefresh(java.lang.String _sRedirectURL)
          JF- We need to do a meta refresh instead of a 302 redirect if we are going from https to http in order to not see the browser security alert "You are about to be redirected to a connection that is not secure".
 void SetRedirect(Redirect newRedirect)
          Helper method that sets request data based on a redirect
 void SetRequestFullURL(java.lang.String sRequestFullURL)
          Sets the request full URL.
 void SetRequestURL(java.lang.String sRequestURL)
          Sets the request URL.
 void SetSpaceName(java.lang.String strName)
          This helper method sets the root space name and the real space name based upon the optional devices space name suffix (_WML, etc...).
 void SetUserSession(java.lang.Object oUserSession)
          sets the IPTSession on the top-level session and on the Request Data object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_asSpace

public AActivitySpace m_asSpace
Activity Space


m_Application

public IApplication m_Application
application


m_dpNextDisplay

public IDisplayPage m_dpNextDisplay
display page


m_SessionManager

public ISessionManager m_SessionManager
base session manager


m_smCache

public ISessionManager m_smCache
Activity Space Cache


m_smPersonalSettings

public ISessionManager m_smPersonalSettings
personal settings session manager


m_smSandbox

public ISessionManager m_smSandbox
sandbox session manager


m_smPersistentSandbox

public ISessionManager m_smPersistentSandbox
persistent sandbox session manager


m_xpRequest

public IXPRequest m_xpRequest
request


m_xpResponse

public IXPResponse m_xpResponse
response


m_sControl

public java.lang.String m_sControl
Control name


m_sDevicesSpaceNameSuffix

public java.lang.String m_sDevicesSpaceNameSuffix
optional _WML, etc... devices suffix


m_sPage

public java.lang.String m_sPage
display page name


m_sParentID

public java.lang.String m_sParentID
parent space ID


m_sParentName

public java.lang.String m_sParentName
parent space name


m_sSpaceID

public java.lang.String m_sSpaceID
space id


m_sSubSpaceKey

public java.lang.String m_sSubSpaceKey
sub-space key


m_wdPageData

public WebData m_wdPageData
web data


m_xpmCacheList

public XPHashtable m_xpmCacheList
list of items in the cache


m_bGetCacheNoID

public boolean m_bGetCacheNoID
whether or not to get the item from the cache without knowing its ID


m_bClearSession

public boolean m_bClearSession
whether or not to clear the session after this request has finished.


m_bGuest

public boolean m_bGuest
whether or not the current user is a guest user


m_nSSOState

public int m_nSSOState
SSO state


m_ttTimer

public TimeTracker m_ttTimer
A timer used to track various events in the requests lifetime

Constructor Detail

RequestData

public RequestData(IXPRequest request,
                   IXPResponse response,
                   ISessionManager session,
                   IApplication application)
Creates a new RequestData object.

Parameters:
request -
response -
session -
application -
Method Detail

GetRootSpaceName

public java.lang.String GetRootSpaceName()
Accessor method for the root space name (without devices suffix).

Returns:
String the root space name.

GetSpaceName

public java.lang.String GetSpaceName()
Accessor method for the full space name (including devices suffix, if applicable).

Returns:
String the full space name.

GetQueryString

public XPHashtable GetQueryString()
Helper method that constructs and returns a redirect .

Returns:
String the full space name.

GetHasExternalRedirect

public boolean GetHasExternalRedirect()
Helper method that checks whether or not an external redirect has been set on this object (i.e. "http://www.mysite.com").

Returns:
boolean true implies there is an external redirect.

GetHasHTTPRedirect

public boolean GetHasHTTPRedirect()
Helper method that checks whether or not an HTTP redirect has been set on this object (i.e. Redirect.SetIsHTTPRedirect(true)).

Returns:
boolean true implies there is an external redirect.

GetRedirect

public Redirect GetRedirect()
Helper method that constructs and returns a redirect.

Returns:
String the full space name.

GetRedirectURLFromQS

public java.lang.String GetRedirectURLFromQS()
JF- In security mode 1, returns the redirect URL (ASConstants.REDIRECT_AFTER_LOGIN) from the QS. (Returns null if it was not there.)

Returns:
String

SetRedirect

public void SetRedirect(Redirect newRedirect)
Helper method that sets request data based on a redirect

Parameters:
Redirect -

AppendRedirectURLTo302URL

public java.lang.String AppendRedirectURLTo302URL(java.lang.String _sTargetSpace,
                                                  java.lang.String _sURL)
JF- Adds the redirect URL to the URL where we are about to 302 redirect to. (only appends the redirect URL if we are in security mode 1 and if we are redirecting to the login space)

Parameters:
_sTargetSpace - - Space where we are 302 redirecting to.
_sURL - - URL to append the redirect to (if it's not needed, the url will be returned unchanged)
Returns:
String

RedirectWithMetaRefresh

public boolean RedirectWithMetaRefresh(java.lang.String _sRedirectURL)
JF- We need to do a meta refresh instead of a 302 redirect if we are going from https to http in order to not see the browser security alert "You are about to be redirected to a connection that is not secure".

Parameters:
_sRedirectURL -
Returns:
boolean

LoadQSSettings

public void LoadQSSettings()
This method loads various settings from the query string. If the query string parameters contain potential cross-site scripting attacks, this will throw an XPException.


SetSpaceName

public void SetSpaceName(java.lang.String strName)
This helper method sets the root space name and the real space name based upon the optional devices space name suffix (_WML, etc...). This should be used to avoid breaking the devices scheme.

Parameters:
String - strName the root name of the new space

GetRequestURL

public java.lang.String GetRequestURL()
Returns the request URL. This method is used in login code instead of m_xpRequest.GetRequestURL() so the SSO login code can make it look like the request came to server.pt instead of ssologin.pt.

Returns:
the request URL

SetRequestURL

public void SetRequestURL(java.lang.String sRequestURL)
Sets the request URL. This method is used by SSO login code to make it look like the request came to server.pt instead of ssologin.pt.

Parameters:
sRequestURL - the request url

GetRequestFullURL

public java.lang.String GetRequestFullURL()
Returns the request full URL. This method is used to avoid having to recalculate this URL, since the call to URLDecode is fairly expensive. This method calculates this value if it has not already been set on the RequestData object.

Returns:
the request full URL

SetRequestFullURL

public void SetRequestFullURL(java.lang.String sRequestFullURL)
Sets the request full URL. This method is used to avoid having to recalculate this URL, since the call to URLDecode is fairly expensive.

Parameters:
sRequestFullURL - the request full url

GetUserSession

public java.lang.Object GetUserSession()
Gets the IPTSession from the Request Data object (originally off the top-level session).

Returns:
IPTSession

SetUserSession

public void SetUserSession(java.lang.Object oUserSession)
sets the IPTSession on the top-level session and on the Request Data object.

Parameters:
User - Session Object

ClearUserSession

public void ClearUserSession()
Removes the User Session from the top-level session and on the Request Data object.




Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.