Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-221

Clarify nature of 'path' parameter in oak-api

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.5
    • core
    • None

    Description

      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

      Attachments

        Activity

          People

            mduerig Michael Dürig
            angela Angela Schreiber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: