Class DeliveryAddressCheckoutStepController

    • Field Detail

      • DELIVERY_ADDRESS

        protected static final java.lang.String DELIVERY_ADDRESS
        See Also:
        Constant Field Values
      • ATTR_DELIVERY_ADDRESSES

        protected static final java.lang.String ATTR_DELIVERY_ADDRESSES
        See Also:
        Constant Field Values
      • ATTR_NO_ADDRESS

        protected static final java.lang.String ATTR_NO_ADDRESS
        See Also:
        Constant Field Values
      • ATTR_ADDRESS_FORM

        protected static final java.lang.String ATTR_ADDRESS_FORM
        See Also:
        Constant Field Values
      • ATTR_SHOW_SAVE_TO_ADDRESS_BOOK

        protected static final java.lang.String ATTR_SHOW_SAVE_TO_ADDRESS_BOOK
        See Also:
        Constant Field Values
    • Constructor Detail

      • DeliveryAddressCheckoutStepController

        public DeliveryAddressCheckoutStepController()
    • Method Detail

      • enterStep

        @RequestMapping(value="/add",
                        method=GET)
        public java.lang.String enterStep​(org.springframework.ui.Model model,
                                          org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
                                   throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Description copied from interface: CheckoutStepController
        Swapping the parameter order might break the validation aspect from working.
        Returns:
        returns the result for entering the checkout step
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • add

        @RequestMapping(value="/add",
                        method=POST)
        public java.lang.String add​(AddressForm addressForm,
                                    org.springframework.validation.BindingResult bindingResult,
                                    org.springframework.ui.Model model,
                                    org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
                             throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • adjustAddressVisibility

        protected void adjustAddressVisibility​(AddressForm addressForm,
                                               AddressData newAddress)
      • storeAddresses

        protected void storeAddresses​(AddressForm addressForm,
                                      org.springframework.ui.Model model)
      • editAddressForm

        @RequestMapping(value="/edit",
                        method=GET)
        public java.lang.String editAddressForm​(@RequestParam("editAddressCode")
                                                java.lang.String editAddressCode,
                                                org.springframework.ui.Model model,
                                                org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
                                         throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Edit resource.
        Parameters:
        editAddressCode -
        model -
        redirectAttributes -
        Returns:
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • edit

        @RequestMapping(value="/edit",
                        method=POST)
        public java.lang.String edit​(AddressForm addressForm,
                                     org.springframework.validation.BindingResult bindingResult,
                                     org.springframework.ui.Model model,
                                     org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
                              throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Save resource.
        Parameters:
        addressForm -
        bindingResult -
        model -
        redirectModel -
        Returns:
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • setAttributesForAddressReview

        protected void setAttributesForAddressReview​(AddressForm addressForm,
                                                     org.springframework.ui.Model model)
                                              throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • removeAddress

        @RequestMapping(value="/remove",
                        method={GET,POST})
        public java.lang.String removeAddress​(@RequestParam("addressCode")
                                              java.lang.String addressCode,
                                              org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel,
                                              org.springframework.ui.Model model)
                                       throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Delete resource.
        Parameters:
        addressCode -
        redirectModel -
        model -
        Returns:
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • doSelectSuggestedAddress

        @RequestMapping(value="/select",
                        method=POST)
        public java.lang.String doSelectSuggestedAddress​(AddressForm addressForm,
                                                         org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
        Select address from list.
        Parameters:
        addressForm -
        redirectModel -
        Returns:
      • doSelectDeliveryAddress

        @RequestMapping(value="/select",
                        method=GET)
        public java.lang.String doSelectDeliveryAddress​(@RequestParam("selectedAddressCode")
                                                        java.lang.String selectedAddressCode,
                                                        org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
        This method gets called when the "Use this Address" button is clicked. It sets the selected delivery address on the checkout facade - if it has changed, and reloads the page highlighting the selected delivery address.
        Parameters:
        selectedAddressCode - - the id of the delivery address.
        Returns:
        - a URL to the page to load.
      • cleanupTempAddress

        protected void cleanupTempAddress​(java.lang.String selectedAddressCode)
      • back

        @RequestMapping(value="/back",
                        method=GET)
        public java.lang.String back​(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
        Returns:
        checkoutstep link for navigating back
      • next

        @RequestMapping(value="/next",
                        method=GET)
        public java.lang.String next​(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
        Returns:
        checkoutstep link for navigating next
      • initBinder

        @InitBinder
        public void initBinder​(org.springframework.web.bind.WebDataBinder binder)
      • getCheckoutStep

        protected CheckoutStep getCheckoutStep()