jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Neale" <michael.ne...@gmail.com>
Subject Re: How to configure nodetypes without code
Date Sat, 24 Feb 2007 00:49:40 GMT
I heard rumours the this CND notation is being considered as the standard
for JCR2 spec?

Any news on this?

Michael.

On 2/24/07, Stefan Guggisberg <stefan.guggisberg@gmail.com> wrote:
>
> hi darren,
>
> On 2/23/07, Darren Hartford <dhartford@ghsinc.com> wrote:
> > Hi all,
> > There is a list of nodetypes available here:
> > http://wiki.apache.org/jackrabbit/NodeTypeRegistry
> >
> > However, there does not seem to be any definition of those nodetypes,
> > nor how to apply them.
>
> the page you're refering to contains descriptions of some wellknown
> node types, the built-in node types defined by jsr 170,  node types used
> by jackrabbit internally and some application specific node types.
>
> those node types are usually pre-installed, there's no need to 'deploy'
> them.
>
> >
> > There is 'knowledge' of nodetypes
> > http://jackrabbit.apache.org/doc/nodetype/index.html, but there are two
> > ways to define them (XML and CND), and no description of how to deploy
> > them (assumption is under /repository/nodetypes).
>
> the assumption is wrong ;-) you can either build node type definitions
> programmatically using jackrabbit api methods or define them in
> either xml or cnd format. you have to register your node type definitions
> programmatically, e.g.
>
>                 JackrabbitNodeTypeManager ntMgr =
>                         (JackrabbitNodeTypeManager) wsp.getNodeTypeManager
> ();
>                 ntMgr.registerNodeTypes(new
> FileInputStream("/foo/mytypes.cnd"),
>                         JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
>
> >
> > There is an example in SVN under
> > /applications/test/repository/nodetypes, and that one is an XML
> > definition.
> >
> > Is XML nodetype configuration under /repository/nodetypes the
> > recommended, non-coded approach to add custom properties that could then
> > be searched on via xpath/sql?
>
> quite the contrary, manipulating those files directly is strictly
> discouraged!
> the only recommended approach unfortunately involves a minimal amount of
> coding, see above example.
>
> cheers
> stefan
>
> >
> > Thanky,
> > -D
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message