Package com.broadleafcommerce.auth.data
Class RoleDataInitializer
- java.lang.Object
-
- com.broadleafcommerce.auth.data.RoleDataInitializer
-
- All Implemented Interfaces:
DataInitializer
public class RoleDataInitializer extends Object implements DataInitializer
The seed data roles will be defined here.These roles are necessary for seed data we define within this service. However, the admin user service also may define some of this same data for itself and will synchronize it over to this service. To avoid creation of duplicate records, the IDs used here should be kept in sync with whatever the admin user service seed data defines.
- Author:
- Nick Crum (ncrum)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRoleDataInitializer.UserRoleIds
-
Constructor Summary
Constructors Constructor Description RoleDataInitializer(com.broadleafcommerce.common.extension.TypeFactory typeFactory, RoleRepository<JpaUserRole> roleRepository, UserPermissionRepository<JpaUserPermission> userPermissionRepository, boolean shouldCreateMarketplaceRoles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateApplicationAccessRole()protected voidcreateApproveUserRole()protected voidcreateBaseUserRole()protected voidcreateCSRRole()Creates the role used by CSR users.protected voidcreateCustomerUserRole()Creates the role for the anonymous or authenticated customer user.protected voidcreateDeployUserRole()protected voidcreateFullAccessRole()protected voidcreateMarketplaceOperator()protected voidcreateMarketplaceVendorAdmin()protected voidcreateMarketplaceVendorMerchandiser()protected voidcreatePartialAccessRole()protected voidcreateRoleIfMissing(String id, String name, Collection<String> permissionIds)voidinitialize()Initialize seed data for the application.protected booleanisShouldCreateMarketplaceRoles()
-
-
-
Constructor Detail
-
RoleDataInitializer
public RoleDataInitializer(com.broadleafcommerce.common.extension.TypeFactory typeFactory, RoleRepository<JpaUserRole> roleRepository, UserPermissionRepository<JpaUserPermission> userPermissionRepository, boolean shouldCreateMarketplaceRoles)
-
-
Method Detail
-
initialize
@Transactional public void initialize()
Description copied from interface:DataInitializerInitialize seed data for the application.- Specified by:
initializein interfaceDataInitializer
-
createPartialAccessRole
protected void createPartialAccessRole()
-
createFullAccessRole
protected void createFullAccessRole()
-
createBaseUserRole
protected void createBaseUserRole()
-
createApproveUserRole
protected void createApproveUserRole()
-
createDeployUserRole
protected void createDeployUserRole()
-
createApplicationAccessRole
protected void createApplicationAccessRole()
-
createCSRRole
protected void createCSRRole()
Creates the role used by CSR users.
-
createMarketplaceOperator
protected void createMarketplaceOperator()
-
createMarketplaceVendorAdmin
protected void createMarketplaceVendorAdmin()
-
createMarketplaceVendorMerchandiser
protected void createMarketplaceVendorMerchandiser()
-
createCustomerUserRole
protected void createCustomerUserRole()
Creates the role for the anonymous or authenticated customer user.
-
createRoleIfMissing
protected void createRoleIfMissing(String id, String name, Collection<String> permissionIds)
-
isShouldCreateMarketplaceRoles
protected boolean isShouldCreateMarketplaceRoles()
-
-