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 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 interface org.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 interface org.springframework.web.servlet.HandlerInterceptor
      Throws:
      Exception
    • setWebAppLinkBuilder

      @Autowired protected void setWebAppLinkBuilder(WebAppLinkBuilder webAppLinkBuilder)
    • setMessageSource

      @Autowired protected void setMessageSource(org.springframework.context.MessageSource messageSource)
    • setLocalizedTextResolver

      @Autowired protected void setLocalizedTextResolver(LocalizedTextResolver localizedTextResolver)