Class ViewSessionPolicy
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean
The framework will keep track of the session for which a view is rendered in. When a request such as a post is made, the session id for the view will be compared against the current session. If different, or no session exists, a timeout will be assumed and the framework will take the action configured on this policy
If none of the options are set here, the framework will allow a request after a timeout to go uninterrupted
Notes carrying out the configured view session policy requires the filter
UifSessionTimeoutFilter to be configured first in the list of filters
for the servlet
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionURL the user should be redirected to when a session timeout occursintWhenisEnableTimeoutWarning()is true, the number of seconds before a timeout occurs to give a warning (default is 120 (2 minutes))booleanEnables the session timeout warning dialog and timeout dialog for the viewbooleanIndicates when a session timeout occurs the user should be redirect to the application home url (determined by the configuration parameter 'application.url')booleanIndicates the user should be shown the timeout message view when a session timeout occursvoidsetEnableTimeoutWarning(boolean enableTimeoutWarning) Setter for enabling the session timeout warning dialogvoidsetRedirectToHome(boolean redirectToHome) Setter for indicating whether the user should be redirected to the home URL on session timeoutvoidsetRedirectUrl(String redirectUrl) Setter for the URL to redirect the user to when a session timeout occursvoidsetRenderTimeoutView(boolean renderTimeoutView) Setter to indicate the timeout view should be shown on session timeoutvoidsetTimeoutWarningSeconds(int timeoutWarningSeconds) Setter for the number of seconds before timeout to give a warning dialogMethods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
-
Constructor Details
-
ViewSessionPolicy
public ViewSessionPolicy()
-
-
Method Details
-
isRedirectToHome
public boolean isRedirectToHome()Indicates when a session timeout occurs the user should be redirect to the application home url (determined by the configuration parameter 'application.url')- Returns:
- true if the user should be redirected to the home URL
-
setRedirectToHome
public void setRedirectToHome(boolean redirectToHome) Setter for indicating whether the user should be redirected to the home URL on session timeout- Parameters:
redirectToHome-
-
getRedirectUrl
URL the user should be redirected to when a session timeout occurs- Returns:
- url to redirect user to
-
setRedirectUrl
Setter for the URL to redirect the user to when a session timeout occurs- Parameters:
redirectUrl-
-
isRenderTimeoutView
public boolean isRenderTimeoutView()Indicates the user should be shown the timeout message view when a session timeout occurs- Returns:
- true if the timeout view should be shown on session timeout
-
setRenderTimeoutView
public void setRenderTimeoutView(boolean renderTimeoutView) Setter to indicate the timeout view should be shown on session timeout- Parameters:
renderTimeoutView-
-
isEnableTimeoutWarning
public boolean isEnableTimeoutWarning()Enables the session timeout warning dialog and timeout dialog for the viewWhen enabled, a timer will be kept on the client to warning the user when their session is about to timeout, and if the timeout actually occurs. The amount of time before a timeout to warn is specified by
getTimeoutWarningSeconds()The dialogs shown for the warning and timeout are configured by the dialog groups with ids
ComponentFactory.SESSION_TIMEOUT_WARNING_DIALOGandComponentFactory.SESSION_TIMEOUT_DIALOG- Returns:
- true if the timeout warning dialog should be enabled
-
setEnableTimeoutWarning
public void setEnableTimeoutWarning(boolean enableTimeoutWarning) Setter for enabling the session timeout warning dialog- Parameters:
enableTimeoutWarning-
-
getTimeoutWarningSeconds
public int getTimeoutWarningSeconds()WhenisEnableTimeoutWarning()is true, the number of seconds before a timeout occurs to give a warning (default is 120 (2 minutes))- Returns:
- number of seconds before timeout to give warning dialog
-
setTimeoutWarningSeconds
public void setTimeoutWarningSeconds(int timeoutWarningSeconds) Setter for the number of seconds before timeout to give a warning dialog- Parameters:
timeoutWarningSeconds-
-