Class AdminUserDataInitializer
java.lang.Object
com.broadleafcommerce.adminuser.data.AdminUserDataInitializer
- All Implemented Interfaces:
DataInitializer
,org.springframework.core.Ordered
- Direct Known Subclasses:
DefaultMasterGlobalAdminUserDataInitializer
The seed-data admin users will be defined here and persistence events will message them to the
authentication service.
Since the admin user service cannot define passwords, the authentication service's seed data defines basic representations of these user records with a password set. The persistence events sent here will theoretically update those existing records with fleshed out details regarding roles/permissions.
For this to work without producing duplicate records, the IDs of the user records must be the same as those in the authentication service.
- Author:
- Nick Crum (ncrum), Samarth Dhruva (samarthd)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Ordering after the role/permissions data initializers to ensure we can reference roles/permissions.Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorsConstructorDescriptionAdminUserDataInitializer
(com.broadleafcommerce.common.extension.TypeFactory typeFactory, AdminUserService<AdminUser> userService, com.broadleafcommerce.common.extension.data.DataRouteSupporting route, boolean shouldCreateMarketplaceUsers) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
int
getOrder()
protected com.broadleafcommerce.common.extension.data.DataRouteSupporting
getRoute()
protected com.broadleafcommerce.common.extension.TypeFactory
protected AdminUserService<AdminUser>
void
Initialize seed data for the application.protected boolean
-
Field Details
-
ORDER
public static final int ORDEROrdering after the role/permissions data initializers to ensure we can reference roles/permissions.- See Also:
-
-
Constructor Details
-
AdminUserDataInitializer
public AdminUserDataInitializer(com.broadleafcommerce.common.extension.TypeFactory typeFactory, AdminUserService<AdminUser> userService, com.broadleafcommerce.common.extension.data.DataRouteSupporting route, boolean shouldCreateMarketplaceUsers)
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
initialize
public void initialize()Description copied from interface:DataInitializer
Initialize seed data for the application.- Specified by:
initialize
in interfaceDataInitializer
-
createReadOnlyGlobalAdminUserIfMissing
protected void createReadOnlyGlobalAdminUserIfMissing() -
createMasterGlobalAdminUserIfMissing
protected void createMasterGlobalAdminUserIfMissing() -
createGlobalAdminUserIfMissing
protected void createGlobalAdminUserIfMissing() -
createAAAHotSaucesAdminUserIfMissing
protected void createAAAHotSaucesAdminUserIfMissing() -
createHeatClinicAdminUserIfMissing
protected void createHeatClinicAdminUserIfMissing() -
createSecondMasterGlobalAdminUserIfMissing
protected void createSecondMasterGlobalAdminUserIfMissing() -
createMarketplaceOperatorAdminUserIfMissing
protected void createMarketplaceOperatorAdminUserIfMissing() -
createWildBillAdminAdminUserIfMissing
protected void createWildBillAdminAdminUserIfMissing() -
createWildBillMerchandiserAdminUserIfMissing
protected void createWildBillMerchandiserAdminUserIfMissing() -
createJudgeJuryAdminAdminUserIfMissing
protected void createJudgeJuryAdminAdminUserIfMissing() -
createJudgeJuryMerchandiserAdminUserIfMissing
protected void createJudgeJuryMerchandiserAdminUserIfMissing() -
createWildBillAndJudgeJuryAdminAdminUserIfMissing
protected void createWildBillAndJudgeJuryAdminAdminUserIfMissing() -
createWildBillAndJudgeJuryMerchandiserAdminUserIfMissing
protected void createWildBillAndJudgeJuryMerchandiserAdminUserIfMissing() -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getUserService
-
getRoute
protected com.broadleafcommerce.common.extension.data.DataRouteSupporting getRoute() -
isShouldCreateMarketplaceUsers
protected boolean isShouldCreateMarketplaceUsers()
-