com.filenet.wcm.toolkit.server.base
Class ControllerUtilities
- java.lang.Object
com.filenet.wcm.toolkit.server.base.ControllerUtilities
- public final class ControllerUtilities
- extends java.lang.Object
Nested Class Summary
| Modifier and Type | Class and Description |
|---|---|
|
ControllerUtilities.ControllerState
Controller stateful data.
|
|
ControllerUtilities.PropertiesMap
Properties submaps for different high-level scopings.
|
|
ControllerUtilities.WindowIdInfo
WindowIdInfo objects are stored in the windowIdMap of the controller to help
in expiring windowId's throughout the course of the user session.
|
|
ControllerUtilities.WindowIDManager
WindowIDManager takes care of aging out window ID's that have not been accessed
for longer than a defined timeout limit.
|
|
ControllerUtilities.WindowState
Window stateful data
|
Field Summary
| Modifier and Type | Field and Description |
|---|---|
|
CLEAN_INLINE_TIMEOUT
|
|
DEBUG_CLEANUP
|
|
DEBUG_TRACE_KEY
|
|
ENABLE_CLEANUP_SETTINGS
|
|
ERROR_TRACE_KEY
|
|
POPUP_TIMEOUT
|
|
RESOURCE_TRACE_KEY
|
|
SECURE_AUTNENTICATION_PARAMETERS
|
|
staticsInitialized
|
|
UI_ROOT_KEY
|
|
WINDOW_ID_COMPATIBILITY
|
Constructor Summary
| Constructor and Description |
|---|
ControllerUtilities()
|
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
getControllerState(WcmController controller)
Get the controller state...
|
|
getInitParameter(WcmController controller,java.lang.String key)
|
|
getInitParameter(WcmController controller,java.lang.String key,boolean defaultValue)
|
|
getInitParameter(WcmController controller,java.lang.String key,long defaultValue)
|
|
getInitParameter(WcmController controller,java.lang.String key,java.lang.String defaultValue)
|
|
getInitParameterBoolean(WcmController controller,java.lang.String key)
|
|
getInitParameterBoolean(WcmController controller,java.lang.String key,boolean defaultValue)
|
|
getPropertiesMap(java.lang.String key,WcmDataStore parentMap)
Get a singleton properties map for the key.
|
|
getRemoveSessionId(WcmController controller)
|
|
getResourceTrace(WcmController controller)
|
|
getScopedProperty(WcmDataStore properties,java.lang.String key,java.lang.Object defaultValue,boolean setIfNotFound,boolean constructClass)
Get a property from the PropertiesMap.
|
|
getUIRoot(WcmController controller)
|
|
getWindowIDManager(WcmController controller)
|
|
getWindowMap(java.lang.String windowId,WcmController controller,boolean create,boolean verify)
Convenience method for the window map.
|
|
getWindowMap(java.lang.String windowId,WcmDataStore dataStore,boolean create)
Convenience method for the window map.
|
|
getWindowState(ControllerUtilities.PropertiesMap windowMap)
Get the window state object.
|
|
getWindowState(java.lang.String windowId,WcmDataStore dataStore,boolean create)
Get the window state via the windowMap.
|
|
releaseWindowMap(java.lang.String windowId,WcmDataStore dataStore)
|
|
sendCloseWindow(javax.servlet.http.HttpServletResponse response)
Writes some javascript to the browser telling it to close itself.
|
|
sendRedirect(javax.servlet.http.HttpServletResponse response,java.lang.String baseUrl,java.lang.String targetURL,int postThreshold)
Redirect to another page.
|
|
sendRedirectViaPOST(javax.servlet.http.HttpServletResponse response,WcmURLBuilder targetURL)
Redirect to the URL defined in targetURL by writing a form to the browser that contains hidden
fields representing each key-value in the request string, followed by JavaScript that submits
it.
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail
UI_ROOT_KEY
- public static java.lang.String UI_ROOT_KEY
RESOURCE_TRACE_KEY
- public static java.lang.String RESOURCE_TRACE_KEY
DEBUG_TRACE_KEY
- public static java.lang.String DEBUG_TRACE_KEY
ERROR_TRACE_KEY
- public static java.lang.String ERROR_TRACE_KEY
WINDOW_ID_COMPATIBILITY
- public static java.lang.String WINDOW_ID_COMPATIBILITY
SECURE_AUTNENTICATION_PARAMETERS
- public static final java.lang.String SECURE_AUTNENTICATION_PARAMETERS
See Also:
staticsInitialized
- public static boolean staticsInitialized
ENABLE_CLEANUP_SETTINGS
- public static boolean ENABLE_CLEANUP_SETTINGS
POPUP_TIMEOUT
- public static long POPUP_TIMEOUT
CLEAN_INLINE_TIMEOUT
- public static long CLEAN_INLINE_TIMEOUT
DEBUG_CLEANUP
- public static boolean DEBUG_CLEANUP
Constructor Detail
ControllerUtilities
- public ControllerUtilities()
Method Detail
sendRedirect
- public static boolean sendRedirect( javax.servlet.http.HttpServletResponse response,
- java.lang.String baseUrl,
- java.lang.String targetURL,
- int postThreshold)
- throws java.io.IOException
Redirect to another page. This is typically accomplished via response.sendRedirect().
In the case of redirection to the getContent servlet, the redirect is done via a Refresh
meta tag written out in the response. This is a workaround for a bug found in IE5.
When postThreshold is specified as a non-zero positive int value, and the length of
targetURL is greater than this value, the redirect is done via a form with hidden
fields that is written to the browser and posted via JavaScript.
Parameters:
response - baseUrl - targetURL - postThreshold - Specify the post threshold. If 0 or less is specified, this method will never redirect via POST. Returns:
Whether or not the redirect was accomplished.
Throws:
java.io.IOExceptionsendRedirectViaPOST
- public static boolean sendRedirectViaPOST( javax.servlet.http.HttpServletResponse response,
- WcmURLBuilder targetURL)
- throws java.io.IOException
Redirect to the URL defined in targetURL by writing a form to the browser that contains hidden
fields representing each key-value in the request string, followed by JavaScript that submits
it.
Parameters:
response - targetURL - Returns:
Throws:
java.io.IOExceptionsendCloseWindow
- public static boolean sendCloseWindow( javax.servlet.http.HttpServletResponse response)
- throws java.io.IOException
Writes some javascript to the browser telling it to close itself.
Throws:
java.io.IOExceptiongetInitParameter
- public static java.lang.String getInitParameter( WcmController controller,
- java.lang.String key)
getInitParameter
- public static java.lang.String getInitParameter( WcmController controller,
- java.lang.String key,
- java.lang.String defaultValue)
getInitParameter
- public static boolean getInitParameter( WcmController controller,
- java.lang.String key,
- boolean defaultValue)
getInitParameter
- public static long getInitParameter( WcmController controller,
- java.lang.String key,
- long defaultValue)
getInitParameterBoolean
- public static boolean getInitParameterBoolean( WcmController controller,
- java.lang.String key)
getInitParameterBoolean
- public static boolean getInitParameterBoolean( WcmController controller,
- java.lang.String key,
- boolean defaultValue)
getRemoveSessionId
- public static boolean getRemoveSessionId( WcmController controller)
getUIRoot
- public static java.lang.String getUIRoot( WcmController controller)
getResourceTrace
- public static int getResourceTrace( WcmController controller)
getWindowIDManager
- protected static ControllerUtilities.WindowIDManager getWindowIDManager( WcmController controller)
- throws WcmException
Throws:
getWindowState
- protected static ControllerUtilities.WindowState getWindowState( java.lang.String windowId,
- WcmDataStore dataStore,
- boolean create)
- throws WcmException
Get the window state via the windowMap.
getWindowState
- protected static ControllerUtilities.WindowState getWindowState( ControllerUtilities.PropertiesMap windowMap)
- throws WcmException
Get the window state object.
getControllerState
- protected static ControllerUtilities.ControllerState getControllerState( WcmController controller)
- throws WcmException
Get the controller state...
getPropertiesMap
- protected static ControllerUtilities.PropertiesMap getPropertiesMap( java.lang.String key,
- WcmDataStore parentMap)
- throws java.lang.Exception
Get a singleton properties map for the key. Create it if it does not exist.
Parameters:
key - parentMap - This can either be the main dataStore instance or a PropertiesMap instance. Returns:
Throws:
java.lang.ExceptiongetWindowMap
- protected static ControllerUtilities.PropertiesMap getWindowMap( java.lang.String windowId,
- WcmController controller,
- boolean create,
- boolean verify)
- throws FrameworkException
- WcmException
Convenience method for the window map. Optionally verifies that the windowId specified has not expired.
Parameters:
windowId - controller - create - - Set to true to create the windowId map if it does not already exist. verify - - Set to true to verify that the windowId has not expired. Returns:
Throws:
getWindowMap
- protected static ControllerUtilities.PropertiesMap getWindowMap( java.lang.String windowId,
- WcmDataStore dataStore,
- boolean create)
- throws WcmException
Convenience method for the window map.
releaseWindowMap
- protected static boolean releaseWindowMap( java.lang.String windowId,
- WcmDataStore dataStore)
getScopedProperty
- protected static java.lang.Object getScopedProperty( WcmDataStore properties,
- java.lang.String key,
- java.lang.Object defaultValue,
- boolean setIfNotFound,
- boolean constructClass)
- throws java.lang.Exception
Get a property from the PropertiesMap. Provides parameters to help in auto-creation.
Parameters:
properties - key - defaultValue - setIfNotFound - constructClass - Returns:
Throws:
java.lang.Exception