Interface RoleRepository<T extends BaseRole>

All Known Subinterfaces:
ResourceRoleRepository, RowLevelRoleRepository
All Known Implementing Classes:
ResourceRoleRepositoryImpl, RowLevelRoleRepositoryImpl

@NullMarked public interface RoleRepository<T extends BaseRole>
Interface for roles repository. Implementations of the interface are responsible for finding roles of different types: resource, row-level, etc.
  • Method Details

    • getRoleByCode

      T getRoleByCode(String code)
    • findRoleByCode

      @Nullable T findRoleByCode(String code)
    • deleteRole

      boolean deleteRole(String code)
    • getAllRoles

      Collection<T> getAllRoles()
    • getAllRoles

      default Collection<T> getAllRoles(boolean includePolicies)
      Returns all roles. When includePolicies is false, implementations may skip loading role policies to speed up listing scenarios that do not need them.
    • invalidateCache

      void invalidateCache()
      Invalidates role cache. The method must be invoked after each role modification, for example, when database role is changed with the UI or annotated role is hot deployed.