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

angela



Reply via email to