On Mon, Mar 8, 2010 at 7:06 AM, Stefan Guggisberg
<[email protected]> wrote:
> On Fri, Mar 5, 2010 at 9:20 PM, Birmingham, Steven
> <[email protected]> wrote:
>> Thanks Stefan,
>>
>> Yeah, I just looked through the message archives and saw the CndImporter 
>> example and gave it a try.  I tried using the CompactNodeTypeDefReader as 
>> you suggested.  It worked as far reading the cnd file, but the 
>> NodeTypeManager.registerNodeTypes() is expecting an array of 
>> NodeTypeDefinition not QNodeTypeDefinition[].  I saw a method to create 
>> QNodeTypeDefinitions out of NodeTypeDefinitions but have not found a way to 
>> do vice versa.
>
> sorry, i didn't notice it.
>
> o.a.jackrabbit.spi.commons.nodetyp.NodeTypeDefinitionFactory should do
> the trick.
> http://jackrabbit.apache.org/api/2.0/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionFactory.html
>
> here's a sample i put together and which should help get you started:



Im just wondering why the "old" way to import nodetype definitions is
becoming deprecated, while now it's necessary to perform many
workarounds to get the same results  we used to have calling
org.apache.jackrabbit.api.JackrabbitNodeTypeManager.registerNodeTypes(...).

I looked at the new jackrabbit 2.0 api and I dont see what's the new
proposed solution to import nodetype definitions from a cnd file.

Reply via email to