Package io.jmix.core.accesscontext
Class InMemoryCrudEntityContext
java.lang.Object
io.jmix.core.accesscontext.InMemoryCrudEntityContext
- All Implemented Interfaces:
AccessContext
Defines an authorization point for checking access to entity operations by testing predicates.
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected BiPredicate
protected BiPredicate
protected final MetaClass
protected BiPredicate
protected BiPredicate
-
Constructor Summary
ConstructorDescriptionInMemoryCrudEntityContext
(MetaClass entityClass, org.springframework.context.ApplicationContext applicationContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCreatePredicate
(BiPredicate predicate) void
addDeletePredicate
(BiPredicate predicate) void
addReadPredicate
(BiPredicate predicate) void
addUpdatePredicate
(BiPredicate predicate) Returns a human-readable explanation of constraints applied to the current context instance for logging of authorization decisions.boolean
isCreatePermitted
(Object entity) boolean
isDeletePermitted
(Object entity) boolean
isReadPermitted
(Object entity) boolean
isUpdatePermitted
(Object entity)
-
Field Details
-
entityClass
-
createPredicate
-
readPredicate
-
updatePredicate
-
deletePredicate
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
InMemoryCrudEntityContext
public InMemoryCrudEntityContext(MetaClass entityClass, org.springframework.context.ApplicationContext applicationContext)
-
-
Method Details
-
getEntityClass
-
isCreatePermitted
-
createPredicate
-
addCreatePredicate
-
isReadPermitted
-
readPredicate
-
addReadPredicate
-
isUpdatePermitted
-
updatePredicate
-
addUpdatePredicate
-
isDeletePermitted
-
deletePredicate
-
addDeletePredicate
-
explainConstraints
Description copied from interface:AccessContext
Returns a human-readable explanation of constraints applied to the current context instance for logging of authorization decisions. Null if the current context does not impose any constraints.- Specified by:
explainConstraints
in interfaceAccessContext
-