Package com.broadleafcommerce.auth.data
Class PermissionDataInitializer
- java.lang.Object
-
- com.broadleafcommerce.auth.data.PermissionDataInitializer
-
- All Implemented Interfaces:
DataInitializer
public class PermissionDataInitializer extends Object implements DataInitializer
The seed data permissions will be defined here.These permissions are necessary for seed data we define within this service (for roles or users). However, the admin user service also defines 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
PermissionDataInitializer.UserPermissionIds
-
Constructor Summary
Constructors Constructor Description PermissionDataInitializer(com.broadleafcommerce.common.extension.TypeFactory typeFactory, UserPermissionRepository<JpaUserPermission> userPermissionRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createPermissionIfMissing(String id, String name)
protected void
createPermissionsIfMissing()
void
initialize()
Initialize seed data for the application.
-
-
-
Constructor Detail
-
PermissionDataInitializer
public PermissionDataInitializer(com.broadleafcommerce.common.extension.TypeFactory typeFactory, UserPermissionRepository<JpaUserPermission> userPermissionRepository)
-
-
Method Detail
-
initialize
@Transactional public void initialize()
Description copied from interface:DataInitializer
Initialize seed data for the application.- Specified by:
initialize
in interfaceDataInitializer
-
createPermissionsIfMissing
protected void createPermissionsIfMissing()
-
-