Class ViewSessionPolicy

All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, UifDictionaryBean

public class ViewSessionPolicy extends UifDictionaryBeanBase 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:
  • 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

      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 -