Class ViewElementBuilderContextInterceptor
java.lang.Object
com.foreach.across.modules.web.ui.ViewElementBuilderContextInterceptor
- All Implemented Interfaces:
org.springframework.web.servlet.HandlerInterceptor
public class ViewElementBuilderContextInterceptor
extends Object
implements org.springframework.web.servlet.HandlerInterceptor
Registers a global
ViewElementBuilderContext
on the request and attaches it as the
current thread-local builder context.
Extend this interceptor if you want to register additional default attributes.- Since:
- 2.0.0
- Author:
- Arne Vandamme
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
afterCompletion
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, Exception ex) protected ViewElementBuilderContext
createDefaultViewElementBuilderContext
(jakarta.servlet.http.HttpServletRequest request) final boolean
preHandle
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler) protected void
setLocalizedTextResolver
(LocalizedTextResolver localizedTextResolver) protected void
setMessageSource
(org.springframework.context.MessageSource messageSource) protected void
setWebAppLinkBuilder
(WebAppLinkBuilder webAppLinkBuilder) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.web.servlet.HandlerInterceptor
postHandle
-
Constructor Details
-
ViewElementBuilderContextInterceptor
public ViewElementBuilderContextInterceptor()
-
-
Method Details
-
preHandle
public final boolean preHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler) throws Exception - Specified by:
preHandle
in interfaceorg.springframework.web.servlet.HandlerInterceptor
- Throws:
Exception
-
createDefaultViewElementBuilderContext
protected ViewElementBuilderContext createDefaultViewElementBuilderContext(jakarta.servlet.http.HttpServletRequest request) -
afterCompletion
public final void afterCompletion(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, Exception ex) throws Exception - Specified by:
afterCompletion
in interfaceorg.springframework.web.servlet.HandlerInterceptor
- Throws:
Exception
-
setWebAppLinkBuilder
-
setMessageSource
@Autowired protected void setMessageSource(org.springframework.context.MessageSource messageSource) -
setLocalizedTextResolver
-