Class WebManagerControllerHandlerInterceptor

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.web.servlet.HandlerInterceptor

    public class WebManagerControllerHandlerInterceptor
    extends Object
    implements org.springframework.web.servlet.HandlerInterceptor, org.springframework.context.ApplicationContextAware
    Interceptor that open the session that are used while the dispatcher servlet handles the request.
    Author:
    arjans, bramk
    • Constructor Detail

      • WebManagerControllerHandlerInterceptor

        public WebManagerControllerHandlerInterceptor()
    • Method Detail

      • preHandle

        public boolean preHandle​(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 Object object)
                          throws Exception
        Makes sure that a session is available, creates a edit presentation context and sets the applicable locale.
        Specified by:
        preHandle in interface org.springframework.web.servlet.HandlerInterceptor
        Parameters:
        request - current HTTP request
        response - current HTTP response
        object - handler
        Throws:
        Exception
      • afterCompletion

        public void afterCompletion​(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response,
                                    Object object,
                                    Exception exception)
                             throws Exception
        Specified by:
        afterCompletion in interface org.springframework.web.servlet.HandlerInterceptor
        Parameters:
        request - current HTTP request
        response - current HTTP response
        object - handler
        Throws:
        Exception - in case of errors
      • postHandle

        public void postHandle​(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response,
                               Object object,
                               org.springframework.web.servlet.ModelAndView exception)
                        throws Exception
        Does nothing but interface forces us to be implemented it.
        Specified by:
        postHandle in interface org.springframework.web.servlet.HandlerInterceptor
        Parameters:
        request - current HTTP request
        response - current HTTP response
        object - chosen handler to execute, for type and/or instance examination
        modelAndView - the ModelAndView that the handler returned, can also be null
        Throws:
        Exception - in case of errors
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Sets the application context.
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Parameters:
        myApplicationContext -
        Throws:
        org.springframework.beans.BeansException