Package io.jmix.security.impl.role
Class ResourceRoleRepositoryImpl
java.lang.Object
io.jmix.security.impl.role.ResourceRoleRepositoryImpl
- All Implemented Interfaces:
ResourceRoleRepository
,RoleRepository<ResourceRole>
@Component("sec_ResourceRoleRepository")
public class ResourceRoleRepositoryImpl
extends Object
implements ResourceRoleRepository
-
Field Summary
Fields inherited from interface io.jmix.security.role.ResourceRoleRepository
RESOURCE_ROLES_CACHE_NAME
-
Constructor Summary
ConstructorDescriptionResourceRoleRepositoryImpl
(org.springframework.cache.CacheManager cacheManager, CacheOperations cacheOperations, Collection<ResourceRoleProvider> roleProviders, org.springframework.beans.factory.ObjectProvider<RoleRepositoryProviderUtils<ResourceRole>> roleRepositoryProviderUtilsProvider) -
Method Summary
Modifier and TypeMethodDescriptionboolean
deleteRole
(String code) findRoleByCode
(String roleCode) getRoleByCode
(String code) void
init()
void
Invalidates role cache.
-
Constructor Details
-
ResourceRoleRepositoryImpl
public ResourceRoleRepositoryImpl(org.springframework.cache.CacheManager cacheManager, CacheOperations cacheOperations, Collection<ResourceRoleProvider> roleProviders, org.springframework.beans.factory.ObjectProvider<RoleRepositoryProviderUtils<ResourceRole>> roleRepositoryProviderUtilsProvider)
-
-
Method Details
-
init
@PostConstruct public void init() -
findRoleByCode
- Specified by:
findRoleByCode
in interfaceRoleRepository<ResourceRole>
-
getRoleByCode
- Specified by:
getRoleByCode
in interfaceRoleRepository<ResourceRole>
-
deleteRole
- Specified by:
deleteRole
in interfaceRoleRepository<ResourceRole>
-
getAllRoles
- Specified by:
getAllRoles
in interfaceRoleRepository<ResourceRole>
-
invalidateCache
public void invalidateCache()Description copied from interface:RoleRepository
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.- Specified by:
invalidateCache
in interfaceRoleRepository<ResourceRole>
-