[ https://issues.apache.org/jira/browse/SLING-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13876572#comment-13876572 ]
Gilles Knobloch commented on SLING-2986: ---------------------------------------- Thanks for your feedback [~cziegeler]. I addressed all your comments. {quote} It would be greate if we can get rid of the API completely - it seems the service defined through the api is just used internally - or do you really have a use case where you want to merge a resource by hand? {quote} At one point, it was planned to have a resource merging service, https://github.com/gknob/sling-resourcemerger/issues/5 * merge(basePaths[], relativePath): provide a list of base paths and a relative path to those for resolving the resource and merging properties/nodes - already implemented * mergeResourceTypes(resourceType): provide a resource type, and iterate over its supertype to build the merged resource - TODO But as long as it's not required yet, I agree it's not needed. Tracked (and fixed) by https://github.com/gknob/sling-resourcemerger/issues/14 {quote} For the implementation, the MergedResource (or any resource implementation) should not implement listChildren directory, you have to implement listChildren in your ResourceProvider. The MergedResource inherits already the correct implementation. {quote} Tracked (and fixed) by https://github.com/gknob/sling-resourcemerger/issues/13 {quote} In addition you don't need the adapter factory, just override adaptTo in the MergedResource {quote} Tracked (and fixed) by https://github.com/gknob/sling-resourcemerger/issues/12 In case you'd like to merge it, should I send a full patch or is it OK to get the code from https://github.com/gknob/sling-resourcemerger? > 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.5#6160)