Class CmsCacheInitializerInterceptor

  • All Implemented Interfaces:
    org.springframework.web.servlet.AsyncHandlerInterceptor, org.springframework.web.servlet.HandlerInterceptor

    public class CmsCacheInitializerInterceptor
    extends org.springframework.web.servlet.handler.HandlerInterceptorAdapter
    Default interceptor to run before the controller's execution to initialize the permission cache. Reason: part of the code can be run in executeInLocalView which means that everything that is put in the cache during executeInLocalView execution will never be available outside. So we can not initialize the cache inside executeInLocalView. That's why it's initialized here.
    • Constructor Detail

      • CmsCacheInitializerInterceptor

        public CmsCacheInitializerInterceptor()
    • Method Detail

      • preHandle

        public boolean preHandle​(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 java.lang.Object handler)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setPermissionCachedCRUDService

        public void setPermissionCachedCRUDService​(PermissionCachedCRUDService permissionCachedCRUDService)