jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: How to use Node and Property DefinitionTemplates to create a NodeTypeTemplate
Date Tue, 15 Jun 2010 10:14:59 GMT
On Tue, Jun 15, 2010 at 06:47, Subash Chaturanga <subashsdm@gmail.com> wrote:
> In the JSR 283 spec , it says when creating  NodeDefinitionTemplate and
> PropertyDefinitionTemplate they can be attached to the NodeTypeTemplate.
> How we should attach those to NodeTypeTemplate? I mean is it the user's
> responsible to set the NodeTypeTemplate after acquiring Node and Property
> DefinitionTemplates ?

NodeTypeTemplate.getNodeDefinitionTemplates() and
getPropertyDefinitionTemplates() return *mutable* lists (see javadoc).
So you simply use list.add() to add the definitions created using
NodeTypeManager.createNodeDefinitionTemplate()  and
createPropertyDefinitionTemplate() (and modified according to your


Alexander Klimetschek

View raw message