jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Commented] (OAK-221) Clarify nature of 'path' parameter in oak-api
Date Wed, 15 Aug 2012 16:57:38 GMT

    [ https://issues.apache.org/jira/browse/OAK-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435295#comment-13435295

Michael Dürig commented on OAK-221:

To clarify further: {{Tree.getPath()}} returns an absolute path (All paths are absolute in
oak-core). The leading slash is just not significant and left out so it *looks* like a relative
path. I agree that this is confusing and we should clean it up. Best thing to do IMO is to
require all paths in oak-core to start with a slash and update all relevant code accordingly.

> Clarify nature of 'path' parameter in oak-api
> ---------------------------------------------
>                 Key: OAK-221
>                 URL: https://issues.apache.org/jira/browse/OAK-221
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>            Reporter: angela
> imo the oak-api should be more specific about the nature of the
> path parameter that is passed to methods like Root#getTree, #move, #copy
> and that is returned by methods like Tree#getPath.
> The api documentation consistently states that those paths are "relative to
> the 'root' but when looking at the code i rather get the impression that
> they are absolute paths such as defined by the JCR API.
> for example:
> SessionDelegate#getNode(String path) just passes the path to the oak-api
> without making it 'relative to the root'. 
> on the other hand SessionDelegate#getRoot() passes an ""-path to Root#getTree.
> another example:
> SessionDelegate#getNodeByIdentifier starts like follows:
>   if (id.startsWith("/")) {
>      Tree tree = getTree(id);
>      [...]
> so, again the absolute jcr path is passed into the oak-api.
> requested action:
> - clarify oak-api
> - check all usages of oak-api and make api calls consistent

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message