You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Hervé Agnoux <he...@diaam-informatique.com> on 2008/10/21 20:39:49 UTC

Please an exemple of registerNodeType

Hi,

I'm trying to use the public NodeType registerNodeType(NodeTypeDefinition ntd, 
boolean allowUpdate).

But I'm losted with the type and definition of nodes.

At the very begining, I hoped to register a type of a node with a 
SameNameSiblings at false, and I was interested with allowUpdate "true".

Please give me a complete exemple or url of all that.

Thank you very much.


Re: Please an exemple of registerNodeType

Posted by Alexander Klimetschek <ak...@day.com>.
On Wed, Oct 22, 2008 at 9:15 AM, Hervé Agnoux
<he...@diaam-informatique.com> wrote:
> I don't understand : I don't see exemples with
> NodeTypeManagerImpl.registerNodeType(NodeTypeDefinition ntd, boolean
> allowUpdate) in theses pages.

I was pointing to the normal way of registering node types via cnd or
xml files, as this was also asked for in another thread. Sorry if this
did not answer your question in particular.

> I'm intersting by all the org.apache.jackrabbit.core.nodetype.jsr283 because I
> can (my impression) build a type of node without node type notation file.

Not sure about the current state of jsr283 node type registration in
Jackrabbit trunk. Many things are preliminary at the moment. Could
anybody comment on that?

> I'm interesting with this form of registerNodeType, because of it's with a
> NodeTypeDefinition (no node type notation file, I suppose), and the update
> functionality.

Yes, the missing node type update (in Jackrabbit) or the missing
primary node type change (in JCR 1.0) sometimes is a bit nasty. That's
one of the advantages of using nt:unstructured ;-) AFAIK node type
updates are generally only possible if they don't conflict with
existing nodes in the repository that use this node type. So you can
only do incremental changes, eg. add property definitions, but not
remove them if at one or more nodes have such a property. That is
especially a problem with mandatory properties.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Re: Please an exemple of registerNodeType

Posted by Hervé Agnoux <he...@diaam-informatique.com>.
Le mardi 21 octobre 2008, Alexander Klimetschek a écrit :
> The proper documentation can be found on the website:
>
> http://jackrabbit.apache.org/node-types.html
> http://jackrabbit.apache.org/node-type-notation.html
>
> Google is your friend ;-)
>

I don't understand : I don't see exemples with 
NodeTypeManagerImpl.registerNodeType(NodeTypeDefinition ntd, boolean 
allowUpdate) in theses pages.

Google confirms. (yes, it's my friend :-)

I'm intersting by all the org.apache.jackrabbit.core.nodetype.jsr283 because I 
can (my impression) build a type of node without node type notation file.

I'm interesting with this form of registerNodeType, because of it's with a 
NodeTypeDefinition (no node type notation file, I suppose), and the update 
functionality.

Thanks.

Re: Please an exemple of registerNodeType

Posted by Alexander Klimetschek <ak...@day.com>.
The proper documentation can be found on the website:

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

Google is your friend ;-)

Regards,
Alex

On Tue, Oct 21, 2008 at 9:47 PM, vlad_v <nu...@yahoo.com> wrote:
>
> hi,
> if you look in the jar:   jackrabbit-core-1.4.6.jar ( i use this, but i
> think in older versions there is also)
> there are 2 files:
> builtin_nodetypes.cnd
> builtin_nodetypes.xml
>
> you'l find there the way nodetypes are defined.
>
> hope that helps,
> regards,
> Vlad
>
>
> Hervé Agnoux wrote:
>>
>> Hi,
>>
>> I'm trying to use the public NodeType registerNodeType(NodeTypeDefinition
>> ntd,
>> boolean allowUpdate).
>>
>> But I'm losted with the type and definition of nodes.
>>
>> At the very begining, I hoped to register a type of a node with a
>> SameNameSiblings at false, and I was interested with allowUpdate "true".
>>
>> Please give me a complete exemple or url of all that.
>>
>> Thank you very much.
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Please-an-exemple-of-registerNodeType-tp20096800p20097846.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>



-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Re: Please an exemple of registerNodeType

Posted by vlad_v <nu...@yahoo.com>.
hi,
if you look in the jar:   jackrabbit-core-1.4.6.jar ( i use this, but i
think in older versions there is also)
there are 2 files: 
builtin_nodetypes.cnd
builtin_nodetypes.xml

you'l find there the way nodetypes are defined.

hope that helps,
regards,
Vlad


Hervé Agnoux wrote:
> 
> Hi,
> 
> I'm trying to use the public NodeType registerNodeType(NodeTypeDefinition
> ntd, 
> boolean allowUpdate).
> 
> But I'm losted with the type and definition of nodes.
> 
> At the very begining, I hoped to register a type of a node with a 
> SameNameSiblings at false, and I was interested with allowUpdate "true".
> 
> Please give me a complete exemple or url of all that.
> 
> Thank you very much.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Please-an-exemple-of-registerNodeType-tp20096800p20097846.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.