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 10:47:11 GMT
On Wed, Jan 28, 2009 at 11:39 AM, Alessandro Cosenza
<alessandro.cosenza@itkey.it> wrote:
> ok thanks, i thought that due to these mandatory but not
> autocreated
> properties in mix:versionable somewhere i had to initialize
> these properties.

those properties are maintained by the repository. that's why they're
'protected',
i.e. you can't manipulate them directly through the api.

for more information please see "6.7 Node Types" in the jsr 170 specification.

cheers
stefan

> thanks.
>
> ----- Original Message -----
> Da : Alexander Klimetschek <aklimets@day.com>
> A : users@jackrabbit.apache.org
> Oggetto : Re: CND file and Node.addMixin questions
> Data : Wed, 28 Jan 2009 11:34:59 +0100
>
>> On Wed, Jan 28, 2009 at 10:58 AM, Alessandro Cosenza
>> <alessandro.cosenza@itkey.it> wrote:
>> > 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.
>>
>> mix:versionable is kind of a "marker" type that is handled
>> automatically by the repository, therefore you don't have
>> to manually handle with jcr:versionHistory and co (Version
>> and VersionHistory interfaces are built-in to the JCR
>> API).
>>
>> mix:accessControl on the other hand is not automatically
>> handled by the repository, so you have to add the
>> properties / child nodes for it manually.
>>
>> Regards,
>> Alex
>>
>> --
>> Alexander Klimetschek
>> alexander.klimetschek@day.com
>

Mime
View raw message