Class ConditionBuilderImpl
java.lang.Object
ch.tocco.nice2.dms.impl.security.policyprocessor.ConditionBuilderImpl
- All Implemented Interfaces:
ConditionBuilder
-
Constructor Summary
ConstructorDescriptionConditionBuilderImpl
(EntityDocumentsService entityDocumentsService, TypeManager typeManager) -
Method Summary
Modifier and TypeMethodDescriptioncreate
(Condition c, EntityModel model) Allows to use theCondition
api to build nodes useable for specifying conditions in acl rules.createAndNode
(Node... nodes) createAndNode
(Iterable<Node> nodes) createBooleanFieldCondition
(String fieldName) createExists
(String path) createExists
(String path, Optional<Node> condition) createExistsNodeForEntityModel
(EntityModel model, Optional<Node> condition) Build an exists-node for a relation from a Folder/Resource to the desired entity modelcreateNotNode
(Node node) createOrNode
(Node... nodes) Build a condition `pk == [key]`.createStringFieldCondition
(String fieldName, String value) forModel
(EntityModel model) Returns a function that builds condition nodes for the given entity model.
-
Constructor Details
-
ConditionBuilderImpl
-
-
Method Details
-
create
Description copied from interface:ConditionBuilder
Allows to use theCondition
api to build nodes useable for specifying conditions in acl rules.- Specified by:
create
in interfaceConditionBuilder
-
forModel
Description copied from interface:ConditionBuilder
Returns a function that builds condition nodes for the given entity model.- Specified by:
forModel
in interfaceConditionBuilder
-
createExistsNodeForEntityModel
Description copied from interface:ConditionBuilder
Build an exists-node for a relation from a Folder/Resource to the desired entity model- Specified by:
createExistsNodeForEntityModel
in interfaceConditionBuilder
- Parameters:
model
- the related entity to build an exists node forcondition
- an optional condition for the exists clause- Returns:
- an exists node
-
createNotMailBoxFolderCondition
- Specified by:
createNotMailBoxFolderCondition
in interfaceConditionBuilder
- Returns:
- a condition checking that the Folder is not a mailbox folder
-
createNotMailBoxFolderResourceCondition
- Specified by:
createNotMailBoxFolderResourceCondition
in interfaceConditionBuilder
- Returns:
- a condition checking that the Resource is not in a mailbox folder
-
createPublishedResourceCondition
- Specified by:
createPublishedResourceCondition
in interfaceConditionBuilder
- Returns:
- a condition checking that the Resource is published (or changed).
-
createExists
- Specified by:
createExists
in interfaceConditionBuilder
-
createExists
- Specified by:
createExists
in interfaceConditionBuilder
-
createStringFieldCondition
- Specified by:
createStringFieldCondition
in interfaceConditionBuilder
-
createPkFieldCondition
Description copied from interface:ConditionBuilder
Build a condition `pk == [key]`. This method only works for entities with single-column primary keys named 'pk'- Specified by:
createPkFieldCondition
in interfaceConditionBuilder
- Parameters:
key
- the key to test for- Returns:
- a condition node
-
createBooleanFieldCondition
- Specified by:
createBooleanFieldCondition
in interfaceConditionBuilder
-
createAndNode
- Specified by:
createAndNode
in interfaceConditionBuilder
-
createAndNode
- Specified by:
createAndNode
in interfaceConditionBuilder
-
createOrNode
- Specified by:
createOrNode
in interfaceConditionBuilder
-
createNotNode
- Specified by:
createNotNode
in interfaceConditionBuilder
-