jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Simplify NodeImpl
Date Tue, 14 Apr 2009 07:48:47 GMT
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?

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message