public interface PersistenceSecurity extends Security
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONSTRAINT_PARAM_SESSION_ATTR |
static java.lang.String |
CONSTRAINT_PARAM_USER_GROUP_ID |
static java.lang.String |
CONSTRAINT_PARAM_USER_ID |
static java.lang.String |
CONSTRAINT_PARAM_USER_LOGIN |
static java.lang.String |
NAME |
Modifier and Type | Method and Description |
---|---|
void |
applyConstraints(java.util.Collection<Entity> entities)
Applies in-memory constraints to the entity fields by filtered data
|
void |
applyConstraints(Entity entity)
Applies in-memory constraints to the entity by filtered data
|
boolean |
applyConstraints(Query query)
Modifies the query depending on current user's security constraints.
|
void |
assertToken(Entity entity)
Validate that security token exists for specific cases.
|
void |
assertTokenForREST(Entity entity,
View view)
Validate that security token for REST exists for specific cases.
|
void |
calculateFilteredData(java.util.Collection<Entity> entities)
Calculate filtered data
|
void |
calculateFilteredData(Entity entity)
Calculate filtered data
|
boolean |
filterByConstraints(java.util.Collection<Entity> entities)
Filter entities in collection by in-memory constraints
|
boolean |
filterByConstraints(Entity entity)
Filter entity by in-memory constraints
|
void |
restoreFilteredData(Entity entity)
Restores filtered data from security token
|
void |
restoreSecurityState(Entity entity)
Reads security token and restores security state
|
default void |
restoreSecurityStateAndFilteredData(Entity entity)
Reads security token and restores security state and filtered data
|
void |
setQueryParam(Query query,
java.lang.String paramName)
Sets the query param to a value provided by user session (see constants above).
|
checkSpecificPermission, evaluateConstraintScript, hasConstraints, hasInMemoryConstraints, isEntityAttrPermitted, isEntityAttrPermitted, isEntityAttrReadPermitted, isEntityAttrReadPermitted, isEntityAttrUpdatePermitted, isEntityAttrUpdatePermitted, isEntityOpPermitted, isEntityOpPermitted, isPermitted, isPermitted, isScreenPermitted, isSpecificPermitted
static final java.lang.String NAME
static final java.lang.String CONSTRAINT_PARAM_SESSION_ATTR
static final java.lang.String CONSTRAINT_PARAM_USER_LOGIN
static final java.lang.String CONSTRAINT_PARAM_USER_ID
static final java.lang.String CONSTRAINT_PARAM_USER_GROUP_ID
boolean applyConstraints(Query query)
query
- query to modifyvoid setQueryParam(Query query, java.lang.String paramName)
query
- Query instanceparamName
- parameter to setvoid applyConstraints(Entity entity)
entity
- -void applyConstraints(java.util.Collection<Entity> entities)
entities
- - collection of entitiesboolean filterByConstraints(java.util.Collection<Entity> entities)
entities
- - collection of entities that will be filteredboolean filterByConstraints(Entity entity)
entity
- - entity that will be filteredvoid restoreSecurityState(Entity entity)
entity
- - entity to restore security statevoid restoreFilteredData(Entity entity)
entity
- - entity to restore filtered datadefault void restoreSecurityStateAndFilteredData(Entity entity)
entity
- - entity to restorevoid assertToken(Entity entity)
entity
- - entity to check security tokenvoid assertTokenForREST(Entity entity, View view)
entity
- - entity to check security tokenview
- - view for entityvoid calculateFilteredData(Entity entity)
entity
- for which will calculate filtered datavoid calculateFilteredData(java.util.Collection<Entity> entities)
entities
- - collection of entities for which will calculate filtered data