On Tue, Jun 15, 2010 at 13:27, Subash Chaturanga <[email protected]> wrote:
> Yes ,but my prob is where should I keep the list.Lists asks from
> NodeTypeTemplate .
> NodeTypeManager can create any number of NodeTypeTemplates(with or with out a
> definition) .
> If i maintain a List in NodeTypeManager then how can i return Definition
> List asked from NodeTypeTemplate.getNodeDefinitionTemplates() which should be
> specific to that particular NodeTypeTemplate ?
Sorry, I don't understand. If you want to define a new custom node
type, this is what you do (beware, untested code):
<snip>
NodeTypeTemplate nt = nodeTypeManager.createNodeTypeTemplate();
nt.setName("my:nodeType");
nt.set....
PropertyDefinitionTemplate prop1 = nodeTypeManager.
createPropertyDefinitionTemplate();
prop1.setName("prop");
prop1.setRequiredType(PropertyType.STRING);
prop1.set...
nt. getPropertyDefinitionTemplates().add(prop1);
nodeTypeManager.registerNodeType(nt, false);
</snap>
Regards,
Alex
--
Alexander Klimetschek
[email protected]