Package formflow.library.interceptors
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 Summary
FieldsFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()Sets the value of the interceptor to the highest integer value making it the last interceptor executed.booleanpreHandle(jakarta.servlet.http.HttpServletRequest request, @NotNull jakarta.servlet.http.HttpServletResponse response, @NotNull Object handler) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.servlet.HandlerInterceptor
afterCompletion, postHandle
-
Field Details
-
FLOW_PATH_FORMAT
- See Also:
-
NAVIGATION_FLOW_PATH_FORMAT
- See Also:
-
-
Constructor Details
-
SessionContinuityInterceptor
-
-
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:
preHandlein interfaceorg.springframework.web.servlet.HandlerInterceptor- Parameters:
request- current HTTP requestresponse- current HTTP responsehandler- 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:
getOrderin interfaceorg.springframework.core.Ordered- Returns:
- Max Integer value.
-