jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: CND file and Node.addMixin questions
Date Wed, 28 Jan 2009 08:58:41 GMT
hi alessandro

On Tue, Jan 27, 2009 at 3:56 PM, Alessandro Cosenza
<alessandro.cosenza@itkey.it> wrote:
> hi
> my cnd file contains a nodetype definition
> [dms:document] > mix:versionable
>
> when i create a node
> addedNode = parent.addNode("document","dms:document");
> the versionable mixin type is added immediately or
> i have to call addedNode.addMixin("mix:versionable") ?

since the primary type dms:document already extends mix:versionable,
there's no need to add that mixin explicitly by caling addMixin.

>
> another question, could i add another mixin type to a node
> which is not specified in cnd file?
> for example addedNode.addMixin("mix:lockable") ?

sure. mix:lockable is a predefined built-in node type.
please note that the cnd file is just a format for specifying
custom node types. it does not directly relate to the available,
i.e. registered node types.

cheers
stefan

>
> thanks
>
>
>

Mime
View raw message