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/06/25 11:40:45 UTC
[jira] Created: (SLING-557) Improve Map support for JCR Node based
Resources
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: Scripting API 2.0.2, JCR Resource 2.0.2
Reporter: Felix Meschberger
Assignee: Felix Meschberger
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.
[jira] Commented: (SLING-557) Improve Map support for JCR Node
based Resources
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610201#action_12610201 ]
Felix Meschberger commented on SLING-557:
-----------------------------------------
Defined ValueMap interface in Sling API and implementation for node based resources in Rev. 673658.
Not closing this issue yet as unit tests for this should be added.
> 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
>
> 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.
[jira] Updated: (SLING-557) Improve Map support for JCR Node based
Resources
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler updated SLING-557:
-----------------------------------
Fix Version/s: JCR Resource 2.0.4
> 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.
[jira] Closed: (SLING-557) Improve Map support for JCR Node based
Resources
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ 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.