jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Shoener" <mshoe...@softwareapps.net>
Subject RE: Explain custom node type setup
Date Wed, 09 Sep 2009 12:58:04 GMT
Thank you for the links, that helps.

Now I guess what I am not understanding is that we would like to use
Jackrabbit as part of our application but do we just use the default
Jackrabbit webapp or do we create our own servlet to do everything?

If we have to create our own servlet then where is a good place to start?


Best Regards,

Michael Shoener
Support Staff
Software Application Services, Inc.


-----Original Message-----
From: Alexander Klimetschek [mailto:aklimets@day.com] 
Sent: Tuesday, September 08, 2009 6:36 PM
To: users@jackrabbit.apache.org
Subject: Re: Explain custom node type setup

On Tue, Sep 8, 2009 at 23:12, Michael Shoener<mshoener@softwareapps.net>
wrote:
> I have been working with jackrabbit 1.6.0 and have the following 
> questions regarding custom nodes:
>
>        1. Where exactly do I define the custom node types and what 
> should the file be named?

Normally, you'd use the jackrabbit api to load your node types. See
http://jackrabbit.apache.org/node-types.html (code at the bottom).

>        2. In what format should the file be in? (XML, CND notation)

The Jackrabbit API allows for both formats, but I'd use CND, as JCR 2.0 will
only use CND and it's much easier to edit and read.

>        3. Will the "RepositoryStartup" load the file for me or do I 
> have to manually load it, and if so how to load it.

See above. You would manually load it in your startup code (and eg.
ignore any node type already exists exception).

>        3. I would like to be able to allow any number of property 
> names for my custom node type (run-time definable).

Sure, just define so-called residual properties, using a wildcard (*).
But it's good practice to extend from nt:unstructured, which has the same
result. You can still define specific properties, that won't be enforced
anymore, but can act as a template / guide for all kinds of jcr tools.

See also http://jackrabbit.apache.org/node-type-notation.html

Regards,
Alex

--
Alexander Klimetschek
alexander.klimetschek@day.com


Mime
View raw message