You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2008/09/19 17:04:44 UTC
[jira] Closed: (SLING-557) Improve Map support for JCR Node based
Resources
[ https://issues.apache.org/jira/browse/SLING-557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger closed SLING-557.
-----------------------------------
Resolution: Fixed
Added unit tests in Rev. 697121. So this can be closed.
> Improve Map support for JCR Node based Resources
> ------------------------------------------------
>
> Key: SLING-557
> URL: https://issues.apache.org/jira/browse/SLING-557
> Project: Sling
> Issue Type: Improvement
> Components: JCR Resource
> Affects Versions: JCR Resource 2.0.2, Scripting API 2.0.2
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: JCR Resource 2.0.4
>
>
> SLING-395 added support for adapting a JCR-Node based resource to a Map. This first implementation converts property values to their Java equivalent as per the JSR-170 specification.
> As the JCR Value interface also allows on-the-fly conversion of values, it would be helpfull for the Map adapter to also support this kind of on-the-fly conversion. See also the discussion on [1]
> This issue will introduce a new interface to the Sling API:
> package org.apache.sling.api.resource;
> public interface ValueMap extends Map<String, Object> {
> // returns the named value or null if not existing
> @Overwrite
> Object get(String name);
> // return named value converted to type T or
> // null if not existing
> <T> T get(String name, Class<T> type);
> // return named value converted to the type T of
> // the default value or the default value if the
> // named value does not exist
> <T> T get(String name, T defaultValue);
> }
> This interface will be implemented for JCR-Node based Resources
> [1] http://markmail.org/message/ouyvit4rpnzlgy4a
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.