Class DefaultAccountUpdateRequestHandler
java.lang.Object
com.broadleafcommerce.auth.user.service.DefaultAccountUpdateRequestHandler
- All Implemented Interfaces:
AccountUpdateRequestHandler
public class DefaultAccountUpdateRequestHandler
extends Object
implements AccountUpdateRequestHandler
Process an
CustomerAccountUpdateRequest
to respond to updates of an account's status or
parent.- Author:
- Cade Rea (cade-rea)
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefaultAccountUpdateRequestHandler
(AccountRoleService<AccountRole> accountRoleService, CustomerAccountService<CustomerAccount> customerAccountService, UserService<User> userService, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected AccountRoleService<AccountRole>
protected CustomerAccountService<CustomerAccount>
protected com.broadleafcommerce.common.extension.TypeFactory
protected UserService<User>
void
handle
(CustomerAccountUpdateRequest request) For the given Account, activate or deactivate all AccountRoles for all Users.protected void
protected void
handleRoles
(CustomerAccountUpdateRequest request) protected static boolean
isActive
(CustomerAccountUpdateRequest request) protected static boolean
isDeleted
(CustomerAccountUpdateRequest request)
-
Field Details
-
ACCOUNT_STATUS_ACTIVE
- See Also:
-
ACCOUNT_STATUS_DELETED
- See Also:
-
-
Constructor Details
-
DefaultAccountUpdateRequestHandler
public DefaultAccountUpdateRequestHandler(AccountRoleService<AccountRole> accountRoleService, CustomerAccountService<CustomerAccount> customerAccountService, UserService<User> userService, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
handle
For the given Account, activate or deactivate all AccountRoles for all Users. If an account has been deleted, remove all AccountRoles for that account from all Users.- Specified by:
handle
in interfaceAccountUpdateRequestHandler
- Parameters:
request
- Data about the account status change.
-
handleRoles
-
handleAccount
-
isDeleted
-
isActive
-
getAccountRoleService
-
getCustomerAccountService
-
getUserService
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-