jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: properties on collections
Date Thu, 07 Feb 2008 09:48:42 GMT
hi roland

> I had to add mix:versionable to nt:file to get the rfc 32553 (versioning
> extensions) to work.

> Is there a better way of doing that?

i'd say so.
actually i had the impression that according to rfc 3253
the VERSION_CONTROL request is used to put a resource
under version control... what i does internally (or at
least what it is expected to do: add mix:versionable
to the node representing the requested resource).

if i'm missing something or if you simply want your
resources to be version-controlled by default you
may do:

variant a)
mixin types can be added to a node on demand by
calling Node.addMixin.
if you want your nt:file nodes to be versionable
without having to make an VERSION_CONTROL request,
you may modify the DefaultHandler (or create your
own extension) that by default calls Node.addMixin("mix:versionable")
after creating the nt:file node.

variant b)
create a custom nodetype that extends from both
nt:file and mix:versionable. and use this one as non-collection
nodetype instead of nt:file.

i would prefer variant a) as long as that is the
only extension you need. if you really have the
need for a 'real' custom nodetype, i would choose b).


View raw message