You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (Updated) (JIRA)" <ji...@apache.org> on 2011/12/02 13:01:41 UTC
[jira] [Updated] (SLING-1081) fsresource: allow to adapt to
ValueMap
[ https://issues.apache.org/jira/browse/SLING-1081?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Seifert updated SLING-1081:
----------------------------------
Attachment: 111202_SLING-1081_fsresource_valuemap.patch
i think as well that there is not an urgent need for a generic adapter factory returning value maps for resources that do not provide one for themselves.
but coming back to the initial cause of this ticket: i think it still would be a good idea to return a valid value map specific for the resource provider. the FsResource class "simulates" a JCR node by returning a resource type "nt:file" / "nt:folder" already. in this case it should the same properties as value maps as the jcr resource provider.
i've attached an updated patch: 111202_SLING-1081_fsresource_valuemap.patch
> fsresource: allow to adapt to ValueMap
> --------------------------------------
>
> Key: SLING-1081
> URL: https://issues.apache.org/jira/browse/SLING-1081
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Stefan Seifert
> Attachments: 090812_SLING-1081_fsresource_valuemap.patch, 111202_SLING-1081_fsresource_valuemap.patch
>
>
> the fsresource provider is used often to map a maven bundle project in the sling instance allowing to see changes in file without redeployment of the bundle.
> some sling applications accessing such resources always assume they are reading from JCR and try to adapt the resource to a ValueMap, which returns null for fsresources.
> this is of course a bug in this "some applications", but because fsresource is often used in such a scenario it would be helpful to support a simple adapting to ValueMap in the FsResource class.
> patch attached.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira