Author: buildbot
Date: Tue Feb 19 04:42:35 2013
New Revision: 851099

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    
websites/staging/sling/trunk/content/site/content-loading-jcrcontentloader.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Feb 19 04:42:35 2013
@@ -1 +1 @@
-1447159
+1447587

Modified: 
websites/staging/sling/trunk/content/site/content-loading-jcrcontentloader.html
==============================================================================
--- 
websites/staging/sling/trunk/content/site/content-loading-jcrcontentloader.html 
(original)
+++ 
websites/staging/sling/trunk/content/site/content-loading-jcrcontentloader.html 
Tue Feb 19 04:42:35 2013
@@ -1,4 +1,3 @@
-
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
 <HTML>
   <HEAD>
@@ -296,58 +295,27 @@ primary node type &quot;nt:file&quot;. U
 
 <H3><A 
name="ContentLoading%28jcr.contentloader%29-JSONDescriptorFiles"></A>JSON 
Descriptor Files</H3>
 
-<P>Nodes, Properties and in fact complete subtrees may be described in JSON 
files using the following skeleton structure (see <A 
href="http://www.json.org/"; class="external-link" 
rel="nofollow">http://www.json.org</A> or information on the syntax of JSON) 
:</P>
+<P>Nodes, Properties and in fact complete subtrees may be described in JSON 
files using the following skeleton structure (see <A 
href="http://www.json.org/"; class="external-link" 
rel="nofollow">http://www.json.org</A> or information on the syntax of JSON).
+The name of parent node is taken from the file name. :</P>
 <DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent 
panelContent">
 <PRE class="code-java">
 {
-               <SPAN class="code-comment">// optional node name on top level, 
<SPAN class="code-keyword">default</SPAN> is file name without .json ext.
-</SPAN>                <SPAN class="code-quote">&quot;name&quot;</SPAN>: <SPAN 
class="code-quote">&quot;nodename&quot;</SPAN>,
-
-               <SPAN class="code-comment">// optional primary node type, <SPAN 
class="code-keyword">default</SPAN> <SPAN 
class="code-quote">&quot;nt:unstructured&quot;</SPAN>
-</SPAN>                <SPAN 
class="code-quote">&quot;primaryNodeType&quot;</SPAN>: <SPAN 
class="code-quote">&quot;sling:ScriptedComponent&quot;</SPAN>,
-
-               <SPAN class="code-comment">// optional mixin node types as array
-</SPAN>                <SPAN 
class="code-quote">&quot;mixinNodeTypes&quot;</SPAN>: [ ],
-
-           <SPAN class="code-comment">// the <SPAN 
class="code-quote">&quot;properties&quot;</SPAN> property is an object indexed 
by property name whose
-</SPAN>            <SPAN class="code-comment">// value is either the string 
property value, array <SPAN class="code-keyword">for</SPAN> multi-values or
-</SPAN>            <SPAN class="code-comment">// an object whose value[s] 
property denotes the property value(s) and
-</SPAN>            <SPAN class="code-comment">// whose type property denotes 
the property type
-</SPAN>            <SPAN class="code-quote">&quot;properties&quot;</SPAN>: {
-               <SPAN class="code-quote">&quot;sling:contentClass&quot;</SPAN>: 
<SPAN class="code-quote">&quot;com.day.sling.jcr.test.Test&quot;</SPAN>,
-               <SPAN class="code-quote">&quot;sampleMulti&quot;</SPAN>: [ 
<SPAN class="code-quote">&quot;v1&quot;</SPAN>, <SPAN 
class="code-quote">&quot;v2&quot;</SPAN> ],
-               <SPAN class="code-quote">&quot;sampleStruct&quot;</SPAN>: {
-                       <SPAN class="code-quote">&quot;value&quot;</SPAN>: 1,
-                       <SPAN class="code-quote">&quot;type&quot;</SPAN>: <SPAN 
class="code-quote">&quot;<SPAN class="code-object">Long</SPAN>&quot;</SPAN>
-               }
-               <SPAN class="code-quote">&quot;sampleStructMulti&quot;</SPAN>: {
-                       <SPAN class="code-quote">&quot;value&quot;</SPAN>: [ 1, 
2, 3 ],
-                       <SPAN class="code-quote">&quot;type&quot;</SPAN>: <SPAN 
class="code-quote">&quot;<SPAN class="code-object">Long</SPAN>&quot;</SPAN>
-               }
-           },
-
-           <SPAN class="code-comment">// the <SPAN 
class="code-quote">&quot;nodes&quot;</SPAN> property is an array of objects 
denoting child nodes. Nodes
-</SPAN>            <SPAN class="code-comment">// may be further nested.
-</SPAN>                <SPAN class="code-quote">&quot;nodes&quot;</SPAN>: [
-                       {
-                               <SPAN class="code-comment">// the name property 
is required on (nested) child nodes
-</SPAN>                    <SPAN class="code-quote">&quot;name&quot;</SPAN>: 
<SPAN class="code-quote">&quot;sling:scripts&quot;</SPAN>,
-
-                               <SPAN 
class="code-quote">&quot;primaryNodeType&quot;</SPAN>: <SPAN 
class="code-quote">&quot;sling:ScriptList&quot;</SPAN>,
-
-                               <SPAN 
class="code-quote">&quot;nodes&quot;</SPAN>: [
-                                       {
-                                               <SPAN 
class="code-quote">&quot;primaryNodeType&quot;</SPAN>: <SPAN 
class="code-quote">&quot;sling:Script&quot;</SPAN>,
-                                               <SPAN 
class="code-quote">&quot;properties&quot;</SPAN>: {
-                                                       <SPAN 
class="code-quote">&quot;sling:name&quot;</SPAN>: <SPAN 
class="code-quote">&quot;/test/content/jsp/start.jsp&quot;</SPAN>,
-                                                       <SPAN 
class="code-quote">&quot;sling:type&quot;</SPAN>: <SPAN 
class="code-quote">&quot;jsp&quot;</SPAN>,
-                                                       <SPAN 
class="code-quote">&quot;sling:glob&quot;</SPAN>: <SPAN 
class="code-quote">&quot;*&quot;</SPAN>
-                                               }
-                                       }
-                               ]
-                       }
-               ]
-       }
+        <SPAN class="code-comment">// Properties are represented as json 
properties</SPAN>
+        "jcr:createdBy":"admin",
+        "jcr:primaryType":"nt:folder",
+        <SPAN class="code-comment">// Child nodes are named json Objects. This 
will create a node named "childOne" </SPAN>
+        "nodeName": {
+                "jcr:primaryType": "nt:unstructured",
+                "jcr:mixinTypes": [
+                        "mix:referenceable"
+                ],
+                "propOne" : "propOneValue",
+                
+                "childOne" : {
+                        "childPropOne" : true
+                }
+        }
+}
 </PRE>
 </DIV></DIV>
 


Reply via email to