jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Custom node types with RMI
Date Fri, 11 May 2007 18:33:42 GMT
Hi,

On 5/11/07, Sudhan <s.kanade@gmail.com> wrote:
> I am really stucked at a point where i need to make custom node type so as
> to set some custom features. Now my problem is that i am using Jackrabbit
> repository through RMI, but i cannot get resources to the remote repository
> from my application. Now is there a work around, either by modifying the
> standard nodetypes given in jackrabbit source code or can I add my own
> custom node type definition somehow at startup of the repository on the
> server itself.

Starting with the 1.3 release, the jackrabbit-jcr-rmi component
supports the jackrabbit-api extension interfaces when accessing a
Jackrabbit repository. So you can use the following code in your
client application:

    Session session = ...;
    JackrabbitNodeTypeManager manager = (JackrabbitNodeTypeManager)
        session.getWorkspace().getNodeTypeManager();
    if (!manager.hasNodeType("my:customType")) {
        manager.registerNodeTypes(...);
    }

See http://jackrabbit.apache.org/api/1.3/org/apache/jackrabbit/api/JackrabbitNodeTypeManager.html

BR;

Jukka Zitting

Mime
View raw message