Class SessionContinuityInterceptor

java.lang.Object
formflow.library.interceptors.SessionContinuityInterceptor
All Implemented Interfaces:
org.springframework.core.Ordered, org.springframework.web.servlet.HandlerInterceptor

@Component @ConditionalOnProperty(name="form-flow.session-continuity-interceptor.enabled", havingValue="true") public class SessionContinuityInterceptor extends Object implements org.springframework.web.servlet.HandlerInterceptor, org.springframework.core.Ordered
This interceptor prevents users from jumping to random pages in a flow.
  • Field Details

  • Constructor Details

    • SessionContinuityInterceptor

      public SessionContinuityInterceptor(List<FlowConfiguration> flowConfigurations)
  • Method Details

    • preHandle

      public boolean preHandle(jakarta.servlet.http.HttpServletRequest request, @NotNull @NotNull jakarta.servlet.http.HttpServletResponse response, @NotNull @NotNull Object handler) throws IOException, LandmarkNotSetException
      Specified by:
      preHandle in interface org.springframework.web.servlet.HandlerInterceptor
      Parameters:
      request - current HTTP request
      response - current HTTP response
      handler - chosen handler to execute, for type and/or instance evaluation
      Returns:
      Boolean True - allows the request to proceed to the ScreenController, False - stops the request from reaching the Screen Controller.
      Throws:
      IOException - - thrown in the event that an input or output exception occurs when this method does a redirect.
      LandmarkNotSetException - - thrown in the event that a landmark(s) screen is misconfigured
    • getOrder

      public int getOrder()
      Sets the value of the interceptor to the highest integer value making it the last interceptor executed.
      Specified by:
      getOrder in interface org.springframework.core.Ordered
      Returns:
      Max Integer value.