Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 19260 invoked from network); 29 Jul 2008 18:14:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jul 2008 18:14:27 -0000 Received: (qmail 27113 invoked by uid 500); 29 Jul 2008 18:14:25 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 27088 invoked by uid 500); 29 Jul 2008 18:14:25 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 27076 invoked by uid 99); 29 Jul 2008 18:14:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jul 2008 11:14:25 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.86.89.67] (HELO elasmtp-scoter.atl.sa.earthlink.net) (209.86.89.67) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jul 2008 18:13:29 +0000 Received: from [66.134.41.90] (helo=mercury) by elasmtp-scoter.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1KNthm-0008KV-VH for users@jackrabbit.apache.org; Tue, 29 Jul 2008 14:13:51 -0400 Message-ID: <001301c8f1a6$d9de5170$2801a8c0@mercury> From: "Betty Chang" To: References: <01c601c8ed1a$fca0d330$8119fea9@mercury> <90a8d1c00807240221q2034b4eejed963e12c52b4937@mail.gmail.com> <001301c8edb9$c73cea90$8119fea9@mercury> <90a8d1c00807250143w40527ce6w58ee2f47ccf0e813@mail.gmail.com> <005001c8ee91$1230dd40$8119fea9@mercury> <90a8d1c00807280528v3260e508y4e828742f63fc90b@mail.gmail.com> Subject: Re: what does NodeTypeRegistry.reregisterNodeType() do? Date: Tue, 29 Jul 2008 11:13:46 -0700 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-ELNK-Trace: 94e96322e927e447d780f4a490ca6956abb457f1b4332f52dca4e4c4e008dba7be9801f9305aa4b9350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 66.134.41.90 X-Virus-Checked: Checked by ClamAV on apache.org Hi -- I got side-tracked a bit, but I will try to put together a code snippet. In answer to the protocol question, the remote client uses the spi webdav interface Betty ----- Original Message ----- From: "Stefan Guggisberg" To: Sent: Monday, July 28, 2008 5:28 AM Subject: Re: what does NodeTypeRegistry.reregisterNodeType() do? > hi betty > > On Fri, Jul 25, 2008 at 10:00 PM, Betty Chang > 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" >> >> To: >> 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 >>> 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" >>>> >>>> To: >>>> 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 >>>>> 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 >>>>>> >>>>>> >>>>> >>>> >>>> >>> >> >> >