jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: How to add ChildNodeDefinition to NodeTypeTemplate while creating a custom NodeType using NodeTypeManager?
Date Fri, 25 Jan 2013 18:38:03 GMT
On 25.01.2013, at 16:16, Shah.Abhishek <engr.abhishekshah@gmail.com> wrote:

> I *need to* create a Custom Node type using the NodeTypeManager and other
> api available in Jackrabbit 2.4.2. I can successfully create a custom node
> type but am unable to add ChildNodeDefinitions to that node type. 

The CND format importer code might help:

http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/cnd/CompactNodeTypeDefReader.java

Have a look at the places where Lexer.CHILD_NODE_DEFINITION is used and at the method doChildNodeDefinition().
It uses AbstractNodeTypeDefinitionBuilder(s) that come from TemplateBuilderFactory.java, but
under the hood it's working with NodeTypeTemplate.

HTH,
Alex


Mime
View raw message