You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Paul Skinner <sh...@hotmail.com> on 2009/09/01 09:26:21 UTC
RE: Unable to import content using mixins
Hi stefan,
I meant that the cnd file to generate the custom_nodes.xml contained, for example, the following snippet, but the mixin (MyPrefix:MyMixin) was not used by the node type definition (MyPrefix:MyNodeType) at this stage.
[MyPrefix:MyMixin] > nt:base
mixin
- 'MyPrefix:Name' (String)
mandatory copy
[MyPrefix:MyNodeType] > nt:base, mix:lockable, mix:referenceable, mix:versionable
- 'MyPrefix:Description' (String)
version
+ * (MyPrefix:MyChild)
= MyPrefix:MyChild
copy
Instead it was used at runtime using, as you say, Node.addMixin(String) followed by session.save(), sorry for not making that clear initially.
I initially mentioned this in case it had any bearing on the problem of the mixin not being recognized by the importer.
> Date: Mon, 31 Aug 2009 11:23:10 +0200
> Subject: Re: Unable to import content using mixins
> From: stefan.guggisberg@gmail.com
> To: users@jackrabbit.apache.org
>
> On Fri, Aug 28, 2009 at 4:07 PM, Paul
> Skinner<sh...@hotmail.com> wrote:
> >
> > Hi,
> >
> > The version of JackRabbit is the released version of 1.6.0
> > I have not tried the workspace importXML.
> > It is the same system used and there are no changes to the node types between export and import.
> >
> > It is probably worth mentioning that the mixins were all added to the nodes at runtime, and are therefore not actually specified within the node type definitions.
>
> what do you mean by "not actually specified within the node type definitions"?
>
> all node types need to be registered beforehand once.
>
> if you add a mixin by calling Node.addMixin(String), you have to call
> save() in order to persist the change.
>
> if you can provide a simple test case (.cnd file with your custom node
> types and a java test case) i'll have a look.
>
> cheers
> stefan
_________________________________________________________________
Use Hotmail to send and receive mail from your different email accounts.
http://clk.atdmt.com/UKM/go/167688463/direct/01/
Re: Unable to import content using mixins
Posted by Stefan Guggisberg <st...@gmail.com>.
hi paul
On Tue, Sep 1, 2009 at 9:26 AM, Paul Skinner<sh...@hotmail.com> wrote:
>
> Hi stefan,
>
> I meant that the cnd file to generate the custom_nodes.xml contained, for example, the following snippet, but the mixin (MyPrefix:MyMixin) was not used by the node type definition (MyPrefix:MyNodeType) at this stage.
>
> [MyPrefix:MyMixin] > nt:base
> mixin
> - 'MyPrefix:Name' (String)
> mandatory copy
>
> [MyPrefix:MyNodeType] > nt:base, mix:lockable, mix:referenceable, mix:versionable
> - 'MyPrefix:Description' (String)
> version
> + * (MyPrefix:MyChild)
> = MyPrefix:MyChild
> copy
>
> Instead it was used at runtime using, as you say, Node.addMixin(String) followed by session.save(), sorry for not making that clear initially.
no problem, thanks for the clarification.
i ran a quick test using your node types. everything worked as expected.
if you can reproduce the issue please create a jira issue and provide a
simple test case which demonstrates the problem. i'll then further investigate.
cheers
stefan
>
> I initially mentioned this in case it had any bearing on the problem of the mixin not being recognized by the importer.
>
>
>> Date: Mon, 31 Aug 2009 11:23:10 +0200
>> Subject: Re: Unable to import content using mixins
>> From: stefan.guggisberg@gmail.com
>> To: users@jackrabbit.apache.org
>>
>> On Fri, Aug 28, 2009 at 4:07 PM, Paul
>> Skinner<sh...@hotmail.com> wrote:
>> >
>> > Hi,
>> >
>> > The version of JackRabbit is the released version of 1.6.0
>> > I have not tried the workspace importXML.
>> > It is the same system used and there are no changes to the node types between export and import.
>> >
>> > It is probably worth mentioning that the mixins were all added to the nodes at runtime, and are therefore not actually specified within the node type definitions.
>>
>> what do you mean by "not actually specified within the node type definitions"?
>>
>> all node types need to be registered beforehand once.
>>
>> if you add a mixin by calling Node.addMixin(String), you have to call
>> save() in order to persist the change.
>>
>> if you can provide a simple test case (.cnd file with your custom node
>> types and a java test case) i'll have a look.
>>
>> cheers
>> stefan
>
>
> _________________________________________________________________
> Use Hotmail to send and receive mail from your different email accounts.
> http://clk.atdmt.com/UKM/go/167688463/direct/01/