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/11/09 16:54:44 UTC

[jira] Updated: (SLING-724) The API of the Resource Wrapper of the Rhino integration does not reflect the actual Resource interface

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

Felix Meschberger updated SLING-724:
------------------------------------

    Description: 
The scripting/javascript module provides a Rhino JavaScript wrapper class for the Resource interface making it easier to be used in JavaScript scripts. Unfortunately this wrapper has slight differences in  API to the actual Resource interface:

String getPath();
Mapped to path property and getPath() method. Correct.

String getResourceType();
Mapped to type property and getResourceType() method. Method is correct, but property should be called resourceType.

String getResourceSuperType();
Missing in the wrapper.

ResourceMetadata getResourceMetadata();
Mapped to meta property and getMetadata methods. Should map to resourceMetadata property and getResourceMetadata method.

ResourceResolver getResourceResolver();
Mapped to resourceResolver property and getResourceResolver() method. Correct.

<AdapterType> AdapterType adaptTo(Class<AdapterType> type);
Mapped to adaptTo method. Correct.

Will add missing mappings. Existing "wrong" mappings are being kept for backwards compatibility but documented to be deprecated. We will probably just keep these wrong mappings since they don't hurt here. In the future, we might log a message to the log about an deprecated method/property being used.

  was:
The scripting/javascript module provides a Rhino JavaScript wrapper class for the Resource interface making it easier to be used in JavaScript scripts. Unfortunately this wrapper has slight differences in  API to the actual Resource interface:

String getPath();
Mapped to path property and getPath() method. Correct.

String getResourceType();
Mapped to type property and getResourceType() method. Method is correct, but property should be called resourceType.

String getResourceSuperType();
Missing in the wrapper.

ResourceMetadata getResourceMetadata();
Mapped to meta property and getMetadata methods. Should map to resourceMetadata property and getResourceMetadata method.

ResourceResolver getResourceResolver();
Mapped to resourceResolver property and getResourceResolver() method. Correct.


> The API of the Resource Wrapper of the Rhino integration does not reflect the actual Resource interface
> -------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-724
>                 URL: https://issues.apache.org/jira/browse/SLING-724
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting JavaScript (Rhino)
>    Affects Versions: Scripting JavaScript 2.0.2
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For:  Scripting JavaScript 2.1.0
>
>
> The scripting/javascript module provides a Rhino JavaScript wrapper class for the Resource interface making it easier to be used in JavaScript scripts. Unfortunately this wrapper has slight differences in  API to the actual Resource interface:
> String getPath();
> Mapped to path property and getPath() method. Correct.
> String getResourceType();
> Mapped to type property and getResourceType() method. Method is correct, but property should be called resourceType.
> String getResourceSuperType();
> Missing in the wrapper.
> ResourceMetadata getResourceMetadata();
> Mapped to meta property and getMetadata methods. Should map to resourceMetadata property and getResourceMetadata method.
> ResourceResolver getResourceResolver();
> Mapped to resourceResolver property and getResourceResolver() method. Correct.
> <AdapterType> AdapterType adaptTo(Class<AdapterType> type);
> Mapped to adaptTo method. Correct.
> Will add missing mappings. Existing "wrong" mappings are being kept for backwards compatibility but documented to be deprecated. We will probably just keep these wrong mappings since they don't hurt here. In the future, we might log a message to the log about an deprecated method/property being used.

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