jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "angela (JIRA)" <j...@apache.org>
Subject [jira] [Created] (JCR-3505) Naming consistency in QueryEngine#getRootTree
Date Wed, 30 Jan 2013 11:23:12 GMT
angela created JCR-3505:
---------------------------

             Summary: Naming consistency in QueryEngine#getRootTree
                 Key: JCR-3505
                 URL: https://issues.apache.org/jira/browse/JCR-3505
             Project: Jackrabbit Content Repository
          Issue Type: Improvement
            Reporter: angela


it feels a bit awkward to me that the abstract method getRootTree on QueryEngineImpl returns
a Root object and not a Tree.

i had a quick look and it turned out that it is only used for accessing tree instances...

so i would suggest to either

- rename method to getRoot() and leave the code otherwise unchanged.
- keep the name but change the signature to return Tree and then adjust the usages accordingly.
  currently it is only used upon calling Query#setRootTree which would need in this case to
  be changed to Tree as well... the lookup of other trees by path would in this case no longer
  work with Root#getTree(absPath) but rather be rootTree.getLocation().getTree(relPath).getTree().
  permissions wise the outcome would be the same.

i came across this while trying to obtain a query engine in the permission validator provider
which due to the current usage and definition of validatorprovider#getRootProvider doesn't
have access to the root at all.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message