Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EAK-396] Implement merge mode when storing autogenerated content into a package #396

Open
smiakchilo opened this issue Sep 20, 2022 · 0 comments
Labels
AEM AEM-specific competencies are involved

Comments

@smiakchilo
Copy link
Collaborator

smiakchilo commented Sep 20, 2022

EToolbox Authoring Kit plugin operates in two modes regarding the content of a package:

  1. WriteMode.OPEN: searches for the folder of a component; if found, removes all the .XML files from it and instead stores the autogenerated xml-s, such as _cq_dialog.xml. If folder is not found, an exception is thrown (default);
  2. WriteMode.CREATE: searches for the folder of a component; if found, does the same as (1); otherwise, creates the folder.

Per users' request, we need the merge mode. This one

  • will work generally the same as (1);
  • but the XML-s found already in the package won't be wiped;
  • if an XML file is found with the same name as the file that the Plugin intends to write (e.g., _cq_dialog.xml):
    • this file is read into memory;
    • the autogenerated file is stored;
    • the previous file is merged onto the autogenerated one, node-per-node and attribute per attribute (this will help to implement a "monkey patch" of the autogenerated XML if user is lacking some feature)
@smiakchilo smiakchilo added the AEM AEM-specific competencies are involved label Apr 2, 2023
@smiakchilo smiakchilo reopened this Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AEM AEM-specific competencies are involved
Projects
Development

No branches or pull requests

1 participant