Class BroadleafRegisterController

java.lang.Object
org.broadleafcommerce.common.web.controller.BroadleafAbstractController
org.broadleafcommerce.core.web.controller.account.BroadleafRegisterController
Direct Known Subclasses:
BroadleafOauthRegisterController

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 Details

    • registerSuccessView

      protected static String registerSuccessView
    • registerView

      protected static String registerView
    • useEmailForLogin

      @Value("${use.email.for.site.login:true}") protected boolean useEmailForLogin
    • registrationService

      protected RegistrationService registrationService
    • customerService

      protected CustomerService customerService
    • registerCustomerValidator

      protected RegisterCustomerValidator registerCustomerValidator
    • loginService

      protected LoginService loginService
    • orderService

      protected OrderService orderService
  • Constructor Details

    • BroadleafRegisterController

      public BroadleafRegisterController()
  • Method Details

    • register

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

      public String processRegister(RegisterCustomerForm registerCustomerForm, org.springframework.validation.BindingResult errors, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) throws ServiceException, PricingException
      Throws:
      ServiceException
      PricingException
    • 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