[MAGNOLIA-1641] Improve support for import/export in .properties format Created: 25/Jul/07  Updated: 04/Nov/15  Resolved: 04/Nov/15

Status: Closed
Project: Magnolia
Component/s: core, testing
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Won't Do Votes: 0
Labels: export, import, testing
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MAGNOLIA-2970 Allow dumping of JCR nodes (from any ... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MAGNOLIA-2970 Allow dumping of JCR nodes (from any ... Sub-task 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)
Date of First Response:

 Description   

We currently have some level of support for importing/exporting nodes in a Java .properties format. It's mostly used (and useful) in tests.

This might be redundant with the NodeBuilder API. Let's decide on this and update this issue.

Below is a proposal to make this format more consistent. (I now prefer a /path/to/node.property syntax, but there was probably a reason for which we decided against it, maybe simply to help support dots in node names)

-See TODOs in MockUtil : we should make the "properties" format used to create MockHierarchyManagers simpler (there are currently several inconsistent ways of creating node properties for instance)-

After a quick discussion, we came up with the following syntax. We tried to be consistent, non-intrusive and non-ambiguous.

/path/to/node@                      create empty node if it does not exist - default type if not specified via other line, unspecified UUID if not specified via other line
/path/to/node@uuid=some-uuid        specifies UUID - create empty node if it does not exist, default type if not specified via other line
/path/to/node@type=foo:bar          specifies NT - create empty node if it does not exist, unspecified UUID if not specified via other property
/path/to/node/property=value        default property type - create node if it does not exist - default node type if not specified
/path/to/node/property#date=value   specified property type and conversion - create node if it does not exist - default node type if not specified
/path/to/node/property#string=      empty string property - create node if it does not exist - default node type if not specified
/path/to/node/property#             empty string property - create node if it does not exist - default node type if not specified

We'll have to cleanup our current tests, obviously, but since this is not something that will affect running systems (only poor developers who decide to switch their dev project to 4.3), we'll drop the support for the old syntax right away.



 Comments   
Comment by Michael Mühlebach [ 04/Nov/15 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

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