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

Felix Meschberger closed SLING-724.
-----------------------------------

    Resolution: Fixed

Implemented the missing mappings and marked wrong mappings as deprecated in 
Rev. 712512. Also added new unit tests for the method/property mappings.

> 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.

Reply via email to