org.broadleafcommerce.core.web.controller.account
Class BroadleafRegisterController

java.lang.Object
  extended by org.broadleafcommerce.common.web.controller.BroadleafAbstractController
      extended by org.broadleafcommerce.core.web.controller.account.BroadleafRegisterController

public class BroadleafRegisterController
extends BroadleafAbstractController

The controller responsible for registering a customer. Uses a component registered with the name blCustomerValidator to perform validation of the submitted customer. Uses the property "useEmailForLogin" to determine if the username should be defaulted to the email address if no username is supplied.

Author:
apazzolini, bpolster

Field Summary
protected  CustomerService customerService
           
protected  LoginService loginService
           
protected  MergeCartProcessor mergeCartProcessor
           
protected  RegisterCustomerValidator registerCustomerValidator
           
protected static String registerSuccessView
           
protected static String registerView
           
 
Constructor Summary
BroadleafRegisterController()
           
 
Method Summary
 String getRegisterSuccessView()
          Returns the view that will be returned from this controller when the registration is successful.
 String getRegisterView()
          Returns the view that will be used to display the registration page.
 RegisterCustomerForm initCustomerRegistrationForm()
           
 boolean isUseEmailForLogin()
           
 String processRegister(RegisterCustomerForm registerCustomerForm, org.springframework.validation.BindingResult errors, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model)
           
 String register(RegisterCustomerForm registerCustomerForm, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model)
           
 void setUseEmailForLogin(boolean useEmailForLogin)
           
 
Methods inherited from class org.broadleafcommerce.common.web.controller.BroadleafAbstractController
isAjaxRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

registerSuccessView

protected static String registerSuccessView

registerView

protected static String registerView

customerService

protected CustomerService customerService

registerCustomerValidator

protected RegisterCustomerValidator registerCustomerValidator

mergeCartProcessor

protected MergeCartProcessor mergeCartProcessor

loginService

protected LoginService loginService
Constructor Detail

BroadleafRegisterController

public BroadleafRegisterController()
Method Detail

register

public String register(RegisterCustomerForm registerCustomerForm,
                       javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response,
                       org.springframework.ui.Model model)

processRegister

public String processRegister(RegisterCustomerForm registerCustomerForm,
                              org.springframework.validation.BindingResult errors,
                              javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response,
                              org.springframework.ui.Model model)
                       throws ServiceException
Throws:
ServiceException

initCustomerRegistrationForm

public RegisterCustomerForm initCustomerRegistrationForm()

isUseEmailForLogin

public boolean isUseEmailForLogin()

setUseEmailForLogin

public void setUseEmailForLogin(boolean useEmailForLogin)

getRegisterSuccessView

public String getRegisterSuccessView()
Returns the view that will be returned from this controller when the registration is successful. The success view should be a redirect (e.g. start with "redirect:" since this will cause the entire SpringSecurity pipeline to be fulfilled. By default, returns "redirect:/"

Returns:
the register success view

getRegisterView

public String getRegisterView()
Returns the view that will be used to display the registration page. By default, returns "/register"

Returns:
the register view


Copyright © 2013. All Rights Reserved.