You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by at...@apache.org on 2012/11/19 13:43:01 UTC

svn commit: r1411153 [1/2] - in /rave/sandbox/content-services: demo-portal/ demo-portal/src/main/resources/ rave-jcr-config/ rave-jcr-config/src/main/java/org/apache/rave/jcr/bootstrapping/ rave-jcr-config/src/main/java/org/apache/rave/jcr/exporting/ ...

Author: ate
Date: Mon Nov 19 12:42:58 2012
New Revision: 1411153

URL: http://svn.apache.org/viewvc?rev=1411153&view=rev
Log:
RAVE-572: json-based JCR content import/export
- restructure json format to include primary target/source node name (no longer depending on file name)

Modified:
    rave/sandbox/content-services/demo-portal/pom.xml
    rave/sandbox/content-services/demo-portal/src/main/resources/binary-data.json
    rave/sandbox/content-services/demo-portal/src/main/resources/documents.json
    rave/sandbox/content-services/demo-portal/src/main/resources/page-config.json
    rave/sandbox/content-services/demo-portal/src/main/resources/template-data.json
    rave/sandbox/content-services/rave-jcr-config/pom.xml
    rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/bootstrapping/ModuleImporter.java
    rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/exporting/ContentExporter.java
    rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/importing/ContentImporter.java
    rave/sandbox/content-services/rave-jcr-config/src/test/java/org/apache/rave/jcr/ImportExportTest.java
    rave/sandbox/content-services/rave-jcr-config/src/test/java/org/apache/rave/jcr/exporting/ContentExporterTest.java
    rave/sandbox/content-services/rave-jcr-config/src/test/java/org/apache/rave/jcr/importing/ContentImporterTest.java
    rave/sandbox/content-services/rave-jcr-config/src/test/java/org/apache/rave/jcr/test/AbstractRaveJCRTest.java
    rave/sandbox/content-services/rave-jcr-console/src/main/java/org/apache/rave/jcr/console/dialog/JsonImportDialog.java
    rave/sandbox/content-services/rave-jcr-tools/src/main/java/org/apache/rave/tools/ImportExportTool.java
    rave/sandbox/content-services/rave-jcr-tools/src/test/java/org/apache/rave/tools/ImportExportToolTest.java
    rave/sandbox/content-services/rave-jcr-tools/src/test/resources/testData.json
    rave/sandbox/content-services/rave-web-jcr/src/test/java/org/apache/rave/content/mapping/DefaultDocumentManagerTest.java
    rave/sandbox/content-services/rave-web-jcr/src/test/resources/initial-data.json
    rave/sandbox/content-services/rave-web-jcr/src/test/resources/page-config.json
    rave/sandbox/content-services/rave-web-jcr/src/test/resources/test-data.json

Modified: rave/sandbox/content-services/demo-portal/pom.xml
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/pom.xml?rev=1411153&r1=1411152&r2=1411153&view=diff
==============================================================================
--- rave/sandbox/content-services/demo-portal/pom.xml (original)
+++ rave/sandbox/content-services/demo-portal/pom.xml Mon Nov 19 12:42:58 2012
@@ -197,7 +197,6 @@
             </properties>
             <home>${project.build.directory}/tomcat6x</home>
             <deployables>
-              <!-- disabled for development speed-up
               <deployable>
                 <groupId>org.apache.wookie</groupId>
                 <artifactId>wookie</artifactId>
@@ -206,7 +205,6 @@
                   <context>/wookie</context>
                 </properties>
               </deployable>
-              -->
               <deployable>
                 <groupId>org.apache.rave</groupId>
                 <artifactId>rave-demo-gadgets</artifactId>

