You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by kbar <wh...@gmail.com> on 2009/09/26 22:02:03 UTC
How to add properties to a nt:file node
I am new to Jackrabbit and I am actually using it via Sling. I would like to
add properties to a nt:file node. I have read that I need to add a mixin to
it to allow it to accept properties. Could someone tell me how I go about
doing this? It would be great if there was a default mixin like
"mix:versionable" that I could just add. Maybe something like
"mix:allowproperties" should become a part of Jackrabbit?
For my purposes everything I put into jackrabbit will be a file. And these
files will always need properties. But the first property that I am
desperately trying to attach to a nt:file is slings "sling:resourceType" so
that I can write a html.esp page to display the file in a html page the way
I want to.
I hope someone can help me on this one.
Cheers,
kbar
--
View this message in context: http://www.nabble.com/How-to-add-properties-to-a-nt%3Afile-node-tp25628417p25628417.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: How to add properties to a nt:file node
Posted by Ian Boston <ie...@tfd.co.uk>.
On 26 Sep 2009, at 21:02, kbar wrote:
>
> I am new to Jackrabbit and I am actually using it via Sling. I would
> like to
> add properties to a nt:file node. I have read that I need to add a
> mixin to
> it to allow it to accept properties. Could someone tell me how I go
> about
> doing this? It would be great if there was a default mixin like
> "mix:versionable" that I could just add. Maybe something like
> "mix:allowproperties" should become a part of Jackrabbit?
>
> For my purposes everything I put into jackrabbit will be a file. And
> these
> files will always need properties. But the first property that I am
> desperately trying to attach to a nt:file is slings
> "sling:resourceType" so
> that I can write a html.esp page to display the file in a html page
> the way
> I want to.
best to ask Sling dev (cc'd)
Have you tried the quick start [1], in particular ?
Create the header node:
curl -F"sling:resourceType=foo/header" -F"headline=Hello, Sling world" http://admin:admin@localhost:8888/content/header
---------
Then see [2], it might help
Ian
1http://sling.apache.org/site/discover-sling-in-15-minutes.html
2 http://blog.tfd.co.uk/2009/06/05/file-meta-data/
>
> I hope someone can help me on this one.
>
> Cheers,
> kbar
> --
> View this message in context: http://www.nabble.com/How-to-add-properties-to-a-nt%3Afile-node-tp25628417p25628417.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
Re: How to add properties to a nt:file node
Posted by Ian Boston <ie...@tfd.co.uk>.
On 26 Sep 2009, at 21:02, kbar wrote:
>
> I am new to Jackrabbit and I am actually using it via Sling. I would
> like to
> add properties to a nt:file node. I have read that I need to add a
> mixin to
> it to allow it to accept properties. Could someone tell me how I go
> about
> doing this? It would be great if there was a default mixin like
> "mix:versionable" that I could just add. Maybe something like
> "mix:allowproperties" should become a part of Jackrabbit?
>
> For my purposes everything I put into jackrabbit will be a file. And
> these
> files will always need properties. But the first property that I am
> desperately trying to attach to a nt:file is slings
> "sling:resourceType" so
> that I can write a html.esp page to display the file in a html page
> the way
> I want to.
best to ask Sling dev (cc'd)
Have you tried the quick start [1], in particular ?
Create the header node:
curl -F"sling:resourceType=foo/header" -F"headline=Hello, Sling world" http://admin:admin@localhost:8888/content/header
---------
Then see [2], it might help
Ian
1http://sling.apache.org/site/discover-sling-in-15-minutes.html
2 http://blog.tfd.co.uk/2009/06/05/file-meta-data/
>
> I hope someone can help me on this one.
>
> Cheers,
> kbar
> --
> View this message in context: http://www.nabble.com/How-to-add-properties-to-a-nt%3Afile-node-tp25628417p25628417.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>