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 class
RoleDataInitializer.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 void
createApplicationAccessRole()
protected void
createApproveUserRole()
protected void
createBaseUserRole()
protected void
createCSRRole()
Creates the role used by CSR users.protected void
createCustomerUserRole()
Creates the role for the anonymous or authenticated customer user.protected void
createDeployUserRole()
protected void
createFullAccessRole()
protected void
createMarketplaceOperator()
protected void
createMarketplaceVendorAdmin()
protected void
createMarketplaceVendorMerchandiser()
protected void
createPartialAccessRole()
protected void
createRoleIfMissing(String id, String name, Collection<String> permissionIds)
void
initialize()
Initialize seed data for the application.protected boolean
isShouldCreateMarketplaceRoles()
-
-
-
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:DataInitializer
Initialize seed data for the application.- Specified by:
initialize
in 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()
-
-