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:[email protected]]im Auftrag von Ian
>>>>> Boston
>>>>> Gesendet: Freitag, 15. Mai 2009 11:37
>>>>> An: [email protected]
>>>>> 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
>>>>>
>>>>
>>>
>>
> 
> 

Reply via email to