org.kuali.rice.krad.uif.view
Class ViewSessionPolicy

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.uif.view.ViewSessionPolicy
All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean

public class ViewSessionPolicy
extends DictionaryBeanBase
implements Serializable

Holds configuration related to session handling of a view (and its related form)

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:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode
 
Constructor Summary
ViewSessionPolicy()
           
 
Method Summary
 String getRedirectUrl()
          URL the user should be redirected to when a session timeout occurs
 int getTimeoutWarningSeconds()
          When isEnableTimeoutWarning() is true, the number of seconds before a timeout occurs to give a warning (default is 120 (2 minutes))
 boolean isEnableTimeoutWarning()
          Enables the session timeout warning dialog and timeout dialog for the view
 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')
 boolean isRenderTimeoutView()
          Indicates the user should be shown the timeout message view when a session timeout occurs
 void setEnableTimeoutWarning(boolean enableTimeoutWarning)
          Setter for enabling the session timeout warning dialog
 void setRedirectToHome(boolean redirectToHome)
          Setter for indicating whether the user should be redirected to the home URL on session timeout
 void setRedirectUrl(String redirectUrl)
          Setter for the URL to redirect the user to when a session timeout occurs
 void setRenderTimeoutView(boolean renderTimeoutView)
          Setter to indicate the timeout view should be shown on session timeout
 void setTimeoutWarningSeconds(int timeoutWarningSeconds)
          Setter for the number of seconds before timeout to give a warning dialog
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, preventModification, setComponentCode, setNamespaceCode, unwrap
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewSessionPolicy

public ViewSessionPolicy()
Method Detail

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

public String getRedirectUrl()
URL the user should be redirected to when a session timeout occurs

Returns:
url to redirect user to

setRedirectUrl

public void setRedirectUrl(String redirectUrl)
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 view

When 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_DIALOG and ComponentFactory.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()
When isEnableTimeoutWarning() 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 -


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.