Class UserDataInitializer

  • All Implemented Interfaces:
    DataInitializer
    Direct Known Subclasses:
    DefaultMasterGlobalAdminUserDataInitializer

    public class UserDataInitializer
    extends Object
    implements DataInitializer
    The seed data users will be defined here.

    Note that we define admin user records here despite the fact that the admin user service seed data will send its data to this service through persistence events. This is because the admin user service is unable to initialize password information and thus we must create base records that contain this information first.

    Author:
    Nick Crum (ncrum)
    • Constructor Detail

      • UserDataInitializer

        public UserDataInitializer​(com.broadleafcommerce.common.extension.TypeFactory typeFactory,
                                   UserRepository<JpaUser> userRepository,
                                   org.springframework.security.crypto.password.PasswordEncoder passwordEncoder,
                                   boolean shouldCreateMarketplaceUsers)
    • Method Detail

      • setDefaultPassword

        public void setDefaultPassword​(String defaultPassword)
      • initialize

        @Transactional
        public void initialize()
        Description copied from interface: DataInitializer
        Initialize seed data for the application.
        Specified by:
        initialize in interface DataInitializer
      • createAdminUsersIfMissing

        protected void createAdminUsersIfMissing()
      • createCustomersIfMissing

        protected void createCustomersIfMissing()
      • createReadOnlyGlobalAdminUserIfMissing

        protected void createReadOnlyGlobalAdminUserIfMissing()
      • createMasterGlobalAdminUserIfMissing

        protected void createMasterGlobalAdminUserIfMissing()
      • createGlobalAdminUserIfMissing

        protected void createGlobalAdminUserIfMissing()
      • createAAAHotSaucesAdminUserIfMissing

        protected void createAAAHotSaucesAdminUserIfMissing()
      • createHeatClinicAdminUserIfMissing

        protected void createHeatClinicAdminUserIfMissing()
      • createMegaSauceMarketplaceAdminUserIfMissing

        protected void createMegaSauceMarketplaceAdminUserIfMissing()
      • 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()
      • createHeatClinicCustomerIfMissing

        protected void createHeatClinicCustomerIfMissing()
      • createAAAHotSaucesCustomerIfMissing

        protected void createAAAHotSaucesCustomerIfMissing()
      • createMegaSauceMarketplaceCustomerIfMissing

        protected void createMegaSauceMarketplaceCustomerIfMissing()