Modified: rave/sandbox/content-services/demo-portal/src/main/resources/binary-data.json
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/resources/binary-data.json?rev=1411153&r1=1411152&r2=1411153&view=diff
==============================================================================
--- rave/sandbox/content-services/demo-portal/src/main/resources/binary-data.json (original)
+++ rave/sandbox/content-services/demo-portal/src/main/resources/binary-data.json Mon Nov 19 12:42:58 2012
@@ -1,15 +1,17 @@
 {
-    "jcr:primaryType":"rave:folder",
-    "images":{
+    "binaries" : {
         "jcr:primaryType":"rave:folder",
-        "rave-logo.png":{
-            "jcr:primaryType":"rave:resource",
-            "id":"logo",
-            "jcr:lastModifiedBy":"admin",
-            "jcr:binary:jcr:data":"iVBORw0KGgoAAAANSUhEUgAAAOAAAABICAIAAABgAG41AAAAGXRFWHRTb2Z0d2FyZ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bg/UE+SDA6I7E7R3x9WrlL63FX0SVHQnNIWUiEUdUspH8xFXvgIOQY3FSIuGh/LychWhy6dZ1Bed1DpPkNVQ/+/Fy7KWZPlLJCQhkWhW8UIkacCOYgNGYWEhvlxZWZn85xloKFxS+c89MK1SBtn09r9n6txGQhr59rPoUfwSZKW0/xNNAwZGUv1PL2rVUy3g6DG0Px80dpv6FhZnAfb/6rSwBLWwsAS1sAS1sLAEtbCwBLWwBLWwsAS1sAS1sLAEtbCwBLWwBLWwsAS1sAS1sPh94D8CDABhtlWUFAr6vAAAAABJRU5ErkJggg==",
-            "jcr:encoding":"test",
-            "jcr:mimeType":"image/png",
-            "jcr:lastModified":"2012-08-30T10:48:40.534+0200"
+        "images":{
+            "jcr:primaryType":"rave:folder",
+            "rave-logo.png":{
+                "jcr:primaryType":"rave:resource",
+                "id":"logo",
+                "jcr:lastModifiedBy":"admin",
+                "jcr:binary:jcr:data":"iVBORw0KGgoAAAANSUhEUgAAAOAAAABICAIAAABgAG41AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAELNJREFUeNrsnQtsVUUaxwuUWh7FykMhUKqi0EVEJLbLS4mAD0CzIouPNWI0olkVgphVREUoUEBRgQhGDWsUiFYei7vIIxqkEcsGMYgiKkVIeRQp2Ie0lAJt9+f9dHaYc3vveVwubnf+IZPpuefM+c7Mf77HzHcOjerq6hIsLH6vaGy7wMIS1MLCEtTCEtTCwhLUwsIS1MIS1MLCEtTCEtTCwhLUwsIS1MIS1MLCEtTCEtTC4n+coKdPn66rqzt16hTlyZMna2trjx8/Tr2ioqKmpqasrIz6Tz/9xGm2lxswGOLKyspjx47BgaqqKsrq6moGnQo0oAIxqPjO6vRP0BMnTnBXJKMUOhYXFyPKvn37+LWgoAARd+zY0ahRIzuKDRhFRUW7d++GowcOHKA8cuQIZXl5OfSgAlmhAVqMMq4EhY5NmjT55frGjZkicjAxMZH6eeedhzTNmzdn9iQnJ8tpFg0VF198MZYzN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M0p5ZwqvjnBeXt6I3E5ycjKn6S82tWzZ0mv+IufPmzcP28pN9aY+/PBDYvPhw4fLtrt86EKfloMGDbr99tt9j1m7du1eeOEFYjL9IB0yffr0m266SZJLXILQ7YsvvigtLdXl/1MIXqXiGfUujZUTGPlxhIhUZK1NSKm2FfV0eh+C+XRm5Vt2MupHjx4lGkVrolEKCws7depEpHL55Zd/+eWXsiQeoREj8uUB2rRp4yPHVr5lYnQrLod8XAVtFzYed5PRHDWZzehAhqdt27ZeW0b3GIsPdGlUw+qELEjHXIMiSYQtUHqe/m/dujVPAZX5Ewcdsurv0Ll/xT4GUbzu3Kjv68lcEZag3uXTtSr1PyyahxCTHkwJob5fXSaY+tOjMWmnVQjB2zkn37uUqcXQy4dq5WUBmatCjCCrTj7XQVWEpK8vSNYwYkE7yTxgYiVYNHRgBjFWlZWVEBSyMu7yVWXFh3NDUHFA5ft6Mnsw2agxxJLPK+OSIrQdvwYPvGdUEmMNTeGA6FH5srEsbqjF8nhrUISQr5Uilny/FE8FrUmdkjoukR2/Bg/UE+SDA6I7E7R3x9WrlL63FX0SVHQnNIWUiEUdUspH8xFXvgIOQY3FSIuGh/LychWhy6dZ1Bed1DpPkNVQ/+/Fy7KWZPlLJCQhkWhW8UIkacCOYgNGYWEhvlxZWZn85xloKFxS+c89MK1SBtn09r9n6txGQhr59rPoUfwSZKW0/xNNAwZGUv1PL2rVUy3g6DG0Px80dpv6FhZnAfb/6rSwBLWwsAS1sAS1sLAEtbCwBLWwBLWwsAS1sAS1sLAEtbCwBLWwBLWwsAS1sAS1sPh94D8CDABhtlWUFAr6vAAAAABJRU5ErkJggg==",
+                "jcr:encoding":"test",
+                "jcr:mimeType":"image/png",
+                "jcr:lastModified":"2012-08-30T10:48:40.534+0200"
+            }
         }
     }
 }
\ No newline at end of file

Modified: rave/sandbox/content-services/demo-portal/src/main/resources/documents.json
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/resources/documents.json?rev=1411153&r1=1411152&r2=1411153&view=diff
==============================================================================
--- rave/sandbox/content-services/demo-portal/src/main/resources/documents.json (original)
+++ rave/sandbox/content-services/demo-portal/src/main/resources/documents.json Mon Nov 19 12:42:58 2012
@@ -1,13 +1,15 @@
 {
-    "jcr:primaryType":"rave:folder",
-    "documents":{
+    "content" : {
         "jcr:primaryType":"rave:folder",
-        "rave.txt":{
-            "jcr:primaryType":"rave:content",
-            "id":"rave",
-            "title":"Apache Rave",
-            "body":"Apache Rave is a new web and social mashup engine. It will provide an out-of-the-box as well as an extendible lightweight Java platform to host, serve and aggregate (Open)Social Gadgets and services through a highly customizable and Web 2.0 friendly front-end. Rave is targeted as engine for internet and intranet portals and as building block to provide context-aware personalization and collaboration features for multi-site/multi-channel (mobile) oriented and content driven websites and (social) network oriented services and platforms. For the OpenSocial container and services the (Java) Apache Shindig will be integrated. At a later stage further generalization is envisioned to also transparently support W3C Widgets using Apache Wookie."
-        }
+        "documents":{
+            "jcr:primaryType":"rave:folder",
+            "rave.txt":{
+                "jcr:primaryType":"rave:content",
+                "id":"rave",
+                "title":"Apache Rave",
+                "body":"Apache Rave is a new web and social mashup engine. It will provide an out-of-the-box as well as an extendible lightweight Java platform to host, serve and aggregate (Open)Social Gadgets and services through a highly customizable and Web 2.0 friendly front-end. Rave is targeted as engine for internet and intranet portals and as building block to provide context-aware personalization and collaboration features for multi-site/multi-channel (mobile) oriented and content driven websites and (social) network oriented services and platforms. For the OpenSocial container and services the (Java) Apache Shindig will be integrated. At a later stage further generalization is envisioned to also transparently support W3C Widgets using Apache Wookie."
+            }
 
+        }
     }
 }
\ No newline at end of file

Modified: rave/sandbox/content-services/demo-portal/src/main/resources/page-config.json
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/resources/page-config.json?rev=1411153&r1=1411152&r2=1411153&view=diff
==============================================================================
--- rave/sandbox/content-services/demo-portal/src/main/resources/page-config.json (original)
+++ rave/sandbox/content-services/demo-portal/src/main/resources/page-config.json Mon Nov 19 12:42:58 2012
@@ -1,138 +1,140 @@
 {
-    "jcr:primaryType":"rave:folder",
-    "routes":{
-        "jcr:primaryType":"raveconfig:routes",
-        "homeRoute":{
-            "jcr:primaryType":"raveconfig:route",
-            "path":"/",
-            "component":"/userPage",
-            "referenceId":"homeRoute"
-        },
-        "r1":{
-            "jcr:primaryType":"raveconfig:route",
-            "path":"/page",
-            "component":"/userPage"
-        },
-        "r2":{
-            "jcr:primaryType":"raveconfig:route",
-            "path":"/page/view",
-            "component":"/userPage"
-        },
-        "pageRoute":{
-            "jcr:primaryType":"raveconfig:route",
-            "path":"/page/view/{pageId}",
-            "component":"/userPage",
-            "referenceId":"pageRoute"
-        },
-        "userProfileRoute":{
-            "jcr:primaryType":"raveconfig:route",
-            "path":"/person/{username:.*}",
-            "component":"/userProfile",
-            "referenceId":"userProfileRoute"
-        },
-        "r3":{
-            "jcr:primaryType":"raveconfig:route",
-            "path":"/person/id/{userid:.*}",
-            "component":"/userProfile"
-        },
-        "binariesRoute":{
-            "jcr:primaryType":"raveconfig:route",
-            "path":"/binaries",
-            "prop.contentPathPrefix":"/binaries",
-            "component":"org.apache.rave.portal.web.mvc.view.BinaryRepositoryController",
-            "handler":"render",
-            "referenceId":"binariesRoute"
+    "raveconfig" : {
+        "jcr:primaryType":"rave:folder",
+        "routes":{
+            "jcr:primaryType":"raveconfig:routes",
+            "homeRoute":{
+                "jcr:primaryType":"raveconfig:route",
+                "path":"/",
+                "component":"/userPage",
+                "referenceId":"homeRoute"
+            },
+            "r1":{
+                "jcr:primaryType":"raveconfig:route",
+                "path":"/page",
+                "component":"/userPage"
+            },
+            "r2":{
+                "jcr:primaryType":"raveconfig:route",
+                "path":"/page/view",
+                "component":"/userPage"
+            },
+            "pageRoute":{
+                "jcr:primaryType":"raveconfig:route",
+                "path":"/page/view/{pageId}",
+                "component":"/userPage",
+                "referenceId":"pageRoute"
+            },
+            "userProfileRoute":{
+                "jcr:primaryType":"raveconfig:route",
+                "path":"/person/{username:.*}",
+                "component":"/userProfile",
+                "referenceId":"userProfileRoute"
+            },
+            "r3":{
+                "jcr:primaryType":"raveconfig:route",
+                "path":"/person/id/{userid:.*}",
+                "component":"/userProfile"
+            },
+            "binariesRoute":{
+                "jcr:primaryType":"raveconfig:route",
+                "path":"/binaries",
+                "prop.contentPathPrefix":"/binaries",
+                "component":"org.apache.rave.portal.web.mvc.view.BinaryRepositoryController",
+                "handler":"render",
+                "referenceId":"binariesRoute"
+            },
+            "r4":{
+                "jcr:primaryType":"raveconfig:route",
+                "path":"/dynapi/rest/widgets",
+                "component":"org.apache.rave.portal.web.mvc.api.rest.DynWidgetApi"
+            }
         },
-        "r4":{
-            "jcr:primaryType":"raveconfig:route",
-            "path":"/dynapi/rest/widgets",
-            "component":"org.apache.rave.portal.web.mvc.api.rest.DynWidgetApi"
-        }
-    },
-    "pages":{
-        "jcr:primaryType":"raveconfig:pagedefinitions",
-        "userPage":{
-            "jcr:primaryType":"raveconfig:pagefragment",
-            "name":"userPage",
-            "extends":"extended",
-            "interceptors":"userPage",
-            "prop.topnav.userPage":"true",
-            "body":{
+        "pages":{
+            "jcr:primaryType":"raveconfig:pagedefinitions",
+            "userPage":{
                 "jcr:primaryType":"raveconfig:pagefragment",
-                "name":"body",
-                "viewName":"pages/userpage/page-body",
-                "tabs":{
+                "name":"userPage",
+                "extends":"extended",
+                "interceptors":"userPage",
+                "prop.topnav.userPage":"true",
+                "body":{
                     "jcr:primaryType":"raveconfig:pagefragment",
-                    "name":"tabs",
-                    "controller":"org.apache.rave.portal.web.mvc.controller.UserPageTabsController",
-                    "viewName":"pages/userpage/page-tabs"
-                },
-                "content":{
+                    "name":"body",
+                    "viewName":"pages/userpage/page-body",
+                    "tabs":{
+                        "jcr:primaryType":"raveconfig:pagefragment",
+                        "name":"tabs",
+                        "controller":"org.apache.rave.portal.web.mvc.controller.UserPageTabsController",
+                        "viewName":"pages/userpage/page-tabs"
+                    },
+                    "content":{
+                        "jcr:primaryType":"raveconfig:pagefragment",
+                        "name":"content",
+                        "viewName":"pages/userpage/page-content",
+                        "controller":"org.apache.rave.portal.web.mvc.controller.UserPageContentController",
+                        "layout": {
+                            "jcr:primaryType":"raveconfig:pagefragment",
+                            "name":"layout",
+                            "controller":"org.apache.rave.portal.web.mvc.controller.UserPageLayoutController"
+                        }
+                    }
+                }
+            },
+            "userProfile":{
+                "jcr:primaryType":"raveconfig:pagefragment",
+                "name":"userProfile",
+                "extends":"extended",
+                "interceptors":"userProfile",
+                "prop.topnav.userProfile":"true",
+                "body":{
                     "jcr:primaryType":"raveconfig:pagefragment",
-                    "name":"content",
-                    "viewName":"pages/userpage/page-content",
-                    "controller":"org.apache.rave.portal.web.mvc.controller.UserPageContentController",
-                    "layout": {
+                    "name":"body",
+                    "viewName":"pages/userprofile/page-body",
+                    "form":{
+                        "jcr:primaryType":"raveconfig:pagefragment",
+                        "name":"form",
+                        "controller":"org.apache.rave.portal.web.mvc.controller.UserProfileFormController",
+                        "viewName":"pages/userprofile/page-form"
+                    },
+                    "tabs":{
                         "jcr:primaryType":"raveconfig:pagefragment",
-                        "name":"layout",
-                        "controller":"org.apache.rave.portal.web.mvc.controller.UserPageLayoutController"
+                        "name":"tabs",
+                        "viewName":"layouts/person_profile"
+                    },
+                    "content":{
+                        "jcr:primaryType":"raveconfig:pagefragment",
+                        "name":"content",
+                        "viewName":"pages/userprofile/page-content"
                     }
                 }
-            }
-        },
-        "userProfile":{
-            "jcr:primaryType":"raveconfig:pagefragment",
-            "name":"userProfile",
-            "extends":"extended",
-            "interceptors":"userProfile",
-            "prop.topnav.userProfile":"true",
-            "body":{
+            },
+            "extended":{
                 "jcr:primaryType":"raveconfig:pagefragment",
-                "name":"body",
-                "viewName":"pages/userprofile/page-body",
-                "form":{
+                "name":"extended",
+                "extends":"standard",
+                "viewName":"jcr:/pages/userpage/page",
+                "header":{
                     "jcr:primaryType":"raveconfig:pagefragment",
-                    "name":"form",
-                    "controller":"org.apache.rave.portal.web.mvc.controller.UserProfileFormController",
-                    "viewName":"pages/userprofile/page-form"
-                },
-                "tabs":{
+                    "name":"header",
+                    "viewName":"pages/userpage/page-header"
+                }
+            },
+            "standard":{
+                "jcr:primaryType":"raveconfig:pagefragment",
+                "name":"standard",
+                "viewName":"pages/userpage/page",
+                "header":{
                     "jcr:primaryType":"raveconfig:pagefragment",
-                    "name":"tabs",
-                    "viewName":"layouts/person_profile"
+                    "name":"header",
+                    "viewName":"pages/header"
                 },
-                "content":{
+                "footer":{
                     "jcr:primaryType":"raveconfig:pagefragment",
-                    "name":"content",
-                    "viewName":"pages/userprofile/page-content"
+                    "name":"footer",
+                    "viewName":"jcr:/pages/footer"
                 }
             }
-        },
-        "extended":{
-            "jcr:primaryType":"raveconfig:pagefragment",
-            "name":"extended",
-            "extends":"standard",
-            "viewName":"jcr:/pages/userpage/page",
-            "header":{
-                "jcr:primaryType":"raveconfig:pagefragment",
-                "name":"header",
-                "viewName":"pages/userpage/page-header"
-            }
-        },
-        "standard":{
-            "jcr:primaryType":"raveconfig:pagefragment",
-            "name":"standard",
-            "viewName":"pages/userpage/page",
-            "header":{
-                "jcr:primaryType":"raveconfig:pagefragment",
-                "name":"header",
-                "viewName":"pages/header"
-            },
-            "footer":{
-                "jcr:primaryType":"raveconfig:pagefragment",
-                "name":"footer",
-                "viewName":"jcr:/pages/footer"
-            }
         }
     }
 }
\ No newline at end of file

Modified: rave/sandbox/content-services/demo-portal/src/main/resources/template-data.json
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/demo-portal/src/main/resources/template-data.json?rev=1411153&r1=1411152&r2=1411153&view=diff
==============================================================================
--- rave/sandbox/content-services/demo-portal/src/main/resources/template-data.json (original)
+++ rave/sandbox/content-services/demo-portal/src/main/resources/template-data.json Mon Nov 19 12:42:58 2012
@@ -1,71 +1,73 @@
 {
-    "jcr:primaryType" : "rave:folder",
-    "pages" : {
+    "templates" : {
         "jcr:primaryType" : "rave:folder",
-        "taglibs.ftl" : {
-            "jcr:primaryType" : "rave:script",
-            "rave:type" : "freemarker",
-            "jcr:lastModifiedBy" : "admin",
-            "id" : "freemarker",
-            "jcr:encoding" : "test",
-            "jcr:mimeType" : "text/plain",
-            "rave:src" : "<#import \"/spring.ftl\" as spring />\n<#assign ravehmvc=JspTaglibs[\"http://www.apache-rave.org/jsp/hmvc\"] />\n<#assign ravejcr=JspTaglibs[\"http://www.apache-rave.org/jsp/jcr\"]/>\n<#assign tiles=JspTaglibs[\"http://tiles.apache.org/tags-tiles\"] />\n<#assign portal=JspTaglibs[\"http://www.apache.org/rave/tags\"] />\n<#assign sec=JspTaglibs[\"http://www.springframework.org/security/tags\"] />\n<#assign c=JspTaglibs[\"http://java.sun.com/jsp/jstl/core\"] />\n<#assign fmt=JspTaglibs[\"http://java.sun.com/jsp/jstl/fmt\"] />\n<#assign fn=JspTaglibs[\"http://java.sun.com/jsp/jstl/functions\"] />\n<#assign form=JspTaglibs[\"http://www.springframework.org/tags/form\"] />",
-            "jcr:lastModified" : "2012-08-30T10:48:40.534+0200"
-        },
-        "footer.ftl" : {
-            "jcr:primaryType" : "rave:script",
-            "rave:type" : "freemarker",
-            "jcr:lastModifiedBy" : "admin",
-            "id" : "footer",
-            "jcr:encoding" : "test",
-            "jcr:mimeType" : "text/plain",
-            "rave:src" : "<#import \"/spring.ftl\"as spring/>\n<#include \"taglibs.ftl\"/>\n<footer>\n    <div class=\"container\">\n        <div class=\"row\">\n            <div class=\"span12 version\">\n            <@ravejcr.content path=\"/content/documents/rave.txt\" type=\"Article\" var=\"raveArticle\"/>\n                <span>${raveArticle.title} ${applicationProperties['portal.version']}</span>\n                <a href=\"http://rave.apache.org\"><img class=\"footer-logo\" alt=\"Apache Rave\" title=\"Apache Rave\" src=\"<@ravehmvc.path route=\"binariesRoute\"/>/images/rave-logo.png\"/></a>\n            </div>\n        </div>\n    </div>\n</footer>",
-            "jcr:lastModified" : "2012-08-30T10:48:40.534+0200"
-        },
-        "userpage" : {
+        "pages" : {
             "jcr:primaryType" : "rave:folder",
-            "page.ftl" : {
+            "taglibs.ftl" : {
                 "jcr:primaryType" : "rave:script",
                 "rave:type" : "freemarker",
                 "jcr:lastModifiedBy" : "admin",
-                "id" : "userpage",
+                "id" : "freemarker",
                 "jcr:encoding" : "test",
-                "rave:src" : "<#include \"../taglibs.ftl\"/> \n<#import \"../macros/metaData.ftl\" as meta/>\n <#import \"../macros/css.ftl\" as css/>\n <#import \"../macros/raveJs.ftl\" as raveJavascript/>\n <!DOCTYPE html>\n <html class=\"no-js\">\n <head>\n <@meta.metaData />\n <title>rave</title>\n <@css.cssFiles/>\n <script src=\"//cdnjs.cloudflare.com/ajax/libs/modernizr/2.5.3/modernizr.min.js\"></script>\n </head>\n <body>\n <input id=\"currentPageId\" type=\"hidden\" value=\"${page.id}\"/>\n <#-- Header Content -->\n <@ravehmvc.include ref=\"header\"/>\n <#-- Main Body Content -->\n <@ravehmvc.include ref=\"body\"/>\n <#-- Footer Content -->\n <@ravehmvc.include ref=\"footer\"/>\n <#assign ScriptLocation=enums[\"org.apache.rave.portal.web.renderer.ScriptLocation\"]/>\n <#-- render any script that needs to execute pre-src includes -->\n <@portal[\"register-init-script\"] location=ScriptLocation.BEFORE_RAVE />\n <#-- render the javascript src includes at the bottom of 
 the page for performance -->\n <@raveJavascript.raveJavascript/>\n <#-- render custom javascript from extension projects if the tag is overlayed -->\n <#-- render any script that needs to execute post-src includes -->\n <@portal[\"render-init-script\"] location=ScriptLocation.AFTER_RAVE />\n </body>\n </html>",
                 "jcr:mimeType" : "text/plain",
-                "jcr:lastModified" : "2012-08-30T10:48:40.534+0200"
-            }
-        },
-        "macros" : {
-            "jcr:primaryType" : "rave:folder",
-            "css.ftl" : {
-                "jcr:primaryType" : "rave:script",
-                "rave:type" : "freemarker",
-                "jcr:lastModifiedBy" : "admin",
-                "id" : "macros",
-                "jcr:encoding" : "test",
-                "jcr:mimeType" : "text/plain",
-                "rave:src" : "\n <#include \"../taglibs.ftl\"/>\n <#macro cssFiles>\n <link rel=\"stylesheet\" href=\"//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/themes/base/jquery-ui.css\"/>\n <link rel=\"stylesheet\" href=\"<@spring.url \"/static/css/rave.css\" />\"/>\n </#macro>",
+                "rave:src" : "<#import \"/spring.ftl\" as spring />\n<#assign ravehmvc=JspTaglibs[\"http://www.apache-rave.org/jsp/hmvc\"] />\n<#assign ravejcr=JspTaglibs[\"http://www.apache-rave.org/jsp/jcr\"]/>\n<#assign tiles=JspTaglibs[\"http://tiles.apache.org/tags-tiles\"] />\n<#assign portal=JspTaglibs[\"http://www.apache.org/rave/tags\"] />\n<#assign sec=JspTaglibs[\"http://www.springframework.org/security/tags\"] />\n<#assign c=JspTaglibs[\"http://java.sun.com/jsp/jstl/core\"] />\n<#assign fmt=JspTaglibs[\"http://java.sun.com/jsp/jstl/fmt\"] />\n<#assign fn=JspTaglibs[\"http://java.sun.com/jsp/jstl/functions\"] />\n<#assign form=JspTaglibs[\"http://www.springframework.org/tags/form\"] />",
                 "jcr:lastModified" : "2012-08-30T10:48:40.534+0200"
             },
-            "raveJs.ftl" : {
+            "footer.ftl" : {
                 "jcr:primaryType" : "rave:script",
                 "rave:type" : "freemarker",
                 "jcr:lastModifiedBy" : "admin",
-                "id" : "raveJs",
+                "id" : "footer",
                 "jcr:encoding" : "test",
                 "jcr:mimeType" : "text/plain",
-                "rave:src" : "<#include \"../taglibs.ftl\"/>\n <#macro raveJavascript>\n <#assign ScriptLocation=enums[\"org.apache.rave.portal.web.renderer.ScriptLocation\"]/>\n <@portal[\"render-script\"] location=ScriptLocation.BEFORE_LIB />\n <script src=\"//cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js\"></script>\n <script src=\"//ajax.aspnetcdn.com/ajax/jquery/jquery-1.7.2.min.js\"></script>\n <script src=\"//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/jquery-ui.min.js\"></script>\n <script src=\"//ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js\"></script>\n <script src=\"//cdnjs.cloudflare.com/ajax/libs/jquery-hashchange/v1.3/jquery.ba-hashchange.min.js\"></script>\n <script src=\"//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.0.3/bootstrap.min.js\"></script>\n <!--[if lt IE 9]><script src=\"//css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js\"></script><![endif]-->\n <@portal[\"render-script\"] location=ScriptLocati
 on.AFTER_LIB />\n <@portal[\"render-script\"] location=ScriptLocation.BEFORE_RAVE />\n <#assign jsDebugMode>\n <@portal['render-js-debug-mode']/>\n </#assign>\n <#if jsDebugMode == '1'>\n <script src=\"<@spring.url \"/static/script/rave.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_api.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_opensocial.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_wookie.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_layout.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_forms.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_person_profile.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_store.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_admin.js\"/>\"></script>\n <#else>\n <script src=\"<@spring.url \"/static/script/rave_all.min.js\"/>\"></script>\n </#if>\n <script src=
 \"<@spring.url \"/app/messagebundle/rave_client_messages.js\"/>\"></script>\n <@portal[\"render-script\"] location=ScriptLocation.AFTER_RAVE />\n <#-- common javascript to execute on all pages -->\n <script>\n <#if requestContext??>\n rave.setContext(\"${requestContext.pathToServlet}/\");\n <#else>\n rave.setContext(\"<@spring.url \"/app/\" />\");\n </#if>\n rave.setJavaScriptDebugMode(${jsDebugMode});\n <@sec.authorize access=\"isAuthenticated()\">\n <@sec.authentication property=\"principal.username\" scope=\"request\" var=\"username\"/>\n <@sec.authentication property=\"principal.id\" scope=\"request\" var=\"id\"/>\n rave.setPageViewer({username:\"${username}\", id:\"${id}\"});\n </...@sec.authorize>\n </script>\n </#macro>",
+                "rave:src" : "<#import \"/spring.ftl\"as spring/>\n<#include \"taglibs.ftl\"/>\n<footer>\n    <div class=\"container\">\n        <div class=\"row\">\n            <div class=\"span12 version\">\n            <@ravejcr.content path=\"/content/documents/rave.txt\" type=\"Article\" var=\"raveArticle\"/>\n                <span>${raveArticle.title} ${applicationProperties['portal.version']}</span>\n                <a href=\"http://rave.apache.org\"><img class=\"footer-logo\" alt=\"Apache Rave\" title=\"Apache Rave\" src=\"<@ravehmvc.path route=\"binariesRoute\"/>/images/rave-logo.png\"/></a>\n            </div>\n        </div>\n    </div>\n</footer>",
                 "jcr:lastModified" : "2012-08-30T10:48:40.534+0200"
             },
-            "metaData.ftl" : {
-                "jcr:primaryType" : "rave:script",
-                "rave:type" : "freemarker",
-                "jcr:lastModifiedBy" : "admin",
-                "id" : "metadata",
-                "jcr:encoding" : "test",
-                "jcr:mimeType" : "text/plain",
-                "rave:src" : "<#macro metaData>\n<meta charset=\"ISO-8859-1\"/>\n<meta name=\"viewport\" content=\"width=device-width\"/>\n</#macro>",
-                "jcr:lastModified" : "2012-08-30T10:48:40.534+0200"
+            "userpage" : {
+                "jcr:primaryType" : "rave:folder",
+                "page.ftl" : {
+                    "jcr:primaryType" : "rave:script",
+                    "rave:type" : "freemarker",
+                    "jcr:lastModifiedBy" : "admin",
+                    "id" : "userpage",
+                    "jcr:encoding" : "test",
+                    "rave:src" : "<#include \"../taglibs.ftl\"/> \n<#import \"../macros/metaData.ftl\" as meta/>\n <#import \"../macros/css.ftl\" as css/>\n <#import \"../macros/raveJs.ftl\" as raveJavascript/>\n <!DOCTYPE html>\n <html class=\"no-js\">\n <head>\n <@meta.metaData />\n <title>rave</title>\n <@css.cssFiles/>\n <script src=\"//cdnjs.cloudflare.com/ajax/libs/modernizr/2.5.3/modernizr.min.js\"></script>\n </head>\n <body>\n <input id=\"currentPageId\" type=\"hidden\" value=\"${page.id}\"/>\n <#-- Header Content -->\n <@ravehmvc.include ref=\"header\"/>\n <#-- Main Body Content -->\n <@ravehmvc.include ref=\"body\"/>\n <#-- Footer Content -->\n <@ravehmvc.include ref=\"footer\"/>\n <#assign ScriptLocation=enums[\"org.apache.rave.portal.web.renderer.ScriptLocation\"]/>\n <#-- render any script that needs to execute pre-src includes -->\n <@portal[\"register-init-script\"] location=ScriptLocation.BEFORE_RAVE />\n <#-- render the javascript src includes at the bottom
  of the page for performance -->\n <@raveJavascript.raveJavascript/>\n <#-- render custom javascript from extension projects if the tag is overlayed -->\n <#-- render any script that needs to execute post-src includes -->\n <@portal[\"render-init-script\"] location=ScriptLocation.AFTER_RAVE />\n </body>\n </html>",
+                    "jcr:mimeType" : "text/plain",
+                    "jcr:lastModified" : "2012-08-30T10:48:40.534+0200"
+                }
+            },
+            "macros" : {
+                "jcr:primaryType" : "rave:folder",
+                "css.ftl" : {
+                    "jcr:primaryType" : "rave:script",
+                    "rave:type" : "freemarker",
+                    "jcr:lastModifiedBy" : "admin",
+                    "id" : "macros",
+                    "jcr:encoding" : "test",
+                    "jcr:mimeType" : "text/plain",
+                    "rave:src" : "\n <#include \"../taglibs.ftl\"/>\n <#macro cssFiles>\n <link rel=\"stylesheet\" href=\"//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/themes/base/jquery-ui.css\"/>\n <link rel=\"stylesheet\" href=\"<@spring.url \"/static/css/rave.css\" />\"/>\n </#macro>",
+                    "jcr:lastModified" : "2012-08-30T10:48:40.534+0200"
+                },
+                "raveJs.ftl" : {
+                    "jcr:primaryType" : "rave:script",
+                    "rave:type" : "freemarker",
+                    "jcr:lastModifiedBy" : "admin",
+                    "id" : "raveJs",
+                    "jcr:encoding" : "test",
+                    "jcr:mimeType" : "text/plain",
+                    "rave:src" : "<#include \"../taglibs.ftl\"/>\n <#macro raveJavascript>\n <#assign ScriptLocation=enums[\"org.apache.rave.portal.web.renderer.ScriptLocation\"]/>\n <@portal[\"render-script\"] location=ScriptLocation.BEFORE_LIB />\n <script src=\"//cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js\"></script>\n <script src=\"//ajax.aspnetcdn.com/ajax/jquery/jquery-1.7.2.min.js\"></script>\n <script src=\"//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/jquery-ui.min.js\"></script>\n <script src=\"//ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js\"></script>\n <script src=\"//cdnjs.cloudflare.com/ajax/libs/jquery-hashchange/v1.3/jquery.ba-hashchange.min.js\"></script>\n <script src=\"//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.0.3/bootstrap.min.js\"></script>\n <!--[if lt IE 9]><script src=\"//css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js\"></script><![endif]-->\n <@portal[\"render-script\"] location=ScriptLo
 cation.AFTER_LIB />\n <@portal[\"render-script\"] location=ScriptLocation.BEFORE_RAVE />\n <#assign jsDebugMode>\n <@portal['render-js-debug-mode']/>\n </#assign>\n <#if jsDebugMode == '1'>\n <script src=\"<@spring.url \"/static/script/rave.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_api.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_opensocial.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_wookie.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_layout.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_forms.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_person_profile.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_store.js\"/>\"></script>\n <script src=\"<@spring.url \"/static/script/rave_admin.js\"/>\"></script>\n <#else>\n <script src=\"<@spring.url \"/static/script/rave_all.min.js\"/>\"></script>\n </#if>\n <script 
 src=\"<@spring.url \"/app/messagebundle/rave_client_messages.js\"/>\"></script>\n <@portal[\"render-script\"] location=ScriptLocation.AFTER_RAVE />\n <#-- common javascript to execute on all pages -->\n <script>\n <#if requestContext??>\n rave.setContext(\"${requestContext.pathToServlet}/\");\n <#else>\n rave.setContext(\"<@spring.url \"/app/\" />\");\n </#if>\n rave.setJavaScriptDebugMode(${jsDebugMode});\n <@sec.authorize access=\"isAuthenticated()\">\n <@sec.authentication property=\"principal.username\" scope=\"request\" var=\"username\"/>\n <@sec.authentication property=\"principal.id\" scope=\"request\" var=\"id\"/>\n rave.setPageViewer({username:\"${username}\", id:\"${id}\"});\n </...@sec.authorize>\n </script>\n </#macro>",
+                    "jcr:lastModified" : "2012-08-30T10:48:40.534+0200"
+                },
+                "metaData.ftl" : {
+                    "jcr:primaryType" : "rave:script",
+                    "rave:type" : "freemarker",
+                    "jcr:lastModifiedBy" : "admin",
+                    "id" : "metadata",
+                    "jcr:encoding" : "test",
+                    "jcr:mimeType" : "text/plain",
+                    "rave:src" : "<#macro metaData>\n<meta charset=\"ISO-8859-1\"/>\n<meta name=\"viewport\" content=\"width=device-width\"/>\n</#macro>",
+                    "jcr:lastModified" : "2012-08-30T10:48:40.534+0200"
+                }
             }
         }
     }

Modified: rave/sandbox/content-services/rave-jcr-config/pom.xml
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/rave-jcr-config/pom.xml?rev=1411153&r1=1411152&r2=1411153&view=diff
==============================================================================
--- rave/sandbox/content-services/rave-jcr-config/pom.xml (original)
+++ rave/sandbox/content-services/rave-jcr-config/pom.xml Mon Nov 19 12:42:58 2012
@@ -73,13 +73,6 @@
       <version>${apache.jackrabbit.version}</version>
       <scope>test</scope>
     </dependency>
-<!--
-    <dependency>
-      <groupId>org.apache.rave.sandbox.jcr</groupId>
-      <artifactId>rave-jcr-utils</artifactId>
-      <version>${project.version}</version>
-    </dependency>
--->
     <dependency>
       <groupId>org.apache.rave.sandbox.jcr</groupId>
       <artifactId>rave-jcr-service</artifactId>
@@ -106,34 +99,6 @@
 
   <build>
     <plugins>
-<!--
-      <plugin>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>process-test-resources</id>
-            <phase>process-test-resources</phase>
-            <configuration>
-              <target>
-                <copy todir="${project.build.directory}/repository">
-                  <fileset dir="${basedir}/src/test/repository"/>
-                </copy>
-              </target>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-        </executions>
-        <dependencies>
-          <dependency>
-            <groupId>ant</groupId>
-            <artifactId>ant-optional</artifactId>
-            <version>1.5.3-1</version>
-          </dependency>
-        </dependencies>
-      </plugin>
--->
       <plugin>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>

Modified: rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/bootstrapping/ModuleImporter.java
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/bootstrapping/ModuleImporter.java?rev=1411153&r1=1411152&r2=1411153&view=diff
==============================================================================
--- rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/bootstrapping/ModuleImporter.java (original)
+++ rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/bootstrapping/ModuleImporter.java Mon Nov 19 12:42:58 2012
@@ -271,7 +271,7 @@ public final class ModuleImporter {
                 try {
                     is = content.getURL().openStream();
                     log.info("Importing content from " + content.getFile() + " in module " + module.getName());
-                    contentImporter.importContent(content.getParent(), content.getName(), is, content.getImportBehavior());
+                    contentImporter.importContent(content.getParent(), is, content.getImportBehavior());
                     session.save();
                     updateItemStatus(content, Module.Status.DONE);
                 } catch (IOException e) {

Modified: rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/exporting/ContentExporter.java
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/exporting/ContentExporter.java?rev=1411153&r1=1411152&r2=1411153&view=diff
==============================================================================
--- rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/exporting/ContentExporter.java (original)
+++ rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/exporting/ContentExporter.java Mon Nov 19 12:42:58 2012
@@ -82,18 +82,17 @@ public class ContentExporter {
         final JsonGenerator generator = jsonFactory.createJsonGenerator(writer);
         generator.useDefaultPrettyPrinter();
         try {
-            writeNode(node, generator, true);
+            generator.writeStartObject();
+            writeNode(node, generator);
+            generator.writeEndObject();
         } finally {
             generator.close();
         }
     }
 
-    private void writeNode(final Node node, final JsonGenerator generator, final boolean isRoot) throws IOException, RepositoryException {
-        if (isRoot) {
-            generator.writeStartObject();
-        } else {
-            generator.writeObjectFieldStart(node.getName());
-        }
+    private void writeNode(final Node node, final JsonGenerator generator) throws IOException, RepositoryException {
+        generator.writeObjectFieldStart(node.getName());
+
         generator.writeStringField("jcr:primaryType", node.getPrimaryNodeType().getName());
         writeMixins(node, generator);
         writeProperties(node, generator);
@@ -125,7 +124,7 @@ public class ContentExporter {
         if (node.hasNodes()) {
             final NodeIterator nodes = node.getNodes();
             while (nodes.hasNext()) {
-                writeNode(nodes.nextNode(), generator, false);
+                writeNode(nodes.nextNode(), generator);
             }
         }
     }

Modified: rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/importing/ContentImporter.java
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/importing/ContentImporter.java?rev=1411153&r1=1411152&r2=1411153&view=diff
==============================================================================
--- rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/importing/ContentImporter.java (original)
+++ rave/sandbox/content-services/rave-jcr-config/src/main/java/org/apache/rave/jcr/importing/ContentImporter.java Mon Nov 19 12:42:58 2012
@@ -121,19 +121,18 @@ public class ContentImporter {
      * NOTE: call <strong>{@code session.save()}</strong> to persist changes
      *
      * @param parentPath the path to the node below which to import the content
-     * @param nodeName   the name of the node to import
      * @param content    an input stream containing the json content descriptor
      * @param behavior   optional setting specifying what to do when a node already exists
      * @throws IOException         when an error related to reading the input stream occurs
      * @throws RepositoryException when an error occurs while reading or writing JCR nodes
      * @throws ImportException     when this importer encounters a situation it cannot deal with
      */
-    public void importContent(final String parentPath, final String nodeName, final InputStream content, final ImportBehavior behavior) throws IOException, RepositoryException, ImportException {
+    public void importContent(final String parentPath, final InputStream content, final ImportBehavior behavior) throws IOException, RepositoryException, ImportException {
         final ObjectMapper objectMapper = new ObjectMapper();
         final JsonParser jsonParser = jsonFactory.createJsonParser(content);
         final TreeNode treeNode = objectMapper.readTree(jsonParser);
         try {
-            importNode(session.getNode(parentPath), nodeName, treeNode, behavior);
+            importNodes(session.getNode(parentPath), treeNode, behavior);
             setDelayedReferenceProperties();
         } finally {
             delayedReferences = null;
@@ -148,19 +147,18 @@ public class ContentImporter {
      * NOTE: call <strong>{@code session.save()}</strong> to persist changes
      *
      * @param parentPath the path to the node below which to import the content
-     * @param nodeName   the name of the node to import
      * @param content    a string containing the json content descriptor
      * @param behavior   optional setting specifying what to do when a node already exists
      * @throws IOException         when an error related to reading the input stream occurs
      * @throws RepositoryException when an error occurs while reading or writing JCR nodes
      * @throws ImportException     when this importer encounters a situation it cannot deal with
      */
-    public void importContent(final String parentPath, final String nodeName, final String content, final ImportBehavior behavior) throws IOException, RepositoryException, ImportException {
+    public void importContent(final String parentPath, final String content, final ImportBehavior behavior) throws IOException, RepositoryException, ImportException {
         final ObjectMapper objectMapper = new ObjectMapper();
         final JsonParser jsonParser = jsonFactory.createJsonParser(content.getBytes());
         final TreeNode treeNode = objectMapper.readTree(jsonParser);
         try {
-            importNode(session.getNode(parentPath), nodeName, treeNode, behavior);
+            importNodes(session.getNode(parentPath), treeNode, behavior);
             setDelayedReferenceProperties();
         } finally {
             delayedReferences = null;
@@ -169,12 +167,20 @@ public class ContentImporter {
         }
     }
 
-    private void importNode(final Node parent, final String nodeName, final TreeNode treeNode, final ImportBehavior behavior) throws IOException, RepositoryException, ImportException {
+    private void importNodes(final Node parent, final TreeNode treeNode, final ImportBehavior behavior) throws IOException, RepositoryException, ImportException {
         if (!(treeNode instanceof ObjectNode)) {
             throw new ImportException("Unexpected JSON type. Expected object.");
         }
         final ObjectNode objectNode = (ObjectNode) treeNode;
-        importNode(parent, nodeName, objectNode, behavior);
+
+        Iterator<String> nodeNames = objectNode.fieldNames();
+        while (nodeNames.hasNext()) {
+            String nodeName = nodeNames.next();
+            JsonNode valueNode = objectNode.path(nodeName);
+            if (valueNode.isObject()) {
+                importNode(parent, nodeName, (ObjectNode)valueNode, behavior);
+            }
+        }
     }
 
     private void importNode(final Node parent, final String name, final ObjectNode objectNode, final ImportBehavior behavior) throws IOException, RepositoryException, ImportException {

Modified: rave/sandbox/content-services/rave-jcr-config/src/test/java/org/apache/rave/jcr/ImportExportTest.java
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/rave-jcr-config/src/test/java/org/apache/rave/jcr/ImportExportTest.java?rev=1411153&r1=1411152&r2=1411153&view=diff
==============================================================================
--- rave/sandbox/content-services/rave-jcr-config/src/test/java/org/apache/rave/jcr/ImportExportTest.java (original)
+++ rave/sandbox/content-services/rave-jcr-config/src/test/java/org/apache/rave/jcr/ImportExportTest.java Mon Nov 19 12:42:58 2012
@@ -32,19 +32,19 @@ public class ImportExportTest extends Ab
     }
 
     public void testImportExportNode() throws Exception {
-        final String content = "{\"jcr:primaryType\":\"nt:unstructured\"}";
+        final String content = "{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\"}}";
         doTestImportExport(content);
     }
 
     public void testImportExportNodeWithMixin() throws Exception {
-        final String content = "{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:mixinTypes\":[\"mix:referenceable\"]}";
+        final String content = "{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:mixinTypes\":[\"mix:referenceable\"]}}";
         doTestImportExport(content);
     }
 
     private void doTestImportExport(String content) throws Exception {
         final StringWriter writer = new StringWriter();
         final ContentImporter contentImporter = new ContentImporter(testRootNode.getSession());
-        contentImporter.importContent(testRootNode.getPath(), "foo", content, null);
+        contentImporter.importContent(testRootNode.getPath(), content, null);
         final ContentExporter contentExporter = new ContentExporter(testRootNode.getSession());
         contentExporter.exportContent(testRootNode.getNode("foo").getPath(), writer);
         assertEquals(content, writer.getBuffer().toString().replaceAll("\\s", ""));

Modified: rave/sandbox/content-services/rave-jcr-config/src/test/java/org/apache/rave/jcr/exporting/ContentExporterTest.java
URL: http://svn.apache.org/viewvc/rave/sandbox/content-services/rave-jcr-config/src/test/java/org/apache/rave/jcr/exporting/ContentExporterTest.java?rev=1411153&r1=1411152&r2=1411153&view=diff
==============================================================================
--- rave/sandbox/content-services/rave-jcr-config/src/test/java/org/apache/rave/jcr/exporting/ContentExporterTest.java (original)
+++ rave/sandbox/content-services/rave-jcr-config/src/test/java/org/apache/rave/jcr/exporting/ContentExporterTest.java Mon Nov 19 12:42:58 2012
@@ -54,7 +54,7 @@ public class ContentExporterTest extends
         final Node foo = testRootNode.addNode("foo");
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\"}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\"}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithSubnode() throws Exception {
@@ -63,7 +63,7 @@ public class ContentExporterTest extends
         foo.addNode("bar");
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":{\"jcr:primaryType\":\"nt:unstructured\"}}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":{\"jcr:primaryType\":\"nt:unstructured\"}}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithMixin() throws Exception {
@@ -72,7 +72,7 @@ public class ContentExporterTest extends
         foo.addMixin("mix:referenceable");
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:mixinTypes\":[\"mix:referenceable\"]}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:mixinTypes\":[\"mix:referenceable\"]}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithStringProperty() throws Exception {
@@ -81,7 +81,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", "baz");
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":\"baz\"}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":\"baz\"}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithMultivaluedStringProperty() throws Exception {
@@ -91,7 +91,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", values);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":[\"baz\",\"qux\"]}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":[\"baz\",\"qux\"]}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithBooleanProperty() throws Exception {
@@ -100,7 +100,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", true);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":true}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":true}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithMultivaluedBooleanProperty() throws Exception {
@@ -110,7 +110,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", values);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":[true,false]}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":[true,false]}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithLongProperty() throws Exception {
@@ -119,7 +119,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", 1l);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":1}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":1}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithMultivaluedLongProperty() throws Exception {
@@ -129,7 +129,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", values);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":[1,2]}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":[1,2]}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithDoubleProperty() throws Exception {
@@ -138,7 +138,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", 1.0d);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":1.0}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":1.0}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithMultivaluedDoubleProperty() throws Exception {
@@ -148,7 +148,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", values);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":[1.0,2.0]}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":[1.0,2.0]}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithDateProperty() throws Exception {
@@ -159,7 +159,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", cal);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":\"1970-01-01T01:00:00.000+0100\"}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":\"1970-01-01T01:00:00.000+0100\"}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithMultivaluedDateProperty() throws Exception {
@@ -173,7 +173,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", values);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":[\"1970-01-01T01:00:00.000+0100\",\"1970-01-01T01:00:00.000+0100\"]}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"bar\":[\"1970-01-01T01:00:00.000+0100\",\"1970-01-01T01:00:00.000+0100\"]}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithReferenceProperty() throws Exception {
@@ -184,7 +184,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", bar);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:reference:bar\":\"/testroot/bar\"}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:reference:bar\":\"/testroot/bar\"}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithMultivaluedReferenceProperty() throws Exception {
@@ -198,7 +198,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", values);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:reference:bar\":[\"/testroot/bar\",\"/testroot/qux\"]}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:reference:bar\":[\"/testroot/bar\",\"/testroot/qux\"]}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithNameProperty() throws Exception {
@@ -207,7 +207,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", "qux", PropertyType.NAME);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:name:bar\":\"qux\"}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:name:bar\":\"qux\"}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithMultivaluedNameProperty() throws Exception {
@@ -217,7 +217,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", values);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:name:bar\":[\"qux\",\"quux\"]}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:name:bar\":[\"qux\",\"quux\"]}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithPathProperty() throws Exception {
@@ -226,7 +226,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", "qux", PropertyType.PATH);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:path:bar\":\"qux\"}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:path:bar\":\"qux\"}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithMultivaluedPathProperty() throws Exception {
@@ -236,7 +236,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", values);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:path:bar\":[\"qux\",\"quux\"]}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:path:bar\":[\"qux\",\"quux\"]}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithUriProperty() throws Exception {
@@ -245,7 +245,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", "qux", PropertyType.URI);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:uri:bar\":\"qux\"}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:uri:bar\":\"qux\"}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithMultivaluedUriProperty() throws Exception {
@@ -255,7 +255,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", values);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:uri:bar\":[\"qux\",\"quux\"]}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:uri:bar\":[\"qux\",\"quux\"]}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithBinaryProperty() throws Exception {
@@ -264,7 +264,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", valueFactory.createBinary(new ByteArrayInputStream("qux".getBytes())));
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:binary:bar\":\"cXV4\"}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:binary:bar\":\"cXV4\"}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
     public void testExportNodeWithMultivaluedBinaryProperty() throws Exception {
@@ -275,7 +275,7 @@ public class ContentExporterTest extends
         foo.setProperty("bar", values);
         ContentExporter contentExporter = new ContentExporter(session);
         contentExporter.exportContent(foo.getPath(), writer);
-        assertEquals("{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:binary:bar\":[\"cXV4\",\"cXV1eA==\"]}", writer.getBuffer().toString().replaceAll("\\s",""));
+        assertEquals("{\"foo\":{\"jcr:primaryType\":\"nt:unstructured\",\"jcr:binary:bar\":[\"cXV4\",\"cXV1eA==\"]}}", writer.getBuffer().toString().replaceAll("\\s",""));
     }
 
 }