com.elasticpath.sfweb.controller.impl
Class AddressFormControllerImpl

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.support.WebContentGenerator
              extended by org.springframework.web.servlet.mvc.AbstractController
                  extended by org.springframework.web.servlet.mvc.BaseCommandController
                      extended by org.springframework.web.servlet.mvc.AbstractFormController
                          extended by org.springframework.web.servlet.mvc.SimpleFormController
                              extended by com.elasticpath.sfweb.controller.impl.AbstractEpFormController
                                  extended by com.elasticpath.sfweb.controller.impl.AddressFormControllerImpl
All Implemented Interfaces:
EpController, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller

public class AddressFormControllerImpl
extends AbstractEpFormController

The Spring MVC controller for address-add page.


Field Summary
 
Fields inherited from class org.springframework.web.servlet.mvc.BaseCommandController
DEFAULT_COMMAND_NAME
 
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
METHOD_GET, METHOD_HEAD, METHOD_POST
 
Constructor Summary
AddressFormControllerImpl()
           
 
Method Summary
 java.lang.Object formBackingObject(javax.servlet.http.HttpServletRequest request)
          Prepare the command object for the address add form.
 org.springframework.web.servlet.ModelAndView onSubmit(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object command, org.springframework.validation.BindException errors)
          Handle the address-add form submit.
 void setCheckoutBillingAddressView(java.lang.String billingAddressView)
          Set the view to return to when editing a billing address.
 void setCheckoutShippingAddressView(java.lang.String shippingAddressView)
          Set the view to return to when editing a shipping address.
 void setCustomerService(CustomerService customerService)
          Set the customer service used to associate the address with a customer.
 
Methods inherited from class com.elasticpath.sfweb.controller.impl.AbstractEpFormController
getElasticPath, getRequestHelper, setElasticPath, setRequestHelper
 
Methods inherited from class org.springframework.web.servlet.mvc.SimpleFormController
getFormView, getSuccessView, setFormView, setSuccessView
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractFormController
isBindOnNewForm, isSessionForm, setBindOnNewForm, setSessionForm
 
Methods inherited from class org.springframework.web.servlet.mvc.BaseCommandController
getBindingErrorProcessor, getCommandClass, getCommandName, getMessageCodesResolver, getPropertyEditorRegistrars, getValidator, getValidators, isValidateOnBinding, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setValidateOnBinding, setValidator, setValidators
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession
 
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseExpiresHeader, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseExpiresHeader
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, setApplicationContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.web.servlet.mvc.Controller
handleRequest
 

Constructor Detail

AddressFormControllerImpl

public AddressFormControllerImpl()
Method Detail

formBackingObject

public java.lang.Object formBackingObject(javax.servlet.http.HttpServletRequest request)
Prepare the command object for the address add form.

Overrides:
formBackingObject in class org.springframework.web.servlet.mvc.AbstractFormController
Parameters:
request - -the request
Returns:
the command object

onSubmit

public org.springframework.web.servlet.ModelAndView onSubmit(javax.servlet.http.HttpServletRequest request,
                                                             javax.servlet.http.HttpServletResponse response,
                                                             java.lang.Object command,
                                                             org.springframework.validation.BindException errors)
Handle the address-add form submit.

Overrides:
onSubmit in class org.springframework.web.servlet.mvc.SimpleFormController
Parameters:
request - -the request
response - -the response
command - -the command object
errors - - will be written back in case of any business error happens
Returns:
return the view

setCheckoutBillingAddressView

public void setCheckoutBillingAddressView(java.lang.String billingAddressView)
Set the view to return to when editing a billing address.

Parameters:
billingAddressView - the billing address view

setCheckoutShippingAddressView

public void setCheckoutShippingAddressView(java.lang.String shippingAddressView)
Set the view to return to when editing a shipping address.

Parameters:
shippingAddressView - the shipping address view

setCustomerService

public void setCustomerService(CustomerService customerService)
Set the customer service used to associate the address with a customer.

Parameters:
customerService - the customer service.