Interface ConditionBuilder
- All Known Implementing Classes:
ConditionBuilderImpl
public interface ConditionBuilder
A builder service that provides shortcuts for building conditions.
-
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.
-
Method Details
-
create
Allows to use theCondition
api to build nodes useable for specifying conditions in acl rules. -
forModel
Returns a function that builds condition nodes for the given entity model. -
createExistsNodeForEntityModel
Build an exists-node for a relation from a Folder/Resource to the desired entity model- Parameters:
model
- the related entity to build an exists node forcondition
- an optional condition for the exists clause- Returns:
- an exists node
-
createNotMailBoxFolderCondition
Node createNotMailBoxFolderCondition()- Returns:
- a condition checking that the Folder is not a mailbox folder
-
createNotMailBoxFolderResourceCondition
Node createNotMailBoxFolderResourceCondition()- Returns:
- a condition checking that the Resource is not in a mailbox folder
-
createPublishedResourceCondition
Node createPublishedResourceCondition()- Returns:
- a condition checking that the Resource is published (or changed).
-
createExists
-
createExists
-
createStringFieldCondition
-
createPkFieldCondition
Build a condition `pk == [key]`. This method only works for entities with single-column primary keys named 'pk'- Parameters:
key
- the key to test for- Returns:
- a condition node
-
createBooleanFieldCondition
-
createAndNode
-
createNotNode
-
createAndNode
-
createOrNode
-