jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alessandro Cosenza" <alessandro.cose...@itkey.it>
Subject Re: CND file and Node.addMixin questions
Date Wed, 28 Jan 2009 09:58:39 GMT
thanks stefan.
but now
i have 
[dms:document] > mix:accessControl
+ dms:content (dms:resource)

...

[dms:resource] > mix:versionable


when i create a node with dms:document type,
i have to initialize the mandatory properties inherited from
mix:accessControl, otherwise it throws an exception.
i see that mix:versionable has also some mandatory
properties not autocreated 
such as jcr:versionHistory and jcr:baseVersion, but when i
create the
dms:content child node i don't initialize them and it
doesnt't throw any exception! it's strange.
do you understand? please help me.
thanks

----- Original Message -----
Da : Stefan Guggisberg <stefan.guggisberg@gmail.com>
A : users@jackrabbit.apache.org
Oggetto : Re: CND file and Node.addMixin questions
Data : Wed, 28 Jan 2009 09:58:41 +0100

> 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