jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: adding custom properties to nt:file node
Date Wed, 16 May 2007 08:48:33 GMT
On 5/15/07, Phillip Rhodes <spamsucks@rhoderunner.com> 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!
>
>
>
>

Mime
View raw message