Class CartRestorationBeforeViewHandler

  • All Implemented Interfaces:
    BeforeViewHandler

    public class CartRestorationBeforeViewHandler
    extends java.lang.Object
    implements BeforeViewHandler
    Handler to add cart restoration messages when appropriate
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void beforeView​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.web.servlet.ModelAndView modelAndView)
      Called before the DispatcherServlet renders the view.
      protected java.util.List<java.lang.String> getPagesToShowModifications()  
      protected SessionService getSessionService()  
      void setPagesToShowModifications​(java.util.List<java.lang.String> pagesToShowModifications)  
      void setSessionService​(SessionService sessionService)  
      protected java.lang.Boolean showModifications​(javax.servlet.http.HttpServletRequest request)
      Decide whether or not the modifications related to the cart restoration or merge should be displayed in the notifications
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CartRestorationBeforeViewHandler

        public CartRestorationBeforeViewHandler()
    • Method Detail

      • beforeView

        public void beforeView​(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response,
                               org.springframework.web.servlet.ModelAndView modelAndView)
                        throws java.lang.Exception
        Description copied from interface: BeforeViewHandler
        Called before the DispatcherServlet renders the view. Can expose additional model objects to the view via the given ModelAndView.
        Specified by:
        beforeView in interface BeforeViewHandler
        Parameters:
        request - current HTTP request
        response - current HTTP response
        modelAndView - the ModelAndView that the handler returned
        Throws:
        java.lang.Exception - in case of errors
      • showModifications

        protected java.lang.Boolean showModifications​(javax.servlet.http.HttpServletRequest request)
        Decide whether or not the modifications related to the cart restoration or merge should be displayed in the notifications
        Parameters:
        request -
        Returns:
        whether or not to display the modifications
      • setSessionService

        public void setSessionService​(SessionService sessionService)
      • getPagesToShowModifications

        protected java.util.List<java.lang.String> getPagesToShowModifications()
      • setPagesToShowModifications

        public void setPagesToShowModifications​(java.util.List<java.lang.String> pagesToShowModifications)