jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Moseley <...@osafoundation.org>
Subject Re: NodeTypes for Starters?!
Date Wed, 15 Jun 2005 20:25:12 GMT
Stefan Guggisberg wrote:
> On 6/10/05, Stefan Frank <s.frank@vierundsechzig.de> wrote:
> 
>>- how to define custom-node-types (some explanations on the
>>custom_nodetypes.xml would be nice...)
> 
> 
> you can register node types by calling
> 
> NodeTypeRegistry.registerNodeType(NodeTypeDef).
> 
> here's how you get the NodeTypeRegistry object:
> 
> Workspace wsp = session.getWorkspace();
> NodeTypeManager ntMgr = wsp.getNodeTypeManager();
> NodeTypeRegistry ntReg =
>        ((NodeTypeManagerImpl) ntMgr).getNodeTypeRegistry();
> 
> node type registration is not covered by the jsr-170 spec
> but it's nonetheless available in jackrabbit since day 0.

i think there's probably a need for a tool that installs custom types 
into jackrabbit as part of the process of initializing a repository.

one way to do it would a maven plugin or ant task that reads node type 
definitions from an xml file. another could be an internal jackrabbit 
component configured in repository.xml that reads the xml file at 
repository init time and/or startup time.

thoughts?

Mime
View raw message