Class BroadleafRegisterController
java.lang.Object
org.broadleafcommerce.common.web.controller.BroadleafAbstractController
org.broadleafcommerce.core.web.controller.account.BroadleafRegisterController
- Direct Known Subclasses:
BroadleafOauthRegisterController
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
FieldsModifier and TypeFieldDescriptionprotected CustomerServiceprotected LoginServiceprotected OrderServiceprotected RegisterCustomerValidatorprotected static Stringprotected static Stringprotected RegistrationServiceprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the view that will be returned from this controller when the registration is successful.Returns the view that will be used to display the registration page.booleanprocessRegister(RegisterCustomerForm registerCustomerForm, org.springframework.validation.BindingResult errors, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) register(RegisterCustomerForm registerCustomerForm, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model) voidsetUseEmailForLogin(boolean useEmailForLogin) Methods inherited from class org.broadleafcommerce.common.web.controller.BroadleafAbstractController
addDeepLink, getContextPath, isAjaxRequest, jsonResponse
-
Field Details
-
registerSuccessView
-
registerView
-
useEmailForLogin
@Value("${use.email.for.site.login:true}") protected boolean useEmailForLogin -
registrationService
-
customerService
-
registerCustomerValidator
-
loginService
-
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:
ServiceExceptionPricingException
-
initCustomerRegistrationForm
-
isUseEmailForLogin
public boolean isUseEmailForLogin() -
setUseEmailForLogin
public void setUseEmailForLogin(boolean useEmailForLogin) -
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
Returns the view that will be used to display the registration page.By default, returns "/register"
- Returns:
- the register view
-