You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Julio Castillo <jc...@edgenuity.com> on 2008/05/08 08:41:47 UTC

Re: Register custom nodes using jcr2spi (spi2dav)

I read the thread about the fact that registration of custom nodetypes is
currently a feature of jackrabbit-core only.

Regarding the answer to the question

> 2) How can I register custom node types?
> 
> you have to register them with jackrabbit-core (see
> various threads on the dev-list that explain how to do that).

I did see excerpts of code in the various threads, but they are all
accomplished programmatically. I don't have code in the server side as my
emphasis is to use the remote client using the spi webdav interface and
using the default Webdav servlets.
Is there a way to have the jackrabbit war file load the custom nodes from a
config file?


Julio Castillo
Edgenuity Inc.


Re: Register custom nodes using jcr2spi (spi2dav)

Posted by Angela Schreiber <an...@day.com>.
hi julio

> I guess I can submit a feature request on JIRA to have SPI support nodetype
> registration?

sure.

> In any case, I took a quick a look at references to the custom_nodetypes.xml
> and I found that the class
> org.apache.jackrabbit.core.nodetype.NodeTypeRegistry will load a file
> custom_nodetypes.xml

correct.

> This of course all done on the server side. I don't need to anything on the
> client side?

no. jcr2spi is completely passiv with respect to nodetypes.
it only reads definitions from the SPI impl (server).

angela


Re: Register custom nodes using jcr2spi (spi2dav)

Posted by Angela Schreiber <an...@day.com>.
Stefan Guggisberg wrote:
> a word of caution:
> 
> custom_nodetypes.xml is *not* meant to be user-manipulated. it contains
> jackrabbit's internal persistent representation of the registered custom
> node type definitions. by manually editing this file you *do* risk
> data loss/corruption.
> 
> BTW, i seem to be repeating myself ;)

no need for that... i told julio in the very beginning that
is is not recommended to manipulate the custom nodetype
definitions file.

kind regards
angela

Re: Register custom nodes using jcr2spi (spi2dav)

Posted by Stefan Guggisberg <st...@day.com>.
On Thu, May 8, 2008 at 8:45 PM, Julio Castillo <jc...@edgenuity.com> wrote:
> Angela,
> I guess I can submit a feature request on JIRA to have SPI support nodetype
> registration?
>
> In any case, I took a quick a look at references to the custom_nodetypes.xml
> and I found that the class
> org.apache.jackrabbit.core.nodetype.NodeTypeRegistry will load a file
> custom_nodetypes.xml I suppose if it finds in its path?
>
> This of course all done on the server side. I don't need to anything on the
> client side?

a word of caution:

custom_nodetypes.xml is *not* meant to be user-manipulated. it contains
jackrabbit's internal persistent representation of the registered custom
node type definitions. by manually editing this file you *do* risk
data loss/corruption.

BTW, i seem to be repeating myself ;), see e.g.
http://thread.gmane.org/gmane.comp.apache.jackrabbit.user/4337/focus=4338
http://thread.gmane.org/gmane.comp.apache.jackrabbit.user/2374/focus=2418
http://thread.gmane.org/gmane.comp.apache.jackrabbit.user/536/focus=539
http://thread.gmane.org/gmane.comp.apache.jackrabbit.user/659/focus=664

i'd chosen the xml format when jackrabbit (i.e. its former
incarnation) was still
in its infancy. now i think it was a mistake. i should have chosen a non-human
readable format instead in order to not raise any false expectations ;).

cheers
stefan

>
> Thanks
>
> ** julio
>
> -----Original Message-----
> From: Angela Schreiber [mailto:anchela@day.com]
> Sent: Thursday, May 08, 2008 12:00 AM
> To: users@jackrabbit.apache.org
> Subject: Re: Register custom nodes using jcr2spi (spi2dav)
>
> hi julio
>
> Julio Castillo wrote:
>> I did see excerpts of code in the various threads, but they are all
>> accomplished programmatically. I don't have code in the server side as
>> my emphasis is to use the remote client using the spi webdav interface
>> and using the default Webdav servlets.
>> Is there a way to have the jackrabbit war file load the custom nodes
>> from a config file?
>
> basically custom nodetypes are read from the custom_nodetypes.xml which part
> of structure you can find with your JR installation.
>
> but you could only modify that manually which is not recommended i guess...
> a part from that, there is up to now no other configuration mechanism.
>
> outlook:
> JSR 283 defines nodetype registration... so sooner or later this will
> probably be part of the SPI as well.
>
> angela
>
>

RE: Register custom nodes using jcr2spi (spi2dav)

Posted by Julio Castillo <jc...@edgenuity.com>.
Angela,
I guess I can submit a feature request on JIRA to have SPI support nodetype
registration?

In any case, I took a quick a look at references to the custom_nodetypes.xml
and I found that the class
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry will load a file
custom_nodetypes.xml I suppose if it finds in its path?

This of course all done on the server side. I don't need to anything on the
client side?

Thanks

** julio

-----Original Message-----
From: Angela Schreiber [mailto:anchela@day.com] 
Sent: Thursday, May 08, 2008 12:00 AM
To: users@jackrabbit.apache.org
Subject: Re: Register custom nodes using jcr2spi (spi2dav)

hi julio

Julio Castillo wrote:
> I did see excerpts of code in the various threads, but they are all 
> accomplished programmatically. I don't have code in the server side as 
> my emphasis is to use the remote client using the spi webdav interface 
> and using the default Webdav servlets.
> Is there a way to have the jackrabbit war file load the custom nodes 
> from a config file?

basically custom nodetypes are read from the custom_nodetypes.xml which part
of structure you can find with your JR installation.

but you could only modify that manually which is not recommended i guess...
a part from that, there is up to now no other configuration mechanism.

outlook:
JSR 283 defines nodetype registration... so sooner or later this will
probably be part of the SPI as well.

angela


Re: Register custom nodes using jcr2spi (spi2dav)

Posted by Angela Schreiber <an...@day.com>.
hi julio

Julio Castillo wrote:
> I did see excerpts of code in the various threads, but they are all
> accomplished programmatically. I don't have code in the server side as my
> emphasis is to use the remote client using the spi webdav interface and
> using the default Webdav servlets.
> Is there a way to have the jackrabbit war file load the custom nodes from a
> config file?

basically custom nodetypes are read from the custom_nodetypes.xml
which part of structure you can find with your JR installation.

but you could only modify that manually which is not recommended
i guess... a part from that, there is up to now no other
configuration mechanism.

outlook:
JSR 283 defines nodetype registration... so sooner or later this
will probably be part of the SPI as well.

angela