[ https://issues.apache.org/jira/browse/SLING-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13802834#comment-13802834 ]
Gilles Knobloch commented on SLING-2986: ---------------------------------------- [~cziegeler], just realized I didn't answer your first questions. On why introducting a new API: * Where I am using it (outside of that package), I need to know if the resource is a "real" resource or a merged one, reason for {{org.apache.sling.resourcemerger.api.MergedResource}} * The constants of {{org.apache.sling.resourcemerger.api.MergedResourceConstants}} could stay private. On the other hand, people overriding resources anyway need to know which properties to use to achieve it, so why hiding them? * The service is aimed to be extended and available through OSGi references in JSPs, other classes, etc. Could we at least agree on the main concepts? # How to add/override a property ** Create the corresponding property within {{/apps}} (the property will have priority based on Sling Resource Resolver configuration) ** Changing the type of the property is supported # How to delete one or more properties ** Create the corresponding node within {{/apps}}, and set {{sling:hideProperties}} to the list of properties to delete ({{String[]}}) ** {{*}} can be used to delete all the properties # How to delete a node (and its children) ** Create the corresponding node within {{/apps}}, and set {{sling:hideResource}} to {{true}} ({{Boolean}}) # How to delete children of a node (but keep the properties of the node) ** Create the corresponding node within {{/apps}}, and set {{sling:hideChildren}} to {{true}} ({{Boolean}}) # How to reorder nodes ** Create the corresponding node within {{/apps}}, and set {{sling:orderBefore}} to the name of the sibling where that node should be reordered before ({{String}}) ** TODO: support redefining the whole list of children > Merged Resource Provider > ------------------------ > > Key: SLING-2986 > URL: https://issues.apache.org/jira/browse/SLING-2986 > Project: Sling > Issue Type: New Feature > Components: ResourceResolver > Reporter: Gilles Knobloch > > As exchanged once with Felix Meschberger, the idea is to implement a custom > resource provider, with ability to merge multiple resources based on your > search paths. > For instance, if your search paths are > /apps > /libs > Hitting /merge/my/resource/is/here will check > /apps/my/resource/is/here > /libs/my/resource/is/here > There are some options like: > - add/override property > - delete a property of the resource under /libs > - reorder nodes if available > I intend to submit this patch as soon as possible. > Code is currently located at https://github.com/gknob/sling-resourcemerger -- This message was sent by Atlassian JIRA (v6.1#6144)