jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@day.com>
Subject Re: what does NodeTypeRegistry.reregisterNodeType() do?
Date Mon, 28 Jul 2008 12:28:35 GMT
hi betty

On Fri, Jul 25, 2008 at 10:00 PM, Betty Chang <bchang@edgenuity.com> wrote:
> Hi -- Did you wish to see sample code on the server side where I do the
> re-register, or on the
> client side where I read the stuff?

both if possible.

BTW: what protocol are you using for remotely accessing the repository?

cheers
stefan

>
> Betty
>
> ----- Original Message ----- From: "Stefan Guggisberg"
> <stefan.guggisberg@day.com>
> To: <users@jackrabbit.apache.org>
> Sent: Friday, July 25, 2008 1:43 AM
> Subject: Re: what does NodeTypeRegistry.reregisterNodeType() do?
>
>
>> On Thu, Jul 24, 2008 at 8:19 PM, Betty Chang <bchang@edgenuity.com> wrote:
>>>
>>> Hi --
>>>
>>> I was trying to just add another string property, and I did not specify
>>> "mandatory" in my .cnd file, so does that mean it is
>>> non-mandatory?
>>
>> yes
>>
>>>
>>> I did a dump after the re-register, but the new property does not show up
>>> under  /jcr:system/jcr:nodeTypes anywhere, and
>>> I cannot seem to set it when I add my node.
>>
>> could you please provide some sample code?
>>
>> cheers
>> stefan
>>
>>>
>>> Thanks
>>>
>>> Betty
>>>
>>> ----- Original Message ----- From: "Stefan Guggisberg"
>>> <stefan.guggisberg@day.com>
>>> To: <users@jackrabbit.apache.org>
>>> Sent: Thursday, July 24, 2008 2:21 AM
>>> Subject: Re: what does NodeTypeRegistry.reregisterNodeType() do?
>>>
>>>
>>>> hi betty
>>>>
>>>> On Thu, Jul 24, 2008 at 1:22 AM, Betty Chang <bchang@edgenuity.com>
>>>> wrote:
>>>>>
>>>>> Hi -
>>>>>
>>>>> I've been able to add custom node types within the jackrabbit server
>>>>> app.
>>>>>
>>>>> However, is it possible to add new properties to a node type that is
>>>>> already registered?
>>>>>
>>>>> I first call isRegistered() to see if a nodeTypeName is registered, and
>>>>> if it is, I call
>>>>> reregisterNodeType() in the hopes that it would re-register the node
>>>>> type
>>>>> with the new properties I have
>>>>> added.
>>>>>
>>>>> However, new properties do not seem to get registered.
>>>>
>>>> you can only register 'trivial' node type changes, i.e. changes that
>>>> do not affect existing content.
>>>>
>>>> a trivial change would e.g. be adding a non-mandatory property.
>>>>
>>>> a non-trivial (and thus non-supported change) would e.g. be adding a
>>>> mandatory property
>>>> or adding a value constraint to an existing property definition.
>>>>
>>>> what exactly are you trying to change?
>>>>
>>>>>
>>>>> What does reregisterNodeType() actually do?
>>>>
>>>> reregisterNodeType() allows to modify the definition of
>>>> an existing, already registered node type. only trivial
>>>> changes are currently supported.
>>>>
>>>> for more details see:
>>>>
>>>>
>>>> http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/NodeTypeDefDiff.html
>>>> http://issues.apache.org/jira/browse/JCR-322.
>>>>
>>>> cheers
>>>> stefan
>>>>
>>>>>
>>>>> Betty
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
>

Mime
View raw message