Stefan Guggisberg wrote:
On 6/10/05, Stefan Frank <[EMAIL PROTECTED]> 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?

Reply via email to