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

Align info.magnolia.jcr.nodebuilder.Ops with info.magnolia.nodebuilder.Ops AND javax.jcr

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Neutral Neutral
    • None
    • None
    • None
    • None

      The info.magnolia.nodebuilder.Ops class is based on our old Content-API.
      The info.magnolia.jcr.nodebuilder.Ops class is based on the javax.jcr API.

      However,

      • some operations have been ported with content-api-ness (e.g subtleties, to put it nicely, of our old content api), instead of matching the simpler, more predictable javax.jcr API
        • Ops.addNode(name) be consistent with the method of the same signature in javax.jcr.Node rather than reproduce our Content API smells) - just call context.addNode() without enforcing the type.
      • some operations have not been ported
        • setProperty with expected value (which is IMO very useful in update tasks)
        • copyNode (we kept moveNode but not copyNode ?)
        • onChildNodes (debatable, and might be better off in a different class altogether)
        • info.magnolia.nodebuilder.ContentOps - also debatable: these were not operations specific to the Content API but to "Content" as a general term (createParagraph, etc) - at the very least the deprecation message is wrong. Some of these could be useful, but I guess 1) they should be closer to the templating/rendering modules 2) they were an "idea" more than a real need - where the vision was maybe that other things could provide "Ops" (newDialog, etc)

        Acceptance criteria

              Unassigned Unassigned
              dlipp Daniel Lipp
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:

                  Bug DoR
                  Task DoD