[MAGNOLIA-5797] Align info.magnolia.jcr.nodebuilder.Ops with info.magnolia.nodebuilder.Ops AND javax.jcr Created: 30/May/14  Updated: 04/Mar/19

Status: Open
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Daniel Lipp Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MAGNOLIA-7100 New JCR nodebuilder API's addProperty... Closed
relation
is related to MAGNOLIA-5783 Provide replacements for info.magnoli... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

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)


 Comments   
Comment by Magnolia International [ 30/May/14 ]

Started branch MAGNOLIA-5797-JCRNodeBuilderOps with a patch leftover from MAGNOLIA-5783

Generated at Mon Feb 12 04:08:28 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.