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
            Jan Haderka
          2. ops.patch
            7 kB
            Jan Haderka
          3. Ops$1.class
            1 kB
            Jan Haderka
          4. Ops$10.class
            2 kB
            Jan Haderka
          5. Ops$11.class
            1 kB
            Jan Haderka
          6. Ops$12.class
            1 kB
            Jan Haderka
          7. Ops$13.class
            2 kB
            Jan Haderka
          8. Ops$14.class
            1.0 kB
            Jan Haderka
          9. Ops$2.class
            1 kB
            Jan Haderka
          10. Ops$3.class
            1 kB
            Jan Haderka
          11. Ops$4.class
            1 kB
            Jan Haderka
          12. Ops$5.class
            1.0 kB
            Jan Haderka
          13. Ops$6.class
            1 kB
            Jan Haderka
          14. Ops$7.class
            2 kB
            Jan Haderka
          15. Ops$8.class
            3 kB
            Jan Haderka
          16. Ops$9.class
            1 kB
            Jan Haderka
          17. Ops$AbstractOp.class
            0.4 kB
            Jan Haderka

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

                Created:
                Updated:
                Resolved:

                  Task DoD