jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Bocanegra <tri...@day.com>
Subject Re: Simplify NodeImpl
Date Tue, 14 Apr 2009 09:44:28 GMT
On Tue, Apr 14, 2009 at 9:48 AM, Alexander Klimetschek <aklimets@day.com> wrote:
> On Sun, Apr 12, 2009 at 3:36 PM, Tobias Bocanegra
> <tobias.bocanegra@day.com> wrote:
>> hi all,
>> i'm currently looking at the versioning API of  jsr283. there is a new
>> VersionManager introduced that provides all versioning related methods
>> and those on javax.jcr.Node are deprecated. i want to use this as an
>> occasion to (re)move the versioning methods in NodeImpl.
>> basically there are 2 possibilities:
>> a) either move them to the version manager
>> b) or move them to a new class that extends NodeImpl, for example
>> VersionableNodeImpl.
>> the first (a) would align more with the JCR api, the latter (b) would
>> be more object oriented. personally i prefer a VersionableNodeImpl
>> solution, since most of the operations need access to protected
>> methods on NodeImpl anyways. however, it also has the drawback, that
>> for each new instance of NodeImpl, the item manager needs to check if
>> the node is mix:versionable and then create a different
>> implementation. this check is currently relative expensive, because
>> the effective node type is not calculated at this point.
> And if one adds mix:versionable to an existing node, the NodeImpl in
> the hand of the client has to be "transformed" into a
> VersionableNodeImpl. I'd favor (b) as well, but I think it introduces
> too much problems.

> What does deprecated mean for Jackrabbit anyway? Shall these methods
> continue to work as before until the next (minor) release to give
> users a chance to smoothly upgrade? Or does JSR-283 enforce something
> like an UnsupportedOperationExeception for them?
deprecated means, that they might be removed for jcr3.0.

maybe it would really make more sense to move the versioning
operations to the version manager, since most of them are workspace
operations anyways and should not use the transient space at all. in
this respect, removing them from the item instance is valid and

regards, toby

View raw message