On 20.06.11 17:53, "Furst, Carl" <[email protected]> wrote: >I too noticed that I would have to manually update the custom_nodetype.xml >in the workspace directory. It would seem there's nothing yet to >manipulate >the type registry programmatically..
Yes, there is, right in JCR 2.0: http://www.day.com/maven/jsr170/javadocs/jcr-2.0/javax/jcr/nodetype/NodeTyp eManager.html One should not modify custom_nodetype.xml nowadays. Here is the CND importer code that shows how to use the API (from jackrabbit-jcr-commons): http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/ma in/java/org/apache/jackrabbit/commons/cnd/CndImporter.java?view=markup You can use this class to read node types from a CND file: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/ma in/java/org/apache/jackrabbit/commons/cnd/CompactNodeTypeDefReader.java?vie w=markup Regards, Alex -- Alexander Klimetschek Developer // Adobe (Day) // Berlin - Basel
