jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: Getting "custom" objects from the repository?
Date Mon, 18 Apr 2005 14:09:49 GMT
On 4/18/05, Sandro Böhme <s.boehme@inovex.de> wrote:
> Hi Stefan,
> 
>  > check out
>  >http://article.gmane.org/gmane.comp.apache.jackrabbit.devel/702
> sorry, but I don't see in this article, how registering of nodetypes
> will later be accessable. Can you please clearify what I'am miss here?

you can register node types by calling 

NodeTypeRegistry.registerNodeType().

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.

cheers
stefan

btw: custom_nodetypes.xml should never be manipulated 
directly

> 
> Regards,
> 
> Sandro
>

Mime
View raw message