Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5935

Extra Ops for NodeBuilder

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 5.3.4
    • None
    • None
    • Yes

      When using NodeBuilder to create more complex structures some extra ops come handy

      • getOrAddNode(String boolean) - optionally creates new node(s) if they do not exist. Helps to create more flexible script in uncertain parent structure.
      • IfTrue(boolean flag) - executes operations specified in .then(...) only if provided parameter is true. Helps to add "optional" subtasks based on externally defined flags.
      • conditional(Predicate predicate, Op true, Op false) - ops delivering "parent" to nodes in .then(...) only when predicate evaluates current node as true or false.
      • onEachChild(Predicate predicate) - ops in .then(...) will be executed on each child that is evaluated true by the predicate. Allows to build subtasks that need to be executed on uncertain number of subnodes of current node.

        Acceptance criteria

          1. Ops.class
            4 kB
          2. ops.patch
            7 kB
          3. Ops$1.class
            1 kB
          4. Ops$10.class
            2 kB
          5. Ops$11.class
            1 kB
          6. Ops$12.class
            1 kB
          7. Ops$13.class
            2 kB
          8. Ops$14.class
            1.0 kB
          9. Ops$2.class
            1 kB
          10. Ops$3.class
            1 kB
          11. Ops$4.class
            1 kB
          12. Ops$5.class
            1.0 kB
          13. Ops$6.class
            1 kB
          14. Ops$7.class
            2 kB
          15. Ops$8.class
            3 kB
          16. Ops$9.class
            1 kB
          17. Ops$AbstractOp.class
            0.4 kB

              had Jan Haderka
              had Jan Haderka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD