Class CheckoutLoginController


  • @Controller
    @RequestMapping("/login/checkout")
    public class CheckoutLoginController
    extends AbstractLoginPageController
    Checkout Login Controller. Handles login and register for the checkout flow.
    • Constructor Detail

      • CheckoutLoginController

        public CheckoutLoginController()
    • Method Detail

      • doCheckoutLogin

        @RequestMapping(method=GET)
        public java.lang.String doCheckoutLogin​(@RequestParam(value="error",defaultValue="false")
                                                boolean loginError,
                                                javax.servlet.http.HttpSession session,
                                                org.springframework.ui.Model model,
                                                javax.servlet.http.HttpServletRequest request)
                                         throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • doCheckoutRegister

        @RequestMapping(value="/register",
                        method=POST)
        public java.lang.String doCheckoutRegister​(RegisterForm form,
                                                   org.springframework.validation.BindingResult bindingResult,
                                                   org.springframework.ui.Model model,
                                                   javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response,
                                                   org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
                                            throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • doAnonymousCheckout

        @RequestMapping(value="/guest",
                        method=POST)
        public java.lang.String doAnonymousCheckout​(GuestForm form,
                                                    org.springframework.validation.BindingResult bindingResult,
                                                    org.springframework.ui.Model model,
                                                    javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
                                             throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • checkoutRegister

        @RequestMapping(value="/register",
                        method=GET)
        public java.lang.String checkoutRegister​(@RequestParam(value="error",defaultValue="false")
                                                 boolean loginError,
                                                 javax.servlet.http.HttpSession session,
                                                 org.springframework.ui.Model model,
                                                 javax.servlet.http.HttpServletRequest request)
                                          throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • doAnonymousCheckout

        @RequestMapping(value="/guest",
                        method=GET)
        public java.lang.String doAnonymousCheckout​(@RequestParam(value="error",defaultValue="false")
                                                    boolean loginError,
                                                    javax.servlet.http.HttpSession session,
                                                    org.springframework.ui.Model model,
                                                    javax.servlet.http.HttpServletRequest request)
                                             throws CMSItemNotFoundException
        Throws:
        CMSItemNotFoundException
      • getSuccessRedirect

        protected java.lang.String getSuccessRedirect​(javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
        Specified by:
        getSuccessRedirect in class AbstractRegisterPageController
      • hasItemsInCart

        protected boolean hasItemsInCart()
        Checks if there are any items in the cart.
        Returns:
        returns true if items found in cart.
      • getCheckoutUrl

        protected java.lang.String getCheckoutUrl()
      • getAuthenticationManager

        protected org.springframework.security.authentication.AuthenticationManager getAuthenticationManager()