Class RoleDataInitializer

java.lang.Object
com.broadleafcommerce.auth.data.RoleDataInitializer
All Implemented Interfaces:
DataInitializer

@Deprecated(forRemoval=true, since="1.9.0") public class RoleDataInitializer extends Object implements DataInitializer
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated in favor of liquibase insert pattern (see auth.starter.required.data.changelog.xml)
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 final class 
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RoleDataInitializer(com.broadleafcommerce.common.extension.TypeFactory typeFactory, RoleRepository<JpaUserRole> roleRepository, UserPermissionRepository<JpaUserPermission> userPermissionRepository, boolean shouldCreateMarketplaceRoles)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    RoleDataInitializer(com.broadleafcommerce.common.extension.TypeFactory typeFactory, RoleRepository<JpaUserRole> roleRepository, UserPermissionRepository<JpaUserPermission> userPermissionRepository, boolean shouldCreateMarketplaceRoles, boolean alwaysUpdateRoles)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates generic account member role.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates the role used by CSR users.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates the role for the anonymous or authenticated customer user.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    createRoleIfMissing(String id, String name, Collection<String> permissionIds)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    createRoleIfMissing(String id, String name, Collection<String> permissionIds, boolean accountRole, String friendlyName, String roleDescription)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Initialize seed data for the application.
    protected boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RoleDataInitializer

      public RoleDataInitializer(com.broadleafcommerce.common.extension.TypeFactory typeFactory, RoleRepository<JpaUserRole> roleRepository, UserPermissionRepository<JpaUserPermission> userPermissionRepository, boolean shouldCreateMarketplaceRoles)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • RoleDataInitializer

      public RoleDataInitializer(com.broadleafcommerce.common.extension.TypeFactory typeFactory, RoleRepository<JpaUserRole> roleRepository, UserPermissionRepository<JpaUserPermission> userPermissionRepository, boolean shouldCreateMarketplaceRoles, boolean alwaysUpdateRoles)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • initialize

      @Transactional public void initialize()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: DataInitializer
      Initialize seed data for the application.
      Specified by:
      initialize in interface DataInitializer
    • createPartialAccessRole

      protected void createPartialAccessRole()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createFullAccessRole

      protected void createFullAccessRole()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createBaseUserRole

      protected void createBaseUserRole()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createApproveUserRole

      protected void createApproveUserRole()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createDeployUserRole

      protected void createDeployUserRole()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createApplicationAccessRole

      protected void createApplicationAccessRole()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createCSRRole

      protected void createCSRRole()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates the role used by CSR users.
    • createMarketplaceOperator

      protected void createMarketplaceOperator()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createMarketplaceVendorAdmin

      protected void createMarketplaceVendorAdmin()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createMarketplaceVendorMerchandiser

      protected void createMarketplaceVendorMerchandiser()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createCustomerUserRole

      protected void createCustomerUserRole()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates the role for the anonymous or authenticated customer user.
    • createAccountMemberRole

      protected void createAccountMemberRole()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates generic account member role. This is a marker role to indicate membership in an account and should not have any permissions.
    • createAccountRoles

      protected void createAccountRoles()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createRoleIfMissing

      protected void createRoleIfMissing(String id, String name, Collection<String> permissionIds)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createRoleIfMissing

      protected void createRoleIfMissing(String id, String name, Collection<String> permissionIds, boolean accountRole, @Nullable String friendlyName, @Nullable String roleDescription)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • isShouldCreateMarketplaceRoles

      protected boolean isShouldCreateMarketplaceRoles()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • isAlwaysUpdateRoles

      protected boolean isAlwaysUpdateRoles()
      Deprecated, for removal: This API element is subject to removal in a future version.