Interface ConditionBuilder

All Known Implementing Classes:
ConditionBuilderImpl

public interface ConditionBuilder
A builder service that provides shortcuts for building conditions.
  • Method Details

    • create

      Node create(Condition c, EntityModel model)
      Allows to use the Condition api to build nodes useable for specifying conditions in acl rules.
    • forModel

      Function<Condition,Node> forModel(EntityModel model)
      Returns a function that builds condition nodes for the given entity model.
    • createExistsNodeForEntityModel

      Node createExistsNodeForEntityModel(EntityModel model, Optional<Node> condition)
      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 for
      condition - 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

      Node createExists(String path)
    • createExists

      Node createExists(String path, Optional<Node> condition)
    • createStringFieldCondition

      Node createStringFieldCondition(String fieldName, String value)
    • createPkFieldCondition

      Node createPkFieldCondition(PrimaryKey key)
      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

      Node createBooleanFieldCondition(String fieldName)
    • createAndNode

      AndNode createAndNode(Node... nodes)
    • createNotNode

      Node createNotNode(Node node)
    • createAndNode

      AndNode createAndNode(Iterable<Node> nodes)
    • createOrNode

      Node createOrNode(Node... nodes)