public class WindowManagerContext extends Object
Utility for programmatically manage the rich window manager's configuration values.
For example:ExternalContext extContext = FacesContext.getCurrentInstance().getExternalContext(); RequestContext rc = RequestContext.getCurrentInstance(); WindowManagerContext wmContext = new WindowManagerContext(rc.getWindowManager()); wmContext.setMaxWindowCacheSize(extContext, 100);
| Constructor and Description |
|---|
WindowManagerContext(org.apache.myfaces.trinidad.context.WindowManager wm) |
| Modifier and Type | Method and Description |
|---|---|
int |
getLastWindowSessionTimeoutInterval(javax.faces.context.ExternalContext extContext)
Returns the session timeout in seconds applied when the last window moves to an unloaded state.
|
int |
getMaxWindowCacheSize(javax.faces.context.ExternalContext extContext)
Returns the maximum number of windows can be in session cache.
|
int |
getUnloadedWindowCloseTimeoutInterval(javax.faces.context.ExternalContext extContext)
Returns the number of seconds before an unloaded window will implicitly transition to a closed state.
|
void |
setLastWindowSessionTimeoutInterval(javax.faces.context.ExternalContext extContext,
int timeout)
Sets the session timeout in seconds applied when the last window moves to an unloaded state.
|
void |
setMaxWindowCacheSize(javax.faces.context.ExternalContext extContext,
int maxSize)
Sets the maximum number of windows can be in session cache.
|
void |
setUnloadedWindowCloseTimeoutInterval(javax.faces.context.ExternalContext extContext,
int timeout)
Sets the number of seconds before an unloaded window will implicitly transition to a closed state.
|
public WindowManagerContext(org.apache.myfaces.trinidad.context.WindowManager wm)
public int getLastWindowSessionTimeoutInterval(javax.faces.context.ExternalContext extContext)
setMaxInactiveInterval
of the active session. The default value is -1, indicating the feature is disabled.
This interval can also be configured using a web deployment descriptor context-param. The
value can be set via the LAST_WINDOW_SESSION_TIMEOUT context-param in the web.xml
of the web application.
extContext - ExternalContextsetLastWindowSessionTimeoutInterval(javax.faces.context.ExternalContext, int)public void setLastWindowSessionTimeoutInterval(javax.faces.context.ExternalContext extContext,
int timeout)
setMaxInactiveInterval
of the active session. The default value is -1, indicating the feature is disabled.
The default can also be configured using a web deployment descriptor context-param. The
value can be set via the LAST_WINDOW_SESSION_TIMEOUT context-param in the web.xml
of the web application. The value set from this API will override any value specified using
a context-paramenter.extContext - ExternalContexttimeout - interval in secondsgetLastWindowSessionTimeoutInterval(javax.faces.context.ExternalContext)public int getUnloadedWindowCloseTimeoutInterval(javax.faces.context.ExternalContext extContext)
This interval can also be configured via the UNLOADED_WINDOW_CLOSE_TIMEOUTweb deployment
descriptor context-param.
extContext - ExternalContextsetUnloadedWindowCloseTimeoutInterval(javax.faces.context.ExternalContext, int)public void setUnloadedWindowCloseTimeoutInterval(javax.faces.context.ExternalContext extContext,
int timeout)
The default can also be configured via the UNLOADED_WINDOW_CLOSE_TIMEOUTweb deployment
descriptor context-param. Setting the value from this API will override any value configured via a
context-param
extContext - ExternalContexttimeout - interval in secondsgetUnloadedWindowCloseTimeoutInterval(javax.faces.context.ExternalContext)public int getMaxWindowCacheSize(javax.faces.context.ExternalContext extContext)
MAX_WINDOW_CACHE_SIZE context-param in the web deployment descriptor.extContext - ExternalContextsetMaxWindowCacheSize(javax.faces.context.ExternalContext, int)public void setMaxWindowCacheSize(javax.faces.context.ExternalContext extContext,
int maxSize)
MAX_WINDOW_CACHE_SIZE context-param in the web deployment descriptor.extContext - ExternalContextmaxSize - of the window session cachegetMaxWindowCacheSize(javax.faces.context.ExternalContext)