jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OAK-84) Delegates for Session, Node, Property and Item
Date Thu, 03 May 2012 18:08:51 GMT

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

Jukka Zitting updated OAK-84:
-----------------------------

    Attachment: 0001-OAK-84-Delegates-for-Session-Node-Property-and-Item.patch

Re: revision 1333500.

Item.getDepth() is already implemented in the AbstractItem class of jcr-commons. I suggest
we reuse that code unless there are valid performance or other reasons why a separate implementation
in oak-jcr is needed.

The attached patch makes ItemImpl extend AbstractItem and removes the getDepth() and getAncestor()
methods that we then get for free from jcr-commons.
                
> Delegates for Session, Node, Property and Item
> ----------------------------------------------
>
>                 Key: OAK-84
>                 URL: https://issues.apache.org/jira/browse/OAK-84
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: jcr
>            Reporter: Michael Dürig
>         Attachments: 0001-OAK-84-Delegates-for-Session-Node-Property-and-Item.patch
>
>
> Instead of passing around Nodes internally and casting them down to NodeImpl we should
use the façade pattern and delegate from NodeImpl back to an implementation class which is
used internally. This also avoids the problem of API clients accessing stuff they shouldn't
by casting to the implementation. 
> Some initial work has been done already. What's left to do it: 
> * Push down as much as possible from ItemImpl, NodeImpl and PropertyImpl to the respective
delegate classes
> * Introduce the same pattern for SessionImpl and do away with SessionContext. 

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

       

Mime
View raw message