Class BaseDatabaseRoleProvider<T extends BaseRole>
java.lang.Object
io.jmix.securitydata.impl.role.provider.BaseDatabaseRoleProvider<T>
- All Implemented Interfaces:
RoleProvider<T>
- Direct Known Subclasses:
DatabaseResourceRoleProvider,DatabaseRowLevelRoleProvider
public abstract class BaseDatabaseRoleProvider<T extends BaseRole>
extends Object
implements RoleProvider<T>
Base role provider that gets resource roles/row level roles from the database.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AccessManagerprotected UnconstrainedDataManagerprotected Metadata -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidbuildFetchPlan(FetchPlanBuilder fetchPlanBuilder) protected voidbuildFetchPlan(FetchPlanBuilder fetchPlanBuilder, boolean includePolicies) protected Stringprotected abstract Tprotected Tprotected voidcheckLocalizedValues(T role) Logs the localized values of the role that cannot be read.protected voidcheckLocalizedValuesInternal(T role, String property, @Nullable String localizedValues) booleandeleteRole(@NonNull T role) @Nullable TfindRoleByCode(@NonNull String code) @NonNull Collection<T> @NonNull Collection<T> getAllRoles(boolean includePolicies) Returns all roles.protected abstract Class<?> voidsetAccessManager(AccessManager accessManager) voidsetDataManager(UnconstrainedDataManager dataManager) voidsetMetadata(Metadata metadata) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.security.role.RoleProvider
getRoleByCode
-
Field Details
-
dataManager
-
metadata
-
accessManager
-
reportedLocalizedValues
-
-
Constructor Details
-
BaseDatabaseRoleProvider
public BaseDatabaseRoleProvider()
-
-
Method Details
-
getAllRoles
- Specified by:
getAllRolesin interfaceRoleProvider<T extends BaseRole>
-
getAllRoles
Description copied from interface:RoleProviderReturns all roles. WhenincludePoliciesisfalse, implementations may skip loading role policies to speed up listing scenarios that do not need them.- Specified by:
getAllRolesin interfaceRoleProvider<T extends BaseRole>
-
findRoleByCode
- Specified by:
findRoleByCodein interfaceRoleProvider<T extends BaseRole>
-
deleteRole
- Specified by:
deleteRolein interfaceRoleProvider<T extends BaseRole>
-
setDataManager
-
setMetadata
-
setAccessManager
-
buildRole
-
buildRole
-
getRoleClass
-
buildFetchPlan
-
buildFetchPlan
-
buildFindByCodeQuery
-
checkLocalizedValues
Logs the localized values of the role that cannot be read. The role keeps them as they are stored and is shown with its default texts instead. The role is reported here, where its code is known, rather than every time it is shown, and atWARNonce for the same values: lists build their roles on every load, so the values are logged atDEBUGafterwards until they change. -
checkLocalizedValuesInternal
-