[
https://issues.apache.org/jira/browse/SLING-395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Felix Meschberger closed SLING-395.
-----------------------------------
Resolution: Fixed
Implemented in Rev. 652385.
To get the properties of a resource's node you now may adaptTo(Map.class) and
get a map of property values, where the indices are of course the property
names and the values are the property values converted to Java Objects. In case
of multi-value properties, the values are converted into arrays of Java objects.
> Provide properties of JCR Nodes underlying Resources as Map
> -----------------------------------------------------------
>
> Key: SLING-395
> URL: https://issues.apache.org/jira/browse/SLING-395
> Project: Sling
> Issue Type: New Feature
> Components: Repository, Resource
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: 2.0.0
>
>
> It would be helpful to provide the properties of JCR nodes underlying
> Resources as Map instances through the adaptTo method:
> @SuppressWarnings("checked")
> Map<String, Object> properties = resource.adaptTo(Map.class);
> For JCR Node based resource instances, this would return a map of the
> property values:
> * The map is read-only
> * Properties are accessed on-demand
> * Property values are converted to Java Objects according to JCR-170
> * Multiple property values are converted to arrays of Java Objects
> I am scheduling this for the 2.0 release, because I have the code ready for
> checkin, but have to wait for SVN to be writable again.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.