[
https://issues.apache.org/jira/browse/SLING-2541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13483043#comment-13483043
]
Carsten Ziegeler commented on SLING-2541:
-----------------------------------------
Another solution would be to use a marker property in the resource metadata:
e.g. if the fs resource provider resolves to a directory, it sets this flag in
the resource metadata.
If the resource resolver gets a resource where this flag is set, it continues
to search for a resource. If it finds another one, it returns that instead
(checks the flag again of course). If none is found, the original resource from
the fs resource provider is returned.
Question: Should we remove the flag from the metadata if the resource is
returned?
For the other use case I had in mind where resources are somehow merged, I
think this can't be solved in the general case and would require a special
resource provider doing this. So we should focus on the first use case only.
> General mechanism to chain resource providers
> ---------------------------------------------
>
> Key: SLING-2541
> URL: https://issues.apache.org/jira/browse/SLING-2541
> Project: Sling
> Issue Type: Bug
> Components: ResourceResolver
> Reporter: Carsten Ziegeler
> Assignee: Carsten Ziegeler
> Fix For: File System Resource Provider 1.0.4, Extensions
> Bundleresource 2.0.8, API 2.2.6, Resource Resolver 1.0.0
>
>
> Right now, the bundle resource and the fs resource "hard coded" test for a
> session and for a node in the repository, if the requested resource is a
> folder.
> I think we should generalize this and provide a mechanism for a resource
> provider to get a resource from a resource provider with a lower ranking.
> This would solve this use case but also allow a use case where a resource
> provider combines information from different resource providers, e.g. when
> the repository stores meta information about a file (just a rough thought)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira