You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Ian Boston <ie...@tfd.co.uk> on 2009/05/15 10:19:45 UTC
Content Loading question.
Hi,
http://incubator.apache.org/sling/site/content-loading.html
If both a directory and a content definition file exist do both get
added when loading ?
eg
/private.json
/private/some/content/private.html
If private.json contained an ACL,ACE structure would those properties
and sub nodes get added to the repository on load *as well as* the
directory subtree?
Also, is it possible to set the properties of a node on initial load
if the node is a nt:file and contains content?
Thanks
Ian
RE: AW: Content Loading question.
Posted by Mike Müller <mi...@mysign.ch>.
Hi Vidar
Many thanks for your contribution, I will take it over to the
Sling website. If you also have some samples for JSON, you'll
very welcome to add these as well.
best regards
mike
> >> I might have some knowledge on this, especially loading
> >> content as XML files.
>
> 2009/5/25 Mike Müller <mi...@mysign.ch>:
> > [...] Feel free to change/correct/append everything you like
> > and let me know when you've finished.
>
> Mike,
>
> I added a small section on using custom XML formats in content
> loading. Let me know if it should be improved in any way.
> Again, thanks for driving the documentation process forward. It is
> highly appreciated.
>
> --
> Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
> Akersgata 16, N-0158 Oslo, Norway
> +47 21 531941, ext 2070
>
Re: AW: Content Loading question.
Posted by Vidar Ramdal <vi...@idium.no>.
>> I might have some knowledge on this, especially loading
>> content as XML files.
2009/5/25 Mike Müller <mi...@mysign.ch>:
> [...] Feel free to change/correct/append everything you like
> and let me know when you've finished.
Mike,
I added a small section on using custom XML formats in content
loading. Let me know if it should be improved in any way.
Again, thanks for driving the documentation process forward. It is
highly appreciated.
--
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway
+47 21 531941, ext 2070
Re: AW: Content Loading question.
Posted by Ian Boston <ie...@tfd.co.uk>.
Hi,
You may well know all of this already, but I though I should share
anyway, so please ignore any useless input :).
There are working examples of loading about 1000 files (997 actually)
at [1] which pulls the files from a separate svn tree.
In addition the correct json format appears to the of the form
{
"sling:resourceType" : "sling/blog",
"subnodename" : {
"sling:resourceType" : "sling/blogposting"
}
}
and not as stated in the documentation. (afaik the documentation for
the XML format is correct)
A while back I submitted a patch to fix the javadoc [2]
Its not possible to configure ACLs with json files in content loading
when the ACL's are managed by the Jackrabbit 1.5 Default Access
Manager, (Sling's default) as the ACL's are stored in a protected space.
A while back I submitted a slightly ugly patch [3] to allow bundles to
configure ACL's in a similar way to content loader, this also allows
bulk loading of Authorizables.
I will back off changing the wiki page as someone else has picked that
up, (I replied to the confluence edit a few minutes ago( but I hope
this helps.
Ian
[1] http://github.com/ieb/open-experiments/tree/3c1a92784b8f3e0856e6e4aae623d52343f150c7/slingtests/osgikernel/bundles/uxloader
[2] https://issues.apache.org/jira/browse/SLING-971
[3] https://issues.apache.org/jira/browse/SLING-981
On 25 May 2009, at 09:13, Mike Müller wrote:
> Hi Vidar
>
>> I might have some knowledge on this, especially loading
>> content as XML files.
>> Is there a wiki page I could update?
>
>
> I created a wiki page [1] (which contains by now the content of
> sample_readme.txt [2]). Would be very good if you just change
> this page. Feel free to change/correct/append everything you like
> and let me know when you've finished.
> Thank you for your help.
>
>
> [1] http://cwiki.apache.org/confluence/display/SLING/Content+Loading
>
> [2] https://svn.apache.org/repos/asf/incubator/sling/trunk/samples/simple-demo/src/main/resources/SLING-INF/content/sample/sample_readme.txt
>
>
> best regards
> mike
RE: AW: Content Loading question.
Posted by Mike Müller <mi...@mysign.ch>.
Hi Vidar
> I might have some knowledge on this, especially loading
> content as XML files.
> Is there a wiki page I could update?
I created a wiki page [1] (which contains by now the content of
sample_readme.txt [2]). Would be very good if you just change
this page. Feel free to change/correct/append everything you like
and let me know when you've finished.
Thank you for your help.
[1] http://cwiki.apache.org/confluence/display/SLING/Content+Loading
[2] https://svn.apache.org/repos/asf/incubator/sling/trunk/samples/simple-demo/src/main/resources/SLING-INF/content/sample/sample_readme.txt
best regards
mike
Re: AW: Content Loading question.
Posted by Vidar Ramdal <vi...@idium.no>.
>> Mike,
>> Yes If I get things working I will,
>> I have several use cases I need to cover.
>> 1. Uploading about 1000 html and other UI files.
>> 2. Protecting those files from changes with base folder ACL's
>> 3. Setting up a template structure with some node properties
>> being set
>> on both files and folders.
>>
>> As I get things done, I will share.
>> Ian
2009/5/24 Mike Müller <mi...@mysign.ch>:
> Do you have solved your problems. If yes, do you have some
> example files, and maybe explanaitions about the content loading
> features. I would like to update the docs, but do not have enough
> experience on this special topic. So every hint and help is welcome.
Hi Mike,
I might have some knowledge on this, especially loading content as XML files.
Is there a wiki page I could update?
--
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway
+47 21 531941, ext 2070
RE: AW: Content Loading question.
Posted by Mike Müller <mi...@mysign.ch>.
Hi Ian
> Mike,
> Yes If I get things working I will,
> I have several use cases I need to cover.
> 1. Uploading about 1000 html and other UI files.
> 2. Protecting those files from changes with base folder ACL's
> 3. Setting up a template structure with some node properties
> being set
> on both files and folders.
>
> As I get things done, I will share.
> Ian
Do you have solved your problems. If yes, do you have some
example files, and maybe explanaitions about the content loading
features. I would like to update the docs, but do not have enough
experience on this special topic. So every hint and help is welcome.
best regards
mike
Re: AW: Content Loading question.
Posted by Ian Boston <ie...@tfd.co.uk>.
Mike,
Yes If I get things working I will,
I have several use cases I need to cover.
1. Uploading about 1000 html and other UI files.
2. Protecting those files from changes with base folder ACL's
3. Setting up a template structure with some node properties being set
on both files and folders.
As I get things done, I will share.
Ian
On 15 May 2009, at 12:22, Mike Müller wrote:
> Hi Ian, hi Felix
>
> I would like to update the docs on the content loader feature with
> the JSON and XML
> part. Can someone send me rough information on that, so that I have
> the ability to
> extend the docs. Maybe also some longer sample file than initial-
> content-folder.json
> (with some subnodes) and also a sample xml.
>
> best regards
> mike
>
>> -----Ursprungliche Nachricht-----
>> Von: Ian Boston [mailto:ianboston@googlemail.com]Im Auftrag von Ian
>> Boston
>> Gesendet: Freitag, 15. Mai 2009 11:37
>> An: sling-dev@incubator.apache.org
>> Betreff: Re: Content Loading question.
>>
>>
>> Ok thanks,
>> I will take a look and see if I really need the manipulation of file
>> properties or not.
>> I have a feeling, not, since resource types generally refer for non
>> nt:file nodes.
>> Thanks
>> Ian
>>
>> On 15 May 2009, at 10:10, Felix Meschberger wrote:
>>
>>>
>>> You mean, you your initial content contains:
>>>
>>> .../thefile.json
>>> .../thefile
>>>
>>> and the thefile node should be created according to the thefile.json
>>> file and then the jcr:content/jcr:data should be loaded from
>>> thefile ? I
>>> don't think, that this currently works.
>>>
>>> But this would probably be a good extension like being able to load
>>> initial content from a single file instead of a directory
>> as it is the
>>> case now (see SLING-694 [1]).
>>>
>>> Regards
>>> Felix
>>>
>>> [1] https://issues.apache.org/jira/browse/SLING-694
>>
>>
Re: AW: Content Loading question.
Posted by Felix Meschberger <fm...@gmail.com>.
Hi Ian,
Ian Boston schrieb:
> I am sure you know this,
> https://svn.apache.org/repos/asf/incubator/sling/trunk/samples/simple-demo/src/main/resources/SLING-INF/content/sample/content/home.json
>
> Appears to work properly. The below does not.
>
> Is there a way to initialize rep:Policy nodes other than using the acl
> servlets over http ?
What is the problem of adding the rep:Policy nodes ? Are they protected
and thus only manageable by API ? Do you have any exceptions when trying
to do this ?
(I have seen your patch but not looked closely at it yet)
Regards
Felix
>
> Ian
>
> On 15 May 2009, at 22:53, Ian Boston wrote:
>
>> Felix,
>> I am not absolutely certain about this but I think the description is
>> not in sync with the examples.
>> I tried [1] in /devwidgets.json and when accessing
>> http:/..../devwidgets.html I got [2] back, indicating that the example
>> files are correct but the doc is not.
>> (ignore the content, I have almost certainly got it wrong at the moment)
>>
>> Does that make sense, or am I doing something completely wrong ?
>>
>> Ian
>>
>> [1]
>> ==================================================
>> {
>> "nodes":[
>> {
>> "name" : "rep:Policy",
>> "primaryNodeType" : "rep:ACL",
>> "nodes" : [
>> {
>> "name" : "grantAdmin",
>> "primaryNodeType" : "rep:grantACE",
>> "properties" : {
>> "rep:principalName" : "admin",
>> "rep:privilages" : [
>> "jcr:all"
>> ]
>> }
>> },
>> {
>> "name" : "grantEveryone",
>> "primaryNodeType" : "rep:grantACE",
>> "properties" : {
>> "rep:principalName" : "everyone",
>> "rep:privilages" : [
>> "jcr:read"
>> ]
>> }
>> }
>> ]
>> }
>> ]
>> }
>> ================================================
>>
>> [2]
>> ================================================
>> Resource dumped by HtmlRendererServlet
>>
>> Resource path: /devwidgets
>>
>> Resource metadata: {sling.resolutionPath=/devwidgets,
>> sling.resolutionPathInfo=.html}
>> Resource properties
>> nodes:
>> [{"name":"rep:Policy","primaryNodeType":"rep:ACL","nodes":[{"name":"grantReadEveryone","primaryNodeType":"rep:grantACE","properties":{"rep:principalName":"admin","rep:privilages":["jcr:all"]}},{"name":"grantOwnerWrite","primaryNodeType":"rep:grantACE","properties":{"rep:principalName":"everyone","rep:privilages":["jcr:read"]}}]}]
>>
>> jcr:primaryType: nt:unstructured
>> ================================================
>>
>>
>> On 15 May 2009, at 21:03, Felix Meschberger wrote:
>>
>>> Hi Mike,
>>>
>>> You might want to look at the initial content of the simple-sample
>>> module which you find at
>>> https://svn.apache.org/repos/asf/incubator/sling/trunk/samples/simple-demo/src/main/resources/SLING-INF/content
>>>
>>>
>>> This also contains sample_readme.txt file, which in fact contains a
>>> rough description of the xml and json formats along with samples.
>>>
>>> HTH
>>>
>>> Regards
>>> Felix
>>>
>>> Mike Müller schrieb:
>>>> Hi Ian, hi Felix
>>>>
>>>> I would like to update the docs on the content loader feature with
>>>> the JSON and XML
>>>> part. Can someone send me rough information on that, so that I have
>>>> the ability to
>>>> extend the docs. Maybe also some longer sample file than
>>>> initial-content-folder.json
>>>> (with some subnodes) and also a sample xml.
>>>>
>>>> best regards
>>>> mike
>>>>
>>>>> -----Ursprungliche Nachricht-----
>>>>> Von: Ian Boston [mailto:ianboston@googlemail.com]Im Auftrag von Ian
>>>>> Boston
>>>>> Gesendet: Freitag, 15. Mai 2009 11:37
>>>>> An: sling-dev@incubator.apache.org
>>>>> Betreff: Re: Content Loading question.
>>>>>
>>>>>
>>>>> Ok thanks,
>>>>> I will take a look and see if I really need the manipulation of file
>>>>> properties or not.
>>>>> I have a feeling, not, since resource types generally refer for non
>>>>> nt:file nodes.
>>>>> Thanks
>>>>> Ian
>>>>>
>>>>> On 15 May 2009, at 10:10, Felix Meschberger wrote:
>>>>>
>>>>>> You mean, you your initial content contains:
>>>>>>
>>>>>> .../thefile.json
>>>>>> .../thefile
>>>>>>
>>>>>> and the thefile node should be created according to the thefile.json
>>>>>> file and then the jcr:content/jcr:data should be loaded from
>>>>>> thefile ? I
>>>>>> don't think, that this currently works.
>>>>>>
>>>>>> But this would probably be a good extension like being able to load
>>>>>> initial content from a single file instead of a directory
>>>>> as it is the
>>>>>> case now (see SLING-694 [1]).
>>>>>>
>>>>>> Regards
>>>>>> Felix
>>>>>>
>>>>>> [1] https://issues.apache.org/jira/browse/SLING-694
>>>>>
>>>>
>>>
>>
>
>
Re: AW: Content Loading question.
Posted by Ian Boston <ie...@tfd.co.uk>.
I am sure you know this,
https://svn.apache.org/repos/asf/incubator/sling/trunk/samples/simple-demo/src/main/resources/SLING-INF/content/sample/content/home.json
Appears to work properly. The below does not.
Is there a way to initialize rep:Policy nodes other than using the acl
servlets over http ?
Ian
On 15 May 2009, at 22:53, Ian Boston wrote:
> Felix,
> I am not absolutely certain about this but I think the description
> is not in sync with the examples.
> I tried [1] in /devwidgets.json and when accessing http:/..../
> devwidgets.html I got [2] back, indicating that the example files
> are correct but the doc is not.
> (ignore the content, I have almost certainly got it wrong at the
> moment)
>
> Does that make sense, or am I doing something completely wrong ?
>
> Ian
>
> [1]
> ==================================================
> {
> "nodes":[
> {
> "name" : "rep:Policy",
> "primaryNodeType" : "rep:ACL",
> "nodes" : [
> {
> "name" : "grantAdmin",
> "primaryNodeType" : "rep:grantACE",
> "properties" : {
> "rep:principalName" : "admin",
> "rep:privilages" : [
> "jcr:all"
> ]
> }
> },
> {
> "name" : "grantEveryone",
> "primaryNodeType" : "rep:grantACE",
> "properties" : {
> "rep:principalName" : "everyone",
> "rep:privilages" : [
> "jcr:read"
> ]
> }
> }
> ]
> }
> ]
> }
> ================================================
>
> [2]
> ================================================
> Resource dumped by HtmlRendererServlet
>
> Resource path: /devwidgets
>
> Resource metadata: {sling.resolutionPath=/devwidgets,
> sling.resolutionPathInfo=.html}
> Resource properties
> nodes: [{"name":"rep:Policy","primaryNodeType":"rep:ACL","nodes":
> [{"name":"grantReadEveryone","primaryNodeType":"rep:grantACE","properties":{"rep:principalName":"admin","rep:privilages":["jcr:all"]}},{"name":"grantOwnerWrite","primaryNodeType":"rep:grantACE","properties":{"rep:principalName":"everyone","rep:privilages":["jcr:read"]}}]}]
> jcr:primaryType: nt:unstructured
> ================================================
>
>
> On 15 May 2009, at 21:03, Felix Meschberger wrote:
>
>> Hi Mike,
>>
>> You might want to look at the initial content of the simple-sample
>> module which you find at
>> https://svn.apache.org/repos/asf/incubator/sling/trunk/samples/simple-demo/src/main/resources/SLING-INF/content
>>
>> This also contains sample_readme.txt file, which in fact contains a
>> rough description of the xml and json formats along with samples.
>>
>> HTH
>>
>> Regards
>> Felix
>>
>> Mike Müller schrieb:
>>> Hi Ian, hi Felix
>>>
>>> I would like to update the docs on the content loader feature with
>>> the JSON and XML
>>> part. Can someone send me rough information on that, so that I
>>> have the ability to
>>> extend the docs. Maybe also some longer sample file than initial-
>>> content-folder.json
>>> (with some subnodes) and also a sample xml.
>>>
>>> best regards
>>> mike
>>>
>>>> -----Ursprungliche Nachricht-----
>>>> Von: Ian Boston [mailto:ianboston@googlemail.com]Im Auftrag von Ian
>>>> Boston
>>>> Gesendet: Freitag, 15. Mai 2009 11:37
>>>> An: sling-dev@incubator.apache.org
>>>> Betreff: Re: Content Loading question.
>>>>
>>>>
>>>> Ok thanks,
>>>> I will take a look and see if I really need the manipulation of
>>>> file
>>>> properties or not.
>>>> I have a feeling, not, since resource types generally refer for non
>>>> nt:file nodes.
>>>> Thanks
>>>> Ian
>>>>
>>>> On 15 May 2009, at 10:10, Felix Meschberger wrote:
>>>>
>>>>> You mean, you your initial content contains:
>>>>>
>>>>> .../thefile.json
>>>>> .../thefile
>>>>>
>>>>> and the thefile node should be created according to the
>>>>> thefile.json
>>>>> file and then the jcr:content/jcr:data should be loaded from
>>>>> thefile ? I
>>>>> don't think, that this currently works.
>>>>>
>>>>> But this would probably be a good extension like being able to
>>>>> load
>>>>> initial content from a single file instead of a directory
>>>> as it is the
>>>>> case now (see SLING-694 [1]).
>>>>>
>>>>> Regards
>>>>> Felix
>>>>>
>>>>> [1] https://issues.apache.org/jira/browse/SLING-694
>>>>
>>>
>>
>
Re: AW: Content Loading question.
Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,
On Fri, May 15, 2009 at 11:53 PM, Ian Boston <ie...@tfd.co.uk> wrote:
> I am not absolutely certain about this but I think the description is not in
> sync with the examples....
Note that the initial content found at [1] is verified by the
InitialContentTest [2] when running the launchpad/testing integration
tests. Contributions are welcome to expand the coverage of those
tests.
I have added this info to [3], so that people can look at the tests
and hopefully provide more in the future.
-Bertrand
[1] http://svn.apache.org/repos/asf/incubator/sling/trunk/launchpad/content/src/main/resources/content/sling-test
[2] http://svn.apache.org/repos/asf/incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/InitialContentTest.java
[3] http://incubator.apache.org/sling/site/content-loading.html
Re: AW: Content Loading question.
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
Ian Boston schrieb:
> Felix,
> I am not absolutely certain about this but I think the description is
> not in sync with the examples.
> I tried [1] in /devwidgets.json and when accessing
> http:/..../devwidgets.html I got [2] back, indicating that the example
> files are correct but the doc is not.
> (ignore the content, I have almost certainly got it wrong at the moment)
>
> Does that make sense, or am I doing something completely wrong ?
Sounds correct.
BTW: If you request a resource with the .json extension, you may get the
result which is valid input for the .json importer. The generic format
for JSON export is
http://host/path.tidy.level.json
where tidy is a marker selector (you may omit it) to render the JSON
pretty printed. Otherwise it is send as a single line of text.
The level selector is an int number indicating the number of child
levels to include in the export. The special level "-1" may be used to
indicate the complete subtree (take care if using this on the root !).
And, while we are at it, there is a nice plugin for Firefox to render
JSON data in a similar way as XML: JSONView [1].
Regards
Felix
[1] https://addons.mozilla.org/de/firefox/addon/10869
>
> Ian
>
> [1]
> ==================================================
> {
> "nodes":[
> {
> "name" : "rep:Policy",
> "primaryNodeType" : "rep:ACL",
> "nodes" : [
> {
> "name" : "grantAdmin",
> "primaryNodeType" : "rep:grantACE",
> "properties" : {
> "rep:principalName" : "admin",
> "rep:privilages" : [
> "jcr:all"
> ]
> }
> },
> {
> "name" : "grantEveryone",
> "primaryNodeType" : "rep:grantACE",
> "properties" : {
> "rep:principalName" : "everyone",
> "rep:privilages" : [
> "jcr:read"
> ]
> }
> }
> ]
> }
> ]
> }
> ================================================
>
> [2]
> ================================================
> Resource dumped by HtmlRendererServlet
>
> Resource path: /devwidgets
>
> Resource metadata: {sling.resolutionPath=/devwidgets,
> sling.resolutionPathInfo=.html}
> Resource properties
> nodes:
> [{"name":"rep:Policy","primaryNodeType":"rep:ACL","nodes":[{"name":"grantReadEveryone","primaryNodeType":"rep:grantACE","properties":{"rep:principalName":"admin","rep:privilages":["jcr:all"]}},{"name":"grantOwnerWrite","primaryNodeType":"rep:grantACE","properties":{"rep:principalName":"everyone","rep:privilages":["jcr:read"]}}]}]
>
> jcr:primaryType: nt:unstructured
> ================================================
>
>
> On 15 May 2009, at 21:03, Felix Meschberger wrote:
>
>> Hi Mike,
>>
>> You might want to look at the initial content of the simple-sample
>> module which you find at
>> https://svn.apache.org/repos/asf/incubator/sling/trunk/samples/simple-demo/src/main/resources/SLING-INF/content
>>
>>
>> This also contains sample_readme.txt file, which in fact contains a
>> rough description of the xml and json formats along with samples.
>>
>> HTH
>>
>> Regards
>> Felix
>>
>> Mike Müller schrieb:
>>> Hi Ian, hi Felix
>>>
>>> I would like to update the docs on the content loader feature with
>>> the JSON and XML
>>> part. Can someone send me rough information on that, so that I have
>>> the ability to
>>> extend the docs. Maybe also some longer sample file than
>>> initial-content-folder.json
>>> (with some subnodes) and also a sample xml.
>>>
>>> best regards
>>> mike
>>>
>>>> -----Ursprungliche Nachricht-----
>>>> Von: Ian Boston [mailto:ianboston@googlemail.com]Im Auftrag von Ian
>>>> Boston
>>>> Gesendet: Freitag, 15. Mai 2009 11:37
>>>> An: sling-dev@incubator.apache.org
>>>> Betreff: Re: Content Loading question.
>>>>
>>>>
>>>> Ok thanks,
>>>> I will take a look and see if I really need the manipulation of file
>>>> properties or not.
>>>> I have a feeling, not, since resource types generally refer for non
>>>> nt:file nodes.
>>>> Thanks
>>>> Ian
>>>>
>>>> On 15 May 2009, at 10:10, Felix Meschberger wrote:
>>>>
>>>>> You mean, you your initial content contains:
>>>>>
>>>>> .../thefile.json
>>>>> .../thefile
>>>>>
>>>>> and the thefile node should be created according to the thefile.json
>>>>> file and then the jcr:content/jcr:data should be loaded from
>>>>> thefile ? I
>>>>> don't think, that this currently works.
>>>>>
>>>>> But this would probably be a good extension like being able to load
>>>>> initial content from a single file instead of a directory
>>>> as it is the
>>>>> case now (see SLING-694 [1]).
>>>>>
>>>>> Regards
>>>>> Felix
>>>>>
>>>>> [1] https://issues.apache.org/jira/browse/SLING-694
>>>>
>>>
>>
>
>
Re: AW: Content Loading question.
Posted by Ian Boston <ie...@tfd.co.uk>.
Felix,
I am not absolutely certain about this but I think the description is
not in sync with the examples.
I tried [1] in /devwidgets.json and when accessing http:/..../
devwidgets.html I got [2] back, indicating that the example files are
correct but the doc is not.
(ignore the content, I have almost certainly got it wrong at the moment)
Does that make sense, or am I doing something completely wrong ?
Ian
[1]
==================================================
{
"nodes":[
{
"name" : "rep:Policy",
"primaryNodeType" : "rep:ACL",
"nodes" : [
{
"name" : "grantAdmin",
"primaryNodeType" : "rep:grantACE",
"properties" : {
"rep:principalName" : "admin",
"rep:privilages" : [
"jcr:all"
]
}
},
{
"name" : "grantEveryone",
"primaryNodeType" : "rep:grantACE",
"properties" : {
"rep:principalName" : "everyone",
"rep:privilages" : [
"jcr:read"
]
}
}
]
}
]
}
================================================
[2]
================================================
Resource dumped by HtmlRendererServlet
Resource path: /devwidgets
Resource metadata: {sling.resolutionPath=/devwidgets,
sling.resolutionPathInfo=.html}
Resource properties
nodes: [{"name":"rep:Policy","primaryNodeType":"rep:ACL","nodes":
[{"name":"grantReadEveryone","primaryNodeType":"rep:grantACE","properties":{"rep:principalName":"admin","rep:privilages":["jcr:all"]}},{"name":"grantOwnerWrite","primaryNodeType":"rep:grantACE","properties":{"rep:principalName":"everyone","rep:privilages":["jcr:read"]}}]}]
jcr:primaryType: nt:unstructured
================================================
On 15 May 2009, at 21:03, Felix Meschberger wrote:
> Hi Mike,
>
> You might want to look at the initial content of the simple-sample
> module which you find at
> https://svn.apache.org/repos/asf/incubator/sling/trunk/samples/simple-demo/src/main/resources/SLING-INF/content
>
> This also contains sample_readme.txt file, which in fact contains a
> rough description of the xml and json formats along with samples.
>
> HTH
>
> Regards
> Felix
>
> Mike Müller schrieb:
>> Hi Ian, hi Felix
>>
>> I would like to update the docs on the content loader feature with
>> the JSON and XML
>> part. Can someone send me rough information on that, so that I have
>> the ability to
>> extend the docs. Maybe also some longer sample file than initial-
>> content-folder.json
>> (with some subnodes) and also a sample xml.
>>
>> best regards
>> mike
>>
>>> -----Ursprungliche Nachricht-----
>>> Von: Ian Boston [mailto:ianboston@googlemail.com]Im Auftrag von Ian
>>> Boston
>>> Gesendet: Freitag, 15. Mai 2009 11:37
>>> An: sling-dev@incubator.apache.org
>>> Betreff: Re: Content Loading question.
>>>
>>>
>>> Ok thanks,
>>> I will take a look and see if I really need the manipulation of file
>>> properties or not.
>>> I have a feeling, not, since resource types generally refer for non
>>> nt:file nodes.
>>> Thanks
>>> Ian
>>>
>>> On 15 May 2009, at 10:10, Felix Meschberger wrote:
>>>
>>>> You mean, you your initial content contains:
>>>>
>>>> .../thefile.json
>>>> .../thefile
>>>>
>>>> and the thefile node should be created according to the
>>>> thefile.json
>>>> file and then the jcr:content/jcr:data should be loaded from
>>>> thefile ? I
>>>> don't think, that this currently works.
>>>>
>>>> But this would probably be a good extension like being able to load
>>>> initial content from a single file instead of a directory
>>> as it is the
>>>> case now (see SLING-694 [1]).
>>>>
>>>> Regards
>>>> Felix
>>>>
>>>> [1] https://issues.apache.org/jira/browse/SLING-694
>>>
>>
>
Re: AW: Content Loading question.
Posted by Felix Meschberger <fm...@gmail.com>.
Hi Mike,
You might want to look at the initial content of the simple-sample
module which you find at
https://svn.apache.org/repos/asf/incubator/sling/trunk/samples/simple-demo/src/main/resources/SLING-INF/content
This also contains sample_readme.txt file, which in fact contains a
rough description of the xml and json formats along with samples.
HTH
Regards
Felix
Mike Müller schrieb:
> Hi Ian, hi Felix
>
> I would like to update the docs on the content loader feature with the JSON and XML
> part. Can someone send me rough information on that, so that I have the ability to
> extend the docs. Maybe also some longer sample file than initial-content-folder.json
> (with some subnodes) and also a sample xml.
>
> best regards
> mike
>
>> -----Ursprungliche Nachricht-----
>> Von: Ian Boston [mailto:ianboston@googlemail.com]Im Auftrag von Ian
>> Boston
>> Gesendet: Freitag, 15. Mai 2009 11:37
>> An: sling-dev@incubator.apache.org
>> Betreff: Re: Content Loading question.
>>
>>
>> Ok thanks,
>> I will take a look and see if I really need the manipulation of file
>> properties or not.
>> I have a feeling, not, since resource types generally refer for non
>> nt:file nodes.
>> Thanks
>> Ian
>>
>> On 15 May 2009, at 10:10, Felix Meschberger wrote:
>>
>>> You mean, you your initial content contains:
>>>
>>> .../thefile.json
>>> .../thefile
>>>
>>> and the thefile node should be created according to the thefile.json
>>> file and then the jcr:content/jcr:data should be loaded from
>>> thefile ? I
>>> don't think, that this currently works.
>>>
>>> But this would probably be a good extension like being able to load
>>> initial content from a single file instead of a directory
>> as it is the
>>> case now (see SLING-694 [1]).
>>>
>>> Regards
>>> Felix
>>>
>>> [1] https://issues.apache.org/jira/browse/SLING-694
>>
>
AW: Content Loading question.
Posted by Mike Müller <mi...@mysign.ch>.
Hi Ian, hi Felix
I would like to update the docs on the content loader feature with the JSON and XML
part. Can someone send me rough information on that, so that I have the ability to
extend the docs. Maybe also some longer sample file than initial-content-folder.json
(with some subnodes) and also a sample xml.
best regards
mike
> -----Ursprungliche Nachricht-----
> Von: Ian Boston [mailto:ianboston@googlemail.com]Im Auftrag von Ian
> Boston
> Gesendet: Freitag, 15. Mai 2009 11:37
> An: sling-dev@incubator.apache.org
> Betreff: Re: Content Loading question.
>
>
> Ok thanks,
> I will take a look and see if I really need the manipulation of file
> properties or not.
> I have a feeling, not, since resource types generally refer for non
> nt:file nodes.
> Thanks
> Ian
>
> On 15 May 2009, at 10:10, Felix Meschberger wrote:
>
> >
> > You mean, you your initial content contains:
> >
> > .../thefile.json
> > .../thefile
> >
> > and the thefile node should be created according to the thefile.json
> > file and then the jcr:content/jcr:data should be loaded from
> > thefile ? I
> > don't think, that this currently works.
> >
> > But this would probably be a good extension like being able to load
> > initial content from a single file instead of a directory
> as it is the
> > case now (see SLING-694 [1]).
> >
> > Regards
> > Felix
> >
> > [1] https://issues.apache.org/jira/browse/SLING-694
>
>
Re: Content Loading question.
Posted by Ian Boston <ie...@tfd.co.uk>.
Ok thanks,
I will take a look and see if I really need the manipulation of file
properties or not.
I have a feeling, not, since resource types generally refer for non
nt:file nodes.
Thanks
Ian
On 15 May 2009, at 10:10, Felix Meschberger wrote:
>
> You mean, you your initial content contains:
>
> .../thefile.json
> .../thefile
>
> and the thefile node should be created according to the thefile.json
> file and then the jcr:content/jcr:data should be loaded from
> thefile ? I
> don't think, that this currently works.
>
> But this would probably be a good extension like being able to load
> initial content from a single file instead of a directory as it is the
> case now (see SLING-694 [1]).
>
> Regards
> Felix
>
> [1] https://issues.apache.org/jira/browse/SLING-694
Re: Content Loading question.
Posted by Felix Meschberger <fm...@gmail.com>.
Hi Ian,
Ian Boston schrieb:
> Hi,
>
> http://incubator.apache.org/sling/site/content-loading.html
>
> If both a directory and a content definition file exist do both get
> added when loading ?
> eg
>
> /private.json
> /private/some/content/private.html
>
> If private.json contained an ACL,ACE structure would those properties
> and sub nodes get added to the repository on load *as well as* the
> directory subtree?
Yes, the private.json file is used to define and setup the private node
(and any sub nodes) and then the contents of the private directory is
used to define and setup more content, the some/content/... subtree in
your example.
By default a folder is created as a sling:Folder unless a content
definition file of the same name exists, in which case the content
definition file is applied first.
> Also, is it possible to set the properties of a node on initial load if
> the node is a nt:file and contains content?
You mean, you your initial content contains:
.../thefile.json
.../thefile
and the thefile node should be created according to the thefile.json
file and then the jcr:content/jcr:data should be loaded from thefile ? I
don't think, that this currently works.
But this would probably be a good extension like being able to load
initial content from a single file instead of a directory as it is the
case now (see SLING-694 [1]).
Regards
Felix
[1] https://issues.apache.org/jira/browse/SLING-694
>
> Thanks
> Ian
>