Package io.jmix.security.model
Class RowLevelPolicy
java.lang.Object
io.jmix.security.model.RowLevelPolicy
- All Implemented Interfaces:
Serializable
Defines a constraint that restricts data a user can read or modify. There are two row-level policy types: in-memory
and JPQL.
- See Also:
-
Constructor Summary
ConstructorDescriptionRowLevelPolicy
(String entityName, RowLevelPolicyAction action, RowLevelBiPredicate<Object, org.springframework.context.ApplicationContext> biPredicate, Map<String, String> customProperties) RowLevelPolicy
(String entityName, RowLevelPolicyAction action, String script, RowLevelBiPredicate<Object, org.springframework.context.ApplicationContext> biPredicate, Map<String, String> customProperties) RowLevelPolicy
(String entityName, String whereClause, String joinClause) RowLevelPolicy
(String entityName, String whereClause, String joinClause, Map<String, String> customProperties) -
Method Summary
Modifier and TypeMethodDescriptionReturns entity CRUD operationRowLevelBiPredicate<Object,
org.springframework.context.ApplicationContext> Returns a predicate for in-memory row-level policyReturns a name of the associated entityReturns "join" clause for JPQL policyReturns a script for predicate for in-memory row-level policygetType()
Returns row-level policy type.Returns "where" clause for JPQL policy
-
Constructor Details
-
RowLevelPolicy
-
RowLevelPolicy
-
RowLevelPolicy
public RowLevelPolicy(String entityName, RowLevelPolicyAction action, String script, RowLevelBiPredicate<Object, org.springframework.context.ApplicationContext> biPredicate, Map<String, String> customProperties) -
RowLevelPolicy
public RowLevelPolicy(String entityName, RowLevelPolicyAction action, RowLevelBiPredicate<Object, org.springframework.context.ApplicationContext> biPredicate, Map<String, String> customProperties)
-
-
Method Details
-
getEntityName
Returns a name of the associated entity -
getAction
Returns entity CRUD operation- Returns:
- entity CRUD operation
-
getBiPredicate
@Nullable public RowLevelBiPredicate<Object,org.springframework.context.ApplicationContext> getBiPredicate()Returns a predicate for in-memory row-level policy- Returns:
- a predicate
-
getScript
Returns a script for predicate for in-memory row-level policy- Returns:
- a script
-
getWhereClause
Returns "where" clause for JPQL policy- Returns:
- JPQL "where" clause
-
getJoinClause
Returns "join" clause for JPQL policy- Returns:
- JPQL "join" clause
-
getType
Returns row-level policy type. It may be in-memory predicate or JPQL policy- Returns:
- row-level policy type
-
getCustomProperties
-