Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 27368 invoked from network); 16 May 2007 08:48:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 May 2007 08:48:57 -0000 Received: (qmail 60528 invoked by uid 500); 16 May 2007 08:49:02 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 60509 invoked by uid 500); 16 May 2007 08:49:02 -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 60499 invoked by uid 99); 16 May 2007 08:49:02 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 May 2007 01:49:02 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of stefan.guggisberg@gmail.com designates 64.233.184.224 as permitted sender) Received: from [64.233.184.224] (HELO wr-out-0506.google.com) (64.233.184.224) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 May 2007 01:48:55 -0700 Received: by wr-out-0506.google.com with SMTP id 76so120427wra for ; Wed, 16 May 2007 01:48:34 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oQP7tJwdWFGah+EhpQdMiwos4ARUV1A1DPe0qa4toMuwWRgT6u+fp+JD3+XbYc5MkxoXybM2dGOneyn2FszDfIZFDXbxqC6CnNH+WPKSDJEzLA33sWjR0ZDwZzsc8HYkv1WnYW2ROvpga6zJMtcRJ4BO8BkA6CfIKrVUKJA4sqs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GlBut+gCc5hbmIH0rZ8kEer0aGfnw7Ig4FCxi7QLd4TrQygHAwmjlm2S961i7su1zdQWYeHfZDNFe2V8xl/av551sH7FEn83aHNyMsHR6m2EM/E9Ciq6+cWXd+axPn4Nzf5AYp9Xm5CZ7YQmUUu2R6m63HDL3ljpp4N6Sy3IHTc= Received: by 10.67.20.3 with SMTP id x3mr6528871ugi.1179305313637; Wed, 16 May 2007 01:48:33 -0700 (PDT) Received: by 10.82.158.11 with HTTP; Wed, 16 May 2007 01:48:33 -0700 (PDT) Message-ID: <90a8d1c00705160148j7cb527f9g597824829d1b6a3d@mail.gmail.com> Date: Wed, 16 May 2007 10:48:33 +0200 From: "Stefan Guggisberg" To: users@jackrabbit.apache.org Subject: Re: adding custom properties to nt:file node In-Reply-To: <13722611.6361179249914492.JavaMail.root@mail.rhoderunner.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <13722611.6361179249914492.JavaMail.root@mail.rhoderunner.com> X-Virus-Checked: Checked by ClamAV on apache.org On 5/15/07, Phillip Rhodes wrote: > Hi. > > I migrated my custom folder node to use a nt:folder, which only allows children of type nt:file... > > Unfortunately, there are properties that I need to store on the nt:file node that are not defined. For example, I need to store a display name property, and a caption (if the nt:file is an image), description and other miscellaneous information. > > Can someone provide some direction on how I can extend nt:file to store these additional properties? there are many ways to achieve this, for example you could use a custom node type that extends from nt:file, e.g. [myapp:foo] > nt:file - myapp:caption (string) - myapp:description (string) you could create a custom node type that extends from nt:resource and use that node type for the jcr:content child node of nt:folder, e.g. [myapp:foo] > nt:resource - myapp:caption (string) - myapp:description (string) you could create a custom mixin type and assign this mixin ad hoc where necessary, e.g. [myapp:foo] mixin - myapp:caption (string) - myapp:description (string) cheers stefan > > Thanks! > > > >