[dna-commits] DNA SVN: r1091 - in trunk: extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/dna/web/jcr/rest and 1 other directory.

dna-commits at lists.jboss.org dna-commits at lists.jboss.org
Sun Jul 12 19:39:30 EDT 2009


Author: bcarothers
Date: 2009-07-12 19:39:30 -0400 (Sun, 12 Jul 2009)
New Revision: 1091

Modified:
   trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/dna_builtins.cnd
   trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/dna/web/jcr/rest/JcrResourcesTest.java
Log:
DNA-482 Make nt:unstructured be the default primary type (but not the required primary type) for the residual item definition in dna:root, the type of the root node

Applied patch that changes the default node type from nt:base to nt:unstructured of nodes under the root node that use the residual definition and changes some downstream tests accordingly.

Modified: trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/dna_builtins.cnd
===================================================================
--- trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/dna_builtins.cnd	2009-07-12 22:08:43 UTC (rev 1090)
+++ trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/dna_builtins.cnd	2009-07-12 23:39:30 UTC (rev 1091)
@@ -51,5 +51,5 @@
 - * (undefined) multiple version
 - * (undefined) version
 + jcr:system (dna:system) = dna:system autocreated mandatory protected ignore
-+ * (nt:base) = nt:base multiple version
++ * (nt:base) = nt:unstructured multiple version
 

Modified: trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/dna/web/jcr/rest/JcrResourcesTest.java
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/dna/web/jcr/rest/JcrResourcesTest.java	2009-07-12 22:08:43 UTC (rev 1090)
+++ trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/dna/web/jcr/rest/JcrResourcesTest.java	2009-07-12 23:39:30 UTC (rev 1091)
@@ -61,6 +61,7 @@
         final String password ="password";
 
         Authenticator.setDefault(new Authenticator() {
+            @Override
             protected PasswordAuthentication getPasswordAuthentication() {
                 return new PasswordAuthentication (login, password.toCharArray());
             }
@@ -87,6 +88,7 @@
         final String password ="invalidpassword";
 
         Authenticator.setDefault(new Authenticator() {
+            @Override
             protected PasswordAuthentication getPasswordAuthentication() {
                 return new PasswordAuthentication (login, password.toCharArray());
             }
@@ -112,6 +114,7 @@
         final String password ="password";
 
         Authenticator.setDefault(new Authenticator() {
+            @Override
             protected PasswordAuthentication getPasswordAuthentication() {
                 return new PasswordAuthentication (login, password.toCharArray());
             }
@@ -375,7 +378,7 @@
         JSONObject properties = body.getJSONObject("properties");
         assertThat(properties, is(notNullValue()));
         assertThat(properties.length(), is(1));
-        assertThat(properties.getString("jcr:primaryType"), is("nt:base"));
+        assertThat(properties.getString("jcr:primaryType"), is("nt:unstructured"));
         
         assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_CREATED));
         connection.disconnect();
@@ -399,7 +402,7 @@
         JSONObject properties = body.getJSONObject("properties");
         assertThat(properties, is(notNullValue()));
         assertThat(properties.length(), is(3));
-        assertThat(properties.getString("jcr:primaryType"), is("nt:base"));
+        assertThat(properties.getString("jcr:primaryType"), is("nt:unstructured"));
         assertThat(properties.getString("jcr:uuid"), is(notNullValue()));
 
         JSONArray values = properties.getJSONArray("jcr:mixinTypes");
@@ -424,7 +427,7 @@
         properties = body.getJSONObject("properties");
         assertThat(properties, is(notNullValue()));
         assertThat(properties.length(), is(3));
-        assertThat(properties.getString("jcr:primaryType"), is("nt:base"));
+        assertThat(properties.getString("jcr:primaryType"), is("nt:unstructured"));
         assertThat(properties.getString("jcr:uuid"), is(notNullValue()));
 
         values = properties.getJSONArray("jcr:mixinTypes");




More information about the dna-commits mailing list