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 2007/12/03 15:39:43 UTC

[jira] Closed: (SLING-109) Replace Resource.getRawData and .getObject methods by better API

     [ https://issues.apache.org/jira/browse/SLING-109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed SLING-109.
-----------------------------------

    Resolution: Fixed

Adapted now microsling and Sling to the new adapter model, which seems to be accepted.

Therefore closing this issue.

> Replace Resource.getRawData and .getObject methods by better API
> ----------------------------------------------------------------
>
>                 Key: SLING-109
>                 URL: https://issues.apache.org/jira/browse/SLING-109
>             Project: Sling
>          Issue Type: Improvement
>          Components: API
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> David brought up an issue on the dev list [1] regarding the Resource.getRawData() method. In short, David suggests to replace the getRawData method with a signature, which more closely reflects the definition of Sling as a web application framework for JCR. The general consesus on the list is that the getRawData() method is badly named and that we should have a method which shows the JCR integration yet does not tie the API too much into JCR.
> So I propose the following:
>   > Remove the getRawData() and getObject() methods from the Resource interface
>   > Add new interfaces NodeResource and ObjectResource:
>     // resources backed by JCR nodes
>     public interface NodeResource extends Resource {
>         Node getNode();
>     }
>     // resources mapped using JCR OCM for example
>     public interface ObjectResource extends Resource {
>         Object getObject();
>     }
> This way, we have the Resource interfaces completely storage-agnostic and provide for a wide range of extensions, such as an URLResource, which may be backed by a URL such as an entry in an OSGi bundle.
> [1] http://www.mail-archive.com/sling-dev@incubator.apache.org/msg00906.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.