DNA SVN: r944 - in trunk/extensions/dna-web-jcr-rest-war/src/test: java/org/jboss/dna/web/jcr and 1 other directories.
by dna-commits@lists.jboss.org
Author: bcarothers
Date: 2009-05-28 09:28:05 -0400 (Thu, 28 May 2009)
New Revision: 944
Added:
trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/dna/web/jcr/JcrResourcesTest.java
trunk/extensions/dna-web-jcr-rest-war/src/test/resources/
trunk/extensions/dna-web-jcr-rest-war/src/test/resources/dna-test-users.props
trunk/extensions/dna-web-jcr-rest-war/src/test/resources/jetty-dna.policy
trunk/extensions/dna-web-jcr-rest-war/src/test/resources/jetty-jaas.xml
trunk/extensions/dna-web-jcr-rest-war/src/test/resources/log4j.properties
Log:
DNA-312 DNA-312 Implement HTTP GET action for any resource at any path (folder or file)
Adding the missing test files to the correct project (2 of 2)
Added: trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/dna/web/jcr/JcrResourcesTest.java
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/dna/web/jcr/JcrResourcesTest.java (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/dna/web/jcr/JcrResourcesTest.java 2009-05-28 13:28:05 UTC (rev 944)
@@ -0,0 +1,756 @@
+/*
+ * JBoss DNA (http://www.jboss.org/dna)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * is licensed to you under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * JBoss DNA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.dna.web.jcr.rest;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsInstanceOf.instanceOf;
+import static org.hamcrest.core.IsNull.notNullValue;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+import javax.ws.rs.core.MediaType;
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONObject;
+import org.junit.Test;
+
+public class JcrResourcesTest {
+
+ private static final String SERVER_CONTEXT = "/resources";
+ private static final String SERVER_URL = "http://localhost:8080" + SERVER_CONTEXT;
+
+ private String getResponseFor( HttpURLConnection connection ) throws IOException {
+ StringBuffer buff = new StringBuffer();
+
+ InputStream stream = connection.getInputStream();
+ int bytesRead;
+ byte[] bytes = new byte[1024];
+ while (-1 != (bytesRead = stream.read(bytes, 0, 1024))) {
+ buff.append(new String(bytes, 0, bytesRead));
+ }
+
+ return buff.toString();
+ }
+
+ @Test
+ public void shouldServeContentAtRoot() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+ String body = getResponseFor(connection);
+
+ JSONObject objFromResponse = new JSONObject(body);
+ JSONObject expected = new JSONObject(
+ "{\"JCR%20Repository\":{\"repository\":{\"name\":\"JCR%20Repository\",\"resources\":{\"workspaces\":\"/resources/JCR%20Repository\"}}}}");
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_OK));
+ assertThat(objFromResponse.toString(), is(expected.toString()));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldServeListOfWorkspacesForValidRepository() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+ String body = getResponseFor(connection);
+
+ JSONObject objFromResponse = new JSONObject(body);
+ JSONObject expected = new JSONObject(
+ "{\"%3cdefault%3e\":{\"workspace\":{\"name\":\"%3cdefault%3e\",\"resources\":{\"items\":\"/resources/JCR%20Repository/%3cdefault%3e/items\"}}}}");
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_OK));
+ assertThat(objFromResponse.toString(), is(expected.toString()));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldReturnErrorForInvalidWorkspace() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/XXX");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_NOT_FOUND));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldRetrieveRootNodeForValidRepository() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ JSONObject body = new JSONObject(getResponseFor(connection));
+ assertThat(body.length(), is(2));
+
+ JSONObject properties = body.getJSONObject("properties");
+ assertThat(properties, is(notNullValue()));
+ assertThat(properties.length(), is(2));
+ assertThat(properties.getString("jcr:primaryType"), is("dna:root"));
+ assertThat(properties.get("jcr:uuid"), is(notNullValue()));
+
+ JSONArray children = body.getJSONArray("children");
+ assertThat(children.length(), is(1));
+ assertThat(children.getString(0), is("jcr:system"));
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_OK));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldRetrieveRootNodeAndChildrenWhenDepthSet() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items?dna:depth=1");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+ JSONObject body = new JSONObject(getResponseFor(connection));
+ assertThat(body.length(), is(2));
+
+ JSONObject properties = body.getJSONObject("properties");
+ assertThat(properties, is(notNullValue()));
+ assertThat(properties.length(), is(2));
+ assertThat(properties.getString("jcr:primaryType"), is("dna:root"));
+ assertThat(properties.get("jcr:uuid"), is(notNullValue()));
+
+ JSONObject children = body.getJSONObject("children");
+ assertThat(children.length(), is(1));
+
+ JSONObject system = children.getJSONObject("jcr:system");
+ assertThat(system.length(), is(2));
+
+ properties = system.getJSONObject("properties");
+ assertThat(properties.length(), is(1));
+ assertThat(properties.getString("jcr:primaryType"), is("dna:system"));
+
+ JSONArray namespaces = system.getJSONArray("children");
+ assertThat(namespaces.length(), is(1));
+ assertThat(namespaces.getString(0), is("dna:namespaces"));
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_OK));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldRetrieveNodeAndChildrenWhenDepthSet() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/jcr:system?dna:depth=1");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+ JSONObject body = new JSONObject(getResponseFor(connection));
+ assertThat(body.length(), is(2));
+
+ JSONObject properties = body.getJSONObject("properties");
+ assertThat(properties, is(notNullValue()));
+ assertThat(properties.length(), is(1));
+ assertThat(properties.getString("jcr:primaryType"), is("dna:system"));
+
+ JSONObject children = body.getJSONObject("children");
+ assertThat(children.length(), is(1));
+
+ JSONObject namespaces = children.getJSONObject("dna:namespaces");
+ assertThat(namespaces.length(), is(2));
+
+ properties = namespaces.getJSONObject("properties");
+ assertThat(properties.length(), is(1));
+ assertThat(properties.getString("jcr:primaryType"), is("dna:namespaces"));
+
+ JSONArray namespace = namespaces.getJSONArray("children");
+ assertThat(namespace.length(), is(10));
+ Set<String> prefixes = new HashSet<String>(namespace.length());
+
+ for (int i = 0; i < namespace.length(); i++) {
+ prefixes.add(namespace.getString(i));
+ }
+
+ String[] expectedNamespaces = new String[] {"dna", "jcr", "nt", "mix", "sv", "xml", "dnaint", "xmlns", "xsi", "xsd"};
+ for (int i = 0; i < expectedNamespaces.length; i++) {
+ assertTrue(prefixes.contains(expectedNamespaces[i]));
+ }
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_OK));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldNotRetrieveNonExistentNode() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/foo");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_NOT_FOUND));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldNotRetrieveNonExistentProperty() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/jcr:system/foobar");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_NOT_FOUND));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldRetrieveProperty() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/jcr:system/jcr:primaryType");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ String body = getResponseFor(connection);
+ assertThat(body, is("\"dna:system\""));
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_OK));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldPostNodeToValidPathWithPrimaryType() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/nodeA");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("POST");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ String payload = "{ \"properties\": {\"jcr:primaryType\": \"nt:unstructured\", \"testProperty\": \"testValue\", \"multiValuedProperty\": [\"value1\", \"value2\"]}}";
+ connection.getOutputStream().write(payload.getBytes());
+
+ JSONObject body = new JSONObject(getResponseFor(connection));
+ assertThat(body.length(), is(1));
+
+ JSONObject properties = body.getJSONObject("properties");
+ assertThat(properties, is(notNullValue()));
+ assertThat(properties.length(), is(3));
+ assertThat(properties.getString("jcr:primaryType"), is("nt:unstructured"));
+ assertThat(properties.getString("testProperty"), is("testValue"));
+ assertThat(properties.get("multiValuedProperty"), instanceOf(JSONArray.class));
+
+ JSONArray values = properties.getJSONArray("multiValuedProperty");
+ assertThat(values, is(notNullValue()));
+ assertThat(values.length(), is(2));
+ assertThat(values.getString(0), is("value1"));
+ assertThat(values.getString(1), is("value2"));
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_CREATED));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldPostNodeToValidPathWithoutPrimaryType() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/noPrimaryType");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("POST");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ String payload = "{}";
+ connection.getOutputStream().write(payload.getBytes());
+
+ JSONObject body = new JSONObject(getResponseFor(connection));
+ assertThat(body.length(), is(1));
+
+ JSONObject properties = body.getJSONObject("properties");
+ assertThat(properties, is(notNullValue()));
+ assertThat(properties.length(), is(1));
+ assertThat(properties.getString("jcr:primaryType"), is("nt:base"));
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_CREATED));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldPostNodeToValidPathWithMixinTypes() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/withMixinType");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("POST");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ String payload = "{ \"properties\": {\"jcr:mixinTypes\": \"mix:referenceable\"}}";
+ connection.getOutputStream().write(payload.getBytes());
+
+ JSONObject body = new JSONObject(getResponseFor(connection));
+ assertThat(body.length(), is(1));
+
+ 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:uuid"), is(notNullValue()));
+
+ JSONArray values = properties.getJSONArray("jcr:mixinTypes");
+ assertThat(values, is(notNullValue()));
+ assertThat(values.length(), is(1));
+ assertThat(values.getString(0), is("mix:referenceable"));
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_CREATED));
+ connection.disconnect();
+
+ postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/withMixinType");
+ connection = (HttpURLConnection)postUrl.openConnection();
+
+ // Make sure that we can retrieve the node with a GET
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+ body = new JSONObject(getResponseFor(connection));
+
+ assertThat(body.length(), is(1));
+
+ 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:uuid"), is(notNullValue()));
+
+ values = properties.getJSONArray("jcr:mixinTypes");
+ assertThat(values, is(notNullValue()));
+ assertThat(values.length(), is(1));
+ assertThat(values.getString(0), is("mix:referenceable"));
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_OK));
+ connection.disconnect();
+
+ }
+
+ @Test
+ public void shouldNotPostNodeAtInvalidParentPath() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/foo/bar");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_NOT_FOUND));
+ connection.disconnect();
+
+ }
+
+ @Test
+ public void shouldNotPostNodeWithInvalidPrimaryType() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/invalidPrimaryType");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("POST");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ String payload = "{ \"properties\": {\"jcr:primaryType\": \"invalidType\", \"testProperty\": \"testValue\", \"multiValuedProperty\": [\"value1\", \"value2\"]}}";
+ connection.getOutputStream().write(payload.getBytes());
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_BAD_REQUEST));
+ connection.disconnect();
+
+ postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/invalidPrimaryType");
+ connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_NOT_FOUND));
+ connection.disconnect();
+
+ }
+
+ @Test
+ public void shouldPostNodeHierarchy() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/nestedPost");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("POST");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ String payload = "{ \"properties\": {\"jcr:primaryType\": \"nt:unstructured\", \"testProperty\": \"testValue\", \"multiValuedProperty\": [\"value1\", \"value2\"]},"
+ + " \"children\": { \"childNode\" : { \"properties\": {\"nestedProperty\": \"nestedValue\"}}}}";
+
+ connection.getOutputStream().write(payload.getBytes());
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_CREATED));
+ connection.disconnect();
+
+ postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/nestedPost?dna:depth=1");
+ connection = (HttpURLConnection)postUrl.openConnection();
+
+ // Make sure that we can retrieve the node with a GET
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+ JSONObject body = new JSONObject(getResponseFor(connection));
+
+ assertThat(body.length(), is(2));
+
+ JSONObject properties = body.getJSONObject("properties");
+ assertThat(properties, is(notNullValue()));
+ assertThat(properties.length(), is(3));
+ assertThat(properties.getString("jcr:primaryType"), is("nt:unstructured"));
+ assertThat(properties.getString("testProperty"), is("testValue"));
+ assertThat(properties.get("multiValuedProperty"), instanceOf(JSONArray.class));
+
+ JSONArray values = properties.getJSONArray("multiValuedProperty");
+ assertThat(values, is(notNullValue()));
+ assertThat(values.length(), is(2));
+ assertThat(values.getString(0), is("value1"));
+ assertThat(values.getString(1), is("value2"));
+
+ JSONObject children = body.getJSONObject("children");
+ assertThat(children, is(notNullValue()));
+ assertThat(children.length(), is(1));
+
+ JSONObject child = children.getJSONObject("childNode");
+ assertThat(child, is(notNullValue()));
+ assertThat(child.length(), is(1));
+
+ properties = child.getJSONObject("properties");
+ assertThat(properties, is(notNullValue()));
+ assertThat(properties.length(), is(2));
+ // Parent primary type is nt:unstructured, so this should default to nt:unstructured primary type
+ assertThat(properties.getString("jcr:primaryType"), is("nt:unstructured"));
+ assertThat(properties.getString("nestedProperty"), is("nestedValue"));
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_OK));
+ connection.disconnect();
+
+ }
+
+ @Test
+ public void shouldFailWholeTransactionIfOneNodeIsBad() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/invalidNestedPost");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("POST");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ String payload = "{ \"properties\": {\"jcr:primaryType\": \"nt:unstructured\", \"testProperty\": \"testValue\", \"multiValuedProperty\": [\"value1\", \"value2\"]},"
+ + " \"children\": { \"childNode\" : { \"properties\": {\"jcr:primaryType\": \"invalidType\"}}}}";
+ connection.getOutputStream().write(payload.getBytes());
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_BAD_REQUEST));
+ connection.disconnect();
+
+ postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/invalidNestedPost?dna:depth=1");
+ connection = (HttpURLConnection)postUrl.openConnection();
+
+ // Make sure that we can retrieve the node with a GET
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_NOT_FOUND));
+ connection.disconnect();
+
+ }
+
+ @Test
+ public void shouldNotDeleteNonExistentItem() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/invalidItemForDelete");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("DELETE");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_NOT_FOUND));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldDeleteExtantNode() throws Exception {
+
+ // Create the node
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/nodeForDeletion");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("POST");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ String payload = "{ \"properties\": {\"jcr:primaryType\": \"nt:unstructured\", \"testProperty\": \"testValue\", \"multiValuedProperty\": [\"value1\", \"value2\"]}}";
+ connection.getOutputStream().write(payload.getBytes());
+
+ JSONObject body = new JSONObject(getResponseFor(connection));
+ assertThat(body.length(), is(1));
+
+ JSONObject properties = body.getJSONObject("properties");
+ assertThat(properties, is(notNullValue()));
+ assertThat(properties.length(), is(3));
+ assertThat(properties.getString("jcr:primaryType"), is("nt:unstructured"));
+ assertThat(properties.getString("testProperty"), is("testValue"));
+ assertThat(properties.get("multiValuedProperty"), instanceOf(JSONArray.class));
+
+ JSONArray values = properties.getJSONArray("multiValuedProperty");
+ assertThat(values, is(notNullValue()));
+ assertThat(values.length(), is(2));
+ assertThat(values.getString(0), is("value1"));
+ assertThat(values.getString(1), is("value2"));
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_CREATED));
+ connection.disconnect();
+
+ // Confirm that it exists
+ postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/nodeForDeletion");
+ connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_OK));
+ connection.disconnect();
+
+ // Delete the node
+ postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/nodeForDeletion");
+ connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("DELETE");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_NO_CONTENT));
+ connection.disconnect();
+
+ // Confirm that it no longer exists
+ postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/nodeForDeletion");
+ connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_NOT_FOUND));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldDeleteExtantProperty() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/propertyForDeletion");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("POST");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ String payload = "{ \"properties\": {\"jcr:primaryType\": \"nt:unstructured\", \"testProperty\": \"testValue\", \"multiValuedProperty\": [\"value1\", \"value2\"]}}";
+ connection.getOutputStream().write(payload.getBytes());
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_CREATED));
+ connection.disconnect();
+
+ // Confirm that it exists
+ postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/propertyForDeletion");
+ connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ JSONObject body = new JSONObject(getResponseFor(connection));
+ assertThat(body.length(), is(1));
+
+ JSONObject properties = body.getJSONObject("properties");
+ assertThat(properties, is(notNullValue()));
+ assertThat(properties.length(), is(3));
+ assertThat(properties.getString("jcr:primaryType"), is("nt:unstructured"));
+ assertThat(properties.getString("testProperty"), is("testValue"));
+ assertThat(properties.get("multiValuedProperty"), instanceOf(JSONArray.class));
+
+ JSONArray values = properties.getJSONArray("multiValuedProperty");
+ assertThat(values, is(notNullValue()));
+ assertThat(values.length(), is(2));
+ assertThat(values.getString(0), is("value1"));
+ assertThat(values.getString(1), is("value2"));
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_OK));
+ connection.disconnect();
+
+ // Delete the property
+ postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/propertyForDeletion/multiValuedProperty");
+ connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("DELETE");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_NO_CONTENT));
+ connection.disconnect();
+
+ // Confirm that it no longer exists
+ postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/propertyForDeletion");
+ connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ body = new JSONObject(getResponseFor(connection));
+ assertThat(body.length(), is(1));
+
+ properties = body.getJSONObject("properties");
+ assertThat(properties, is(notNullValue()));
+ assertThat(properties.length(), is(2));
+ assertThat(properties.getString("jcr:primaryType"), is("nt:unstructured"));
+ assertThat(properties.getString("testProperty"), is("testValue"));
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_OK));
+ connection.disconnect();
+
+ }
+
+ @Test
+ public void shouldNotBeAbleToPutAtInvalidPath() throws Exception {
+
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/nonexistantNode");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("PUT");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ String payload = "{ \"firstProperty\": \"someValue\" }";
+ connection.getOutputStream().write(payload.getBytes());
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_NOT_FOUND));
+ connection.disconnect();
+ }
+
+ @Test
+ public void shouldBeAbleToPutValueToProperty() throws Exception {
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/nodeForPutProperty");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("POST");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ String payload = "{ \"properties\": {\"jcr:primaryType\": \"nt:unstructured\", \"testProperty\": \"testValue\" }}";
+ connection.getOutputStream().write(payload.getBytes());
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_CREATED));
+ connection.disconnect();
+
+ postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/nodeForPutProperty/testProperty");
+ connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("PUT");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ payload = "\"someOtherValue\"";
+ connection.getOutputStream().write(payload.getBytes());
+
+ JSONObject body = new JSONObject(getResponseFor(connection));
+ assertThat(body.length(), is(1));
+
+ JSONObject properties = body.getJSONObject("properties");
+ assertThat(properties, is(notNullValue()));
+ assertThat(properties.length(), is(2));
+ assertThat(properties.getString("jcr:primaryType"), is("nt:unstructured"));
+ assertThat(properties.getString("testProperty"), is("someOtherValue"));
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_OK));
+ connection.disconnect();
+
+ }
+
+ @Test
+ public void shouldNotBeAbleToPutPropertiesToNode() throws Exception {
+
+ URL postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/nodeForPutProperties");
+ HttpURLConnection connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("POST");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ String payload = "{ \"properties\": {\"jcr:primaryType\": \"nt:unstructured\" }}";
+ connection.getOutputStream().write(payload.getBytes());
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_CREATED));
+ connection.disconnect();
+
+ postUrl = new URL(SERVER_URL + "/JCR%20Repository/%3cdefault%3e/items/nodeForPutProperties");
+ connection = (HttpURLConnection)postUrl.openConnection();
+
+ connection.setDoOutput(true);
+ connection.setRequestMethod("PUT");
+ connection.setRequestProperty("Content-Type", MediaType.APPLICATION_JSON);
+
+ payload = "{\"testProperty\": \"testValue\", \"multiValuedProperty\": [\"value1\", \"value2\"]}";
+ connection.getOutputStream().write(payload.getBytes());
+
+ JSONObject body = new JSONObject(getResponseFor(connection));
+ assertThat(body.length(), is(1));
+
+ JSONObject properties = body.getJSONObject("properties");
+ assertThat(properties, is(notNullValue()));
+ assertThat(properties.length(), is(3));
+ assertThat(properties.getString("jcr:primaryType"), is("nt:unstructured"));
+ assertThat(properties.getString("testProperty"), is("testValue"));
+ assertThat(properties.get("multiValuedProperty"), instanceOf(JSONArray.class));
+
+ JSONArray values = properties.getJSONArray("multiValuedProperty");
+ assertThat(values, is(notNullValue()));
+ assertThat(values.length(), is(2));
+ assertThat(values.getString(0), is("value1"));
+ assertThat(values.getString(1), is("value2"));
+
+ assertThat(connection.getResponseCode(), is(HttpURLConnection.HTTP_OK));
+ connection.disconnect();
+
+ }
+}
Property changes on: trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/dna/web/jcr/JcrResourcesTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/extensions/dna-web-jcr-rest-war/src/test/resources/dna-test-users.props
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/src/test/resources/dna-test-users.props (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/src/test/resources/dna-test-users.props 2009-05-28 13:28:05 UTC (rev 944)
@@ -0,0 +1 @@
+dnauser=password,readwrite
Added: trunk/extensions/dna-web-jcr-rest-war/src/test/resources/jetty-dna.policy
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/src/test/resources/jetty-dna.policy (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/src/test/resources/jetty-dna.policy 2009-05-28 13:28:05 UTC (rev 944)
@@ -0,0 +1,5 @@
+dna-jcr {
+ org.mortbay.jetty.plus.jaas.spi.PropertyFileLoginModule optional
+ debug="true"
+ file="target/test-classes/dna-test-users.props";
+};
Added: trunk/extensions/dna-web-jcr-rest-war/src/test/resources/jetty-jaas.xml
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/src/test/resources/jetty-jaas.xml (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/src/test/resources/jetty-jaas.xml 2009-05-28 13:28:05 UTC (rev 944)
@@ -0,0 +1,9 @@
+<Call name="addUserRealm">
+ <Arg>
+ <New class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
+ <Set name="name">xyzrealm</Set>
+ <Set name="LoginModuleName">dna-jcr</Set>
+ </New>
+ </Arg>
+</Call>
+
Property changes on: trunk/extensions/dna-web-jcr-rest-war/src/test/resources/jetty-jaas.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/extensions/dna-web-jcr-rest-war/src/test/resources/log4j.properties
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/src/test/resources/log4j.properties (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/src/test/resources/log4j.properties 2009-05-28 13:28:05 UTC (rev 944)
@@ -0,0 +1,13 @@
+log4j.rootLogger = DEBUG, stdout
+
+log4j.category.org.apache=INFO
+log4j.category.org.jboss.resteasy=INFO
+log4j.category.org.mortbay=DEBUG
+log4j.category.org.slf4j.impl.JCLLoggerAdapter=INFO
+log4j.category.org.springframework=INFO
+
+log4j.appender.stdout = org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Threshold = DEBUG
+log4j.appender.stdout.Target = System.out
+log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern = [%-5p] [%C{1}] : %m%n
15 years, 1 month
DNA SVN: r943 - trunk/extensions/dna-web-jcr-rest/src.
by dna-commits@lists.jboss.org
Author: bcarothers
Date: 2009-05-28 09:22:38 -0400 (Thu, 28 May 2009)
New Revision: 943
Removed:
trunk/extensions/dna-web-jcr-rest/src/test/
Log:
DNA-312 Implement HTTP GET action for any resource at any path (folder or file)
Backed out prior change, which somehow got committed to the wrong project.
15 years, 1 month
DNA SVN: r942 - in trunk/extensions/dna-web-jcr-rest/src/test: resources and 1 other directory.
by dna-commits@lists.jboss.org
Author: bcarothers
Date: 2009-05-28 09:10:38 -0400 (Thu, 28 May 2009)
New Revision: 942
Added:
trunk/extensions/dna-web-jcr-rest/src/test/resources/
trunk/extensions/dna-web-jcr-rest/src/test/resources/dna-test-users.props
trunk/extensions/dna-web-jcr-rest/src/test/resources/jetty-dna.policy
trunk/extensions/dna-web-jcr-rest/src/test/resources/jetty-jaas.xml
trunk/extensions/dna-web-jcr-rest/src/test/resources/log4j.properties
Log:
DNA-312 DNA-312 Implement HTTP GET action for any resource at any path (folder or file)
Adding some missing test files (1 of 2)
Added: trunk/extensions/dna-web-jcr-rest/src/test/resources/dna-test-users.props
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/test/resources/dna-test-users.props (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/src/test/resources/dna-test-users.props 2009-05-28 13:10:38 UTC (rev 942)
@@ -0,0 +1 @@
+dnauser=password,readwrite
Added: trunk/extensions/dna-web-jcr-rest/src/test/resources/jetty-dna.policy
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/test/resources/jetty-dna.policy (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/src/test/resources/jetty-dna.policy 2009-05-28 13:10:38 UTC (rev 942)
@@ -0,0 +1,5 @@
+dna-jcr {
+ org.mortbay.jetty.plus.jaas.spi.PropertyFileLoginModule optional
+ debug="true"
+ file="target/test-classes/dna-test-users.props";
+};
Added: trunk/extensions/dna-web-jcr-rest/src/test/resources/jetty-jaas.xml
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/test/resources/jetty-jaas.xml (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/src/test/resources/jetty-jaas.xml 2009-05-28 13:10:38 UTC (rev 942)
@@ -0,0 +1,9 @@
+<Call name="addUserRealm">
+ <Arg>
+ <New class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
+ <Set name="name">xyzrealm</Set>
+ <Set name="LoginModuleName">dna-jcr</Set>
+ </New>
+ </Arg>
+</Call>
+
Property changes on: trunk/extensions/dna-web-jcr-rest/src/test/resources/jetty-jaas.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/extensions/dna-web-jcr-rest/src/test/resources/log4j.properties
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/test/resources/log4j.properties (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/src/test/resources/log4j.properties 2009-05-28 13:10:38 UTC (rev 942)
@@ -0,0 +1,13 @@
+log4j.rootLogger = DEBUG, stdout
+
+log4j.category.org.apache=INFO
+log4j.category.org.jboss.resteasy=INFO
+log4j.category.org.mortbay=DEBUG
+log4j.category.org.slf4j.impl.JCLLoggerAdapter=INFO
+log4j.category.org.springframework=INFO
+
+log4j.appender.stdout = org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Threshold = DEBUG
+log4j.appender.stdout.Target = System.out
+log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern = [%-5p] [%C{1}] : %m%n
15 years, 1 month
DNA SVN: r941 - in trunk: dna-jcr/src/main/java/org/jboss/dna/jcr and 22 other directories.
by dna-commits@lists.jboss.org
Author: bcarothers
Date: 2009-05-28 08:57:37 -0400 (Thu, 28 May 2009)
New Revision: 941
Added:
trunk/extensions/dna-web-jcr-rest-war/
trunk/extensions/dna-web-jcr-rest-war/.classpath
trunk/extensions/dna-web-jcr-rest-war/.project
trunk/extensions/dna-web-jcr-rest-war/.settings/
trunk/extensions/dna-web-jcr-rest-war/.settings/.jsdtscope
trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.jdt.core.prefs
trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.common.component
trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/extensions/dna-web-jcr-rest-war/.settings/org.maven.ide.eclipse.prefs
trunk/extensions/dna-web-jcr-rest-war/pom.xml
trunk/extensions/dna-web-jcr-rest-war/src/
trunk/extensions/dna-web-jcr-rest-war/src/main/
trunk/extensions/dna-web-jcr-rest-war/src/main/webapp/
trunk/extensions/dna-web-jcr-rest-war/src/main/webapp/META-INF/
trunk/extensions/dna-web-jcr-rest-war/src/main/webapp/META-INF/MANIFEST.MF
trunk/extensions/dna-web-jcr-rest-war/src/main/webapp/WEB-INF/
trunk/extensions/dna-web-jcr-rest-war/src/main/webapp/WEB-INF/lib/
trunk/extensions/dna-web-jcr-rest-war/src/main/webapp/WEB-INF/web.xml
trunk/extensions/dna-web-jcr-rest-war/src/test/
trunk/extensions/dna-web-jcr-rest-war/src/test/java/
trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/
trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/
trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/dna/
trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/dna/web/
trunk/extensions/dna-web-jcr-rest-war/src/test/java/org/jboss/dna/web/jcr/
trunk/extensions/dna-web-jcr-rest/.settings/
trunk/extensions/dna-web-jcr-rest/.settings/org.eclipse.jdt.core.prefs
trunk/extensions/dna-web-jcr-rest/.settings/org.eclipse.wst.common.component
trunk/extensions/dna-web-jcr-rest/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/extensions/dna-web-jcr-rest/.settings/org.maven.ide.eclipse.prefs
trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/DnaJcrDeployer.java
trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/RepositoryFactory.java
trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/
trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/RepositoryEntry.java
trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/RepositoryResources.java
trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/WorkspaceEntry.java
trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/WorkspaceResources.java
trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/spi/
trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/spi/DnaJcrRepositoryProvider.java
trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/spi/RepositoryProvider.java
Removed:
trunk/extensions/dna-web-jcr-rest/src/main/resources/
trunk/extensions/dna-web-jcr-rest/src/test/java/
Modified:
trunk/dna-graph/src/main/java/org/jboss/dna/graph/ExecutionContext.java
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrEngine.java
trunk/extensions/dna-web-jcr-rest/.classpath
trunk/extensions/dna-web-jcr-rest/.project
trunk/extensions/dna-web-jcr-rest/pom.xml
trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/JcrResources.java
trunk/extensions/dna-web-jcr-rest/src/main/webapp/WEB-INF/web.xml
Log:
DNA-312 Implement HTTP GET action for any resource at any path (folder or file)
Applied patch that provides GET, PUT, DELETE, and POST support for items as well as GET support for workspaces and repositories. Further detail and documentation for the patch is attached as a comment to DNA-312.
Modified: trunk/dna-graph/src/main/java/org/jboss/dna/graph/ExecutionContext.java
===================================================================
--- trunk/dna-graph/src/main/java/org/jboss/dna/graph/ExecutionContext.java 2009-05-28 02:13:55 UTC (rev 940)
+++ trunk/dna-graph/src/main/java/org/jboss/dna/graph/ExecutionContext.java 2009-05-28 12:57:37 UTC (rev 941)
@@ -42,6 +42,7 @@
import org.jboss.dna.common.component.StandardClassLoaderFactory;
import org.jboss.dna.common.util.CheckArg;
import org.jboss.dna.common.util.Logger;
+import org.jboss.dna.common.util.Reflection;
import org.jboss.dna.graph.connector.federation.FederatedLexicon;
import org.jboss.dna.graph.mimetype.ExtensionBasedMimeTypeDetector;
import org.jboss.dna.graph.mimetype.MimeTypeDetector;
@@ -528,6 +529,9 @@
* @see javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
*/
public void handle( Callback[] callbacks ) throws UnsupportedCallbackException, IOException {
+ boolean userSet = false;
+ boolean passwordSet = false;
+
for (int i = 0; i < callbacks.length; i++) {
if (callbacks[i] instanceof TextOutputCallback) {
@@ -563,6 +567,7 @@
}
nc.setName(this.userId);
+ userSet = true;
} else if (callbacks[i] instanceof PasswordCallback) {
@@ -573,9 +578,32 @@
System.out.flush();
}
pc.setPassword(this.password);
+ passwordSet = true;
} else {
- throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback");
+ /*
+ * Jetty uses its own callback for setting the password. Since we're using Jetty for integration
+ * testing of the web project(s), we have to accomodate this. Rather than introducing a direct
+ * dependency, we'll add code to handle the case of unexpected callback handlers with a setObject method.
+ */
+ try {
+ // Assume that a callback chain will ask for the user before the password
+ if (!userSet) {
+ new Reflection(callbacks[i].getClass()).invokeSetterMethodOnTarget("object", callbacks[i], this.userId);
+ userSet = true;
+ }
+ else if (!passwordSet) {
+ // Jetty also seems to eschew passing passwords as char arrays
+ new Reflection(callbacks[i].getClass()).invokeSetterMethodOnTarget("object", callbacks[i], new String(this.password));
+ passwordSet = true;
+ }
+ // It worked - need to continue processing the callbacks
+ continue;
+ } catch (Exception ex) {
+ // If the property cannot be set, fall through to the failure
+ }
+ throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback: "
+ + callbacks[i].getClass().getName());
}
}
Modified: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrEngine.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrEngine.java 2009-05-28 02:13:55 UTC (rev 940)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrEngine.java 2009-05-28 12:57:37 UTC (rev 941)
@@ -23,7 +23,10 @@
*/
package org.jboss.dna.jcr;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
@@ -44,6 +47,7 @@
import org.jboss.dna.graph.property.Property;
import org.jboss.dna.jcr.JcrRepository.Option;
import org.jboss.dna.repository.DnaEngine;
+import org.jboss.dna.repository.RepositoryLibrary;
import org.jboss.dna.repository.RepositoryService;
import org.jboss.dna.repository.sequencer.SequencingService;
@@ -103,6 +107,24 @@
}
/**
+ * Returns a list of the names of all available JCR repositories.
+ * <p>
+ * In a {@code JcrEngine}, the available repositories are {@link RepositoryLibrary#getSourceNames() all repositories} except
+ * for the {@link RepositoryService#getConfigurationSourceName() the configuration repository}.
+ * </p>
+ *
+ * @return a list of all repository names.
+ */
+ public final Collection<String> getJcrRepositoryNames() {
+ List<String> jcrRepositories = new ArrayList<String>();
+ jcrRepositories.addAll(getRepositoryService().getRepositoryLibrary().getSourceNames());
+
+ jcrRepositories.remove(getRepositoryService().getConfigurationSourceName());
+
+ return jcrRepositories;
+ }
+
+ /**
* Get the {@link Repository} implementation for the named repository.
*
* @param repositoryName the name of the repository, which corresponds to the name of a configured {@link RepositorySource}
Modified: trunk/extensions/dna-web-jcr-rest/.classpath
===================================================================
--- trunk/extensions/dna-web-jcr-rest/.classpath 2009-05-28 02:13:55 UTC (rev 940)
+++ trunk/extensions/dna-web-jcr-rest/.classpath 2009-05-28 12:57:37 UTC (rev 941)
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="src" path="src/main/resources"/>
- <classpathentry kind="src" path="src/test/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: trunk/extensions/dna-web-jcr-rest/.project
===================================================================
--- trunk/extensions/dna-web-jcr-rest/.project 2009-05-28 02:13:55 UTC (rev 940)
+++ trunk/extensions/dna-web-jcr-rest/.project 2009-05-28 12:57:37 UTC (rev 941)
@@ -1,23 +1,36 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>dna-web-jcr-rest</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>dna-web-jcr-rest</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
Added: trunk/extensions/dna-web-jcr-rest/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/extensions/dna-web-jcr-rest/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/.settings/org.eclipse.jdt.core.prefs 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,7 @@
+#Wed May 27 16:41:15 EDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/extensions/dna-web-jcr-rest/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/extensions/dna-web-jcr-rest/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/.settings/org.eclipse.wst.common.component 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="dna-web-jcr-rest">
+ <wb-resource deploy-path="/" source-path="/src/main/java"/>
+ <wb-resource deploy-path="/" source-path="/src/main/resources"/>
+ <wb-resource deploy-path="/" source-path="/src/test/java"/>
+ <wb-resource deploy-path="/" source-path="/src/test/resources"/>
+ </wb-module>
+</project-modules>
Added: trunk/extensions/dna-web-jcr-rest/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/extensions/dna-web-jcr-rest/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/.settings/org.eclipse.wst.common.project.facet.core.xml 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.utility" version="1.0"/>
+</faceted-project>
Property changes on: trunk/extensions/dna-web-jcr-rest/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/extensions/dna-web-jcr-rest/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- trunk/extensions/dna-web-jcr-rest/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/.settings/org.maven.ide.eclipse.prefs 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,9 @@
+#Wed May 27 16:24:52 EDT 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
Modified: trunk/extensions/dna-web-jcr-rest/pom.xml
===================================================================
--- trunk/extensions/dna-web-jcr-rest/pom.xml 2009-05-28 02:13:55 UTC (rev 940)
+++ trunk/extensions/dna-web-jcr-rest/pom.xml 2009-05-28 12:57:37 UTC (rev 941)
@@ -7,9 +7,8 @@
<version>0.5-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
- <groupId>org.jboss.dna</groupId>
<artifactId>dna-web-jcr-rest</artifactId>
- <packaging>war</packaging>
+ <packaging>jar</packaging>
<name>JBoss DNA JCR REST Servlet</name>
<description>JBoss DNA servlet that provides RESTful access to JCR items</description>
<url>http://labs.jboss.org/dna</url>
@@ -19,7 +18,26 @@
<artifactId>resteasy-jaxrs</artifactId>
<version>1.1-RC2</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-jaxb-provider</artifactId>
+ <version>1.1-RC2</version>
+ <!--
+ <scope>runtime, integration-test</scope>
+ -->
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-jcr</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.4.3</version>
+ <scope>runtime</scope>
+ </dependency>
<!--
Java Content Repository API
-->
@@ -42,57 +60,10 @@
<scope>integration-test</scope>
</dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.1</version>
+ </dependency>
</dependencies>
- <build>
- <finalName>resources</finalName>
- <plugins>
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <executions>
- <execution>
- <id>start-container</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <wait>false</wait>
- </configuration>
- </plugin>
- <!--
- Override the default Surefire behavior to run during
- integration-test phase
- -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- <executions>
- <execution>
- <id>surefire-it</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skip>false</skip>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
</project>
Added: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/DnaJcrDeployer.java
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/DnaJcrDeployer.java (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/DnaJcrDeployer.java 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,25 @@
+package org.jboss.dna.web.jcr.rest;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+
+
+public class DnaJcrDeployer implements ServletContextListener {
+
+ public static final String DEFAULT_JNDI_NAME = "java:comp/env/org/jboss/dna/Engine";
+
+ public static final String SYSTEM_PROPERTY_JNDI_NAME = "org.jboss.dna.dnaEngineJndiName";
+
+ public static final String INIT_PARAMETER_JNDI_NAME = "org.jboss.dna.dnaEngineJndiName";
+
+ public void contextDestroyed( ServletContextEvent event ) {
+ RepositoryFactory.shutdown();
+ }
+
+ /**
+ * Mounts a DNA engine
+ */
+ public void contextInitialized( ServletContextEvent event ) {
+ RepositoryFactory.initialize(event.getServletContext());
+ }
+}
Property changes on: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/DnaJcrDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/JcrResources.java
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/JcrResources.java 2009-05-28 02:13:55 UTC (rev 940)
+++ trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/JcrResources.java 2009-05-28 12:57:37 UTC (rev 941)
@@ -23,9 +23,49 @@
*/
package org.jboss.dna.web.jcr.rest;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import javax.jcr.Credentials;
+import javax.jcr.Item;
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.Property;
+import javax.jcr.PropertyIterator;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.SimpleCredentials;
+import javax.jcr.Value;
+import javax.jcr.nodetype.PropertyDefinition;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+import javax.ws.rs.ext.ExceptionMapper;
+import javax.ws.rs.ext.Provider;
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.jboss.dna.common.text.UrlEncoder;
+import org.jboss.dna.web.jcr.rest.model.RepositoryEntry;
+import org.jboss.dna.web.jcr.rest.model.WorkspaceEntry;
+import org.jboss.resteasy.spi.NotFoundException;
+import org.jboss.resteasy.spi.UnauthorizedException;
/**
* RESTEasy handler to provide the JCR resources at the URIs below. Please note that these URIs assume a context of {@code
@@ -42,45 +82,23 @@
* <td>GET</td>
* </tr>
* <tr>
- * <td>/resources/repositories</td>
- * <td>returns a list of accessible repositories</td>
- * <td>GET</td>
- * </tr>
- * <tr>
* <td>/resources/{repositoryName}</td>
* <td>returns a list of accessible workspaces within that repository</td>
* <td>GET</td>
* </tr>
* <tr>
- * <td>/resources/{repositoryName}/workspaces</td>
- * <td>returns a list of accessible workspaces within that repository</td>
- * <td>GET</td>
- * </tr>
- * <tr>
* <td>/resources/{repositoryName}/{workspaceName}</td>
* <td>returns a list of operations within the workspace</td>
* <td>GET</td>
* </tr>
* <tr>
* <td>/resources/{repositoryName}/{workspaceName}/item/{path}</td>
- * <td>accesses the node at the path</td>
+ * <td>accesses the item (node or property) at the path</td>
* <td>ALL</td>
* </tr>
- * <tr>
- * <td>/resources/{repositoryName}/{workspaceName}/item/{path}/@{propertyName}</td>
- * <td>accesses the named property at the path</td>
- * <td>ALL (except PUT)</td>
- * </tr>
- * <tr>
- * <td>/resources/{repositoryName}/{workspaceName}/item/{path}/@{propertyName}</td>
- * <td>adds the value from the body to the named property at the path</td>
- * <td>PUT</td>
- * </tr>
- * <tr>
- * <td>/resources/{repositoryName}/{workspaceName}/uuid/{uuid}</td>
+ * <td>/resources/{repositoryName}/{workspaceName}/node/{uuid}</td>
* <td>accesses the node with the given UUID</td>
- * <td>ALL</td>
- * </tr>
+ * <td>ALL</td> </tr>
* <tr>
* <td>/resources/{repositoryName}/{workspaceName}/lock/{path}</td>
* <td>locks the node at the path</td>
@@ -96,25 +114,543 @@
@Path( "/" )
public class JcrResources {
+ private static final UrlEncoder URL_ENCODER = new UrlEncoder();
+
+ private static final String PROPERTIES_HOLDER = "properties";
+ private static final String CHILD_NODE_HOLDER = "children";
+
+ private static final String PRIMARY_TYPE_PROPERTY = "jcr:primaryType";
+ private static final String MIXIN_TYPES_PROPERTY = "jcr:mixinTypes";
+
+ /** Name to be used when the repository name is empty string as {@code "//"} is not a valid path. */
+ public static final String EMPTY_REPOSITORY_NAME = "<default>";
+ /** Name to be used when the workspace name is empty string as {@code "//"} is not a valid path. */
+ public static final String EMPTY_WORKSPACE_NAME = "<default>";
+
/**
+ * Returns a reference to the named repository, if it exists.
+ *
+ * @param repositoryName the name of the repository to load
+ * @return the repository
+ * @throws RepositoryException if any other error occurs
+ */
+ private Repository getRepository( String repositoryName ) throws RepositoryException {
+ return RepositoryFactory.getRepository(repositoryName);
+ }
+
+ /**
+ * Returns an active session for the given workspace name in the named repository.
+ *
+ * @param rawRepositoryName the URL-encoded name of the repository in which the session is created
+ * @param rawWorkspaceName the URL-endecoded name of the workspace to which the session should be connected
+ * @return an active session with the given workspace in the named repository
+ * @throws RepositoryException if any other error occurs
+ */
+ private Session getSession( String rawRepositoryName,
+ String rawWorkspaceName ) throws NotFoundException, RepositoryException {
+
+ Repository repository;
+ try {
+ repository = getRepository(repositoryNameFor(rawRepositoryName));
+ } catch (RepositoryException re) {
+ throw new NotFoundException(re.getMessage(), re);
+ }
+
+ Credentials credentials = new SimpleCredentials("dnauser", "password".toCharArray());
+
+ return repository.login(credentials, workspaceNameFor(rawWorkspaceName));
+ }
+
+ /**
* Returns the list of JCR repositories available on this server
+ *
+ * @param request the servlet request; may not be null
* @return the list of JCR repositories available on this server
*/
@GET
- @Path( "/repositories" )
- public String repositories() {
- return "Hello, DNA!";
+ @Path( "/" )
+ @Produces( "application/json" )
+ public Map<String, RepositoryEntry> getRepositories( @Context HttpServletRequest request ) {
+ assert request != null;
+
+ Map<String, RepositoryEntry> repositories = new HashMap<String, RepositoryEntry>();
+
+ for (String name : RepositoryFactory.getJcrRepositoryNames()) {
+ if (name.trim().length() == 0) {
+ name = EMPTY_REPOSITORY_NAME;
+ }
+ name = URL_ENCODER.encode(name);
+ repositories.put(name, new RepositoryEntry(request.getContextPath(), name));
+ }
+
+ return repositories;
}
/**
* Returns the list of workspaces available to this user within the named repository.
- * @param repositoryName the name of the repository
+ *
+ * @param rawRepositoryName the name of the repository; may not be null
+ * @param request the servlet request; may not be null
* @return the list of workspaces available to this user within the named repository.
+ * @throws IOException if the given repository name does not map to any repositories and there is an error writing the error
+ * code to the response.
+ * @throws RepositoryException if there is any other error accessing the list of available workspaces for the repository
*/
@GET
- @Path( "/{repositoryName}/workspaces" )
- public String workspaces( @PathParam( "repositoryName" ) String repositoryName ) {
+ @Path( "/{repositoryName}" )
+ @Produces( "application/json" )
+ public Map<String, WorkspaceEntry> getWorkspaces( @Context HttpServletRequest request,
+ @PathParam( "repositoryName" ) String rawRepositoryName )
+ throws RepositoryException, IOException {
+
+ assert request != null;
+ assert rawRepositoryName != null;
+
+ Map<String, WorkspaceEntry> workspaces = new HashMap<String, WorkspaceEntry>();
+
+ Session session = getSession(rawRepositoryName, null);
+ rawRepositoryName = URL_ENCODER.encode(rawRepositoryName);
+
+ for (String name : session.getWorkspace().getAccessibleWorkspaceNames()) {
+ if (name.trim().length() == 0) {
+ name = EMPTY_WORKSPACE_NAME;
+ }
+ name = URL_ENCODER.encode(name);
+ workspaces.put(name, new WorkspaceEntry(request.getContextPath(), rawRepositoryName, name));
+ }
+
+ return workspaces;
+ }
+
+ /**
+ * Handles GET requests for an item in a workspace.
+ *
+ * @param rawRepositoryName the URL-encoded repository name
+ * @param rawWorkspaceName the URL-encoded workspace name
+ * @param path the path to the item
+ * @param depth the depth of the node graph that should be returned if {@code path} refers to a node. @{code 0} means return
+ * the requested node only. A negative value indicates that the full subgraph under the node should be returned. This
+ * parameter defaults to {@code 0} and is ignored if {@code path} refers to a property.
+ * @return the JSON-encoded version of the item (and, if the item is a node, its subgraph, depending on the value of {@code
+ * depth})
+ * @throws NotFoundException if the named repository does not exists, the named workspace does not exist, or the user does not
+ * have access to the named workspace
+ * @throws JSONException if there is an error encoding the node
+ * @throws UnauthorizedException if the given login information is invalid
+ * @throws RepositoryException if any other error occurs
+ * @see #EMPTY_REPOSITORY_NAME
+ * @see #EMPTY_WORKSPACE_NAME
+ * @see Session#getItem(String)
+ */
+ @GET
+ @Path( "/{repositoryName}/{workspaceName}/items{path:.*}" )
+ @Produces( "application/json" )
+ public String getItem( @PathParam( "repositoryName" ) String rawRepositoryName,
+ @PathParam( "workspaceName" ) String rawWorkspaceName,
+ @PathParam( "path" ) String path,
+ @QueryParam( "dna:depth" ) @DefaultValue( "0" ) int depth )
+ throws JSONException, UnauthorizedException, RepositoryException {
+ assert path != null;
+ assert rawRepositoryName != null;
+ assert rawWorkspaceName != null;
+
+ Session session = getSession(rawRepositoryName, rawWorkspaceName);
+ Item item;
+
+ if ("/".equals(path) || "".equals(path)) {
+ item = session.getRootNode();
+ } else {
+ try {
+ item = session.getItem(path);
+ } catch (PathNotFoundException pnfe) {
+ throw new NotFoundException(pnfe.getMessage(), pnfe);
+ }
+ }
+
+ if (item instanceof Node) {
+ return jsonFor((Node)item, depth).toString();
+ }
+ return jsonFor((Property)item);
+ }
+
+ /**
+ * Returns the JSON-encoded version of the given property. If the property is single-valued, the returned string is {@code
+ * property.getValue().getString()} encoded as a JSON string. If the property is multi-valued with {@code N} values, this
+ * method returns a JSON array containing {@code property.getValues()[N].getString()} for all values of {@code N}.
+ *
+ * @param property the property to be encoded
+ * @return the JSON-encoded version of the property
+ * @throws RepositoryException if an error occurs accessing the property, its values, or its definition.
+ * @see Property#getDefinition()
+ * @see PropertyDefinition#isMultiple()
+ */
+ private String jsonFor( Property property ) throws RepositoryException {
+ if (property.getDefinition().isMultiple()) {
+ Value[] values = property.getValues();
+ List<String> list = new ArrayList<String>(values.length);
+ for (int i = 0; i < values.length; i++) {
+ list.add(values[i].getString());
+ }
+ return new JSONArray(list).toString();
+ }
+ return JSONObject.quote(property.getValue().getString());
+ }
+
+ /**
+ * Recursively returns the JSON-encoding of a node and its children to depth {@code toDepth}.
+ *
+ * @param node the node to be encoded
+ * @param toDepth the depth to which the recursion should extend; {@code 0} means no further recursion should occur.
+ * @return the JSON-encoding of a node and its children to depth {@code toDepth}.
+ * @throws JSONException if there is an error encoding the node
+ * @throws RepositoryException if any other error occurs
+ */
+ private JSONObject jsonFor( Node node,
+ int toDepth ) throws JSONException, RepositoryException {
+ JSONObject jsonNode = new JSONObject();
+
+ JSONObject properties = new JSONObject();
+
+ for (PropertyIterator iter = node.getProperties(); iter.hasNext();) {
+ Property prop = iter.nextProperty();
+ String propName = prop.getName();
+
+ if (prop.getDefinition().isMultiple()) {
+ Value[] values = prop.getValues();
+ JSONArray array = new JSONArray();
+ for (int i = 0; i < values.length; i++) {
+ array.put(values[i].getString());
+ }
+ properties.put(propName, array);
+
+ } else {
+ properties.put(propName, prop.getValue().getString());
+ }
+
+ }
+ if (properties.length() > 0) {
+ jsonNode.put(PROPERTIES_HOLDER, properties);
+ }
+
+ if (toDepth == 0) {
+ List<String> children = new ArrayList<String>();
+
+ for (NodeIterator iter = node.getNodes(); iter.hasNext();) {
+ Node child = iter.nextNode();
+
+ children.add(child.getName());
+ }
+
+ if (children.size() > 0) {
+ jsonNode.put(CHILD_NODE_HOLDER, new JSONArray(children));
+ }
+ } else {
+ JSONObject children = new JSONObject();
+
+ for (NodeIterator iter = node.getNodes(); iter.hasNext();) {
+ Node child = iter.nextNode();
+
+ children.put(child.getName(), jsonFor(child, toDepth - 1));
+ }
+
+ if (children.length() > 0) {
+ jsonNode.put(CHILD_NODE_HOLDER, children);
+ }
+ }
+
+ return jsonNode;
+ }
+
+ /**
+ * Adds the content of the request as a node (or subtree of nodes) at the location specified by {@code path}.
+ * <p>
+ * The primary type and mixin type(s) may optionally be specified through the {@code jcr:primaryType} and {@code
+ * jcr:mixinTypes} properties.
+ * </p>
+ *
+ * @param rawRepositoryName the URL-encoded repository name
+ * @param rawWorkspaceName the URL-encoded workspace name
+ * @param path the path to the item
+ * @param requestContent the JSON-encoded representation of the node or nodes to be added
+ * @return the JSON-encoded representation of the node or nodes that were added. This will differ from {@code requestContent}
+ * in that auto-created and protected properties (e.g., jcr:uuid) will be populated.
+ * @throws NotFoundException if the parent of the item to be added does not exist
+ * @throws UnauthorizedException if the user does not have the access required to create the node at this path
+ * @throws JSONException if there is an error encoding the node
+ * @throws RepositoryException if any other error occurs
+ */
+ @POST
+ @Path( "/{repositoryName}/{workspaceName}/items/{path:.*}" )
+ @Consumes( "application/json" )
+ public Response postItem( @PathParam( "repositoryName" ) String rawRepositoryName,
+ @PathParam( "workspaceName" ) String rawWorkspaceName,
+ @PathParam( "path" ) String path,
+ String requestContent )
+ throws NotFoundException, UnauthorizedException, RepositoryException, JSONException {
+
+ assert rawRepositoryName != null;
+ assert rawWorkspaceName != null;
+ assert path != null;
+ JSONObject body = new JSONObject(requestContent);
+
+ int lastSlashInd = path.lastIndexOf('/');
+ String parentPath = lastSlashInd == -1 ? "/" : "/" + path.substring(0, lastSlashInd);
+ String newNodeName = lastSlashInd == -1 ? path : path.substring(lastSlashInd + 1);
+
+ Session session = getSession(rawRepositoryName, rawWorkspaceName);
+
+ Node parentNode = (Node)session.getItem(parentPath);
+
+ Node newNode = addNode(parentNode, newNodeName, body);
+
+ session.save();
+
+ String json = jsonFor(newNode, -1).toString();
+ return Response.status(Status.CREATED).entity(json).build();
+ }
+
+ /**
+ * Adds the node described by {@code jsonNode} with name {@code nodeName} to the existing node {@code parentNode}.
+ *
+ * @param parentNode the parent of the node to be added
+ * @param nodeName the name of the node to be added
+ * @param jsonNode the JSON-encoded representation of the node or nodes to be added.
+ * @return the JSON-encoded representation of the node or nodes that were added. This will differ from {@code requestContent}
+ * in that auto-created and protected properties (e.g., jcr:uuid) will be populated.
+ * @throws JSONException if there is an error encoding the node
+ * @throws RepositoryException if any other error occurs
+ */
+ private Node addNode( Node parentNode,
+ String nodeName,
+ JSONObject jsonNode ) throws RepositoryException, JSONException {
+ Node newNode;
+
+ JSONObject properties = jsonNode.has(PROPERTIES_HOLDER) ? jsonNode.getJSONObject(PROPERTIES_HOLDER) : new JSONObject();
+
+ if (properties.has(PRIMARY_TYPE_PROPERTY)) {
+ String primaryType = properties.getString(PRIMARY_TYPE_PROPERTY);
+ newNode = parentNode.addNode(nodeName, primaryType);
+ } else {
+ newNode = parentNode.addNode(nodeName);
+ }
+
+ if (properties.has(MIXIN_TYPES_PROPERTY)) {
+ Object rawMixinTypes = properties.get(MIXIN_TYPES_PROPERTY);
+
+ if (rawMixinTypes instanceof JSONArray) {
+ JSONArray mixinTypes = (JSONArray)rawMixinTypes;
+ for (int i = 0; i < mixinTypes.length(); i++) {
+ newNode.addMixin(mixinTypes.getString(i));
+ }
+
+ } else {
+ newNode.addMixin(rawMixinTypes.toString());
+
+ }
+ }
+
+ for (Iterator<?> iter = properties.keys(); iter.hasNext();) {
+ String key = (String)iter.next();
+
+ if (PRIMARY_TYPE_PROPERTY.equals(key)) continue;
+ if (MIXIN_TYPES_PROPERTY.equals(key)) continue;
+ setPropertyOnNode(newNode, key, properties.get(key));
+ }
+
+ if (jsonNode.has(CHILD_NODE_HOLDER)) {
+ JSONObject children = jsonNode.getJSONObject(CHILD_NODE_HOLDER);
+
+ for (Iterator<?> iter = children.keys(); iter.hasNext();) {
+ String childName = (String)iter.next();
+ JSONObject child = children.getJSONObject(childName);
+
+ addNode(newNode, childName, child);
+ }
+ }
+
+ return newNode;
+ }
+
+ /**
+ * Sets the named property on the given node. This method expects {@code value} to be either a JSON string or a JSON array of
+ * JSON strings. If {@code value} is a JSON array, {@code Node#setProperty(String, String[]) the multi-valued property setter}
+ * will be used.
+ *
+ * @param node the node on which the property is to be set
+ * @param propName the name of the property to set
+ * @param value the JSON-encoded values to be set
+ * @throws RepositoryException if there is an error setting the property
+ * @throws JSONException if {@code value} cannot be decoded
+ */
+ private void setPropertyOnNode( Node node,
+ String propName,
+ Object value ) throws RepositoryException, JSONException {
+ if (value instanceof JSONArray) {
+ JSONArray jsonValues = (JSONArray)value;
+ String[] values = new String[jsonValues.length()];
+
+ for (int i = 0; i < values.length; i++) {
+ values[i] = jsonValues.getString(i);
+ }
+ node.setProperty(propName, values);
+ } else {
+ node.setProperty(propName, (String)value);
+ }
+
+ }
+
+ /**
+ * Deletes the item at {@code path}.
+ *
+ * @param rawRepositoryName the URL-encoded repository name
+ * @param rawWorkspaceName the URL-encoded workspace name
+ * @param path the path to the item
+ * @throws NotFoundException if no item exists at {@code path}
+ * @throws UnauthorizedException if the user does not have the access required to delete the item at this path
+ * @throws RepositoryException if any other error occurs
+ */
+ @DELETE
+ @Path( "/{repositoryName}/{workspaceName}/items{path:.*}" )
+ @Consumes( "application/json" )
+ public void deleteItem( @PathParam( "repositoryName" ) String rawRepositoryName,
+ @PathParam( "workspaceName" ) String rawWorkspaceName,
+ @PathParam( "path" ) String path )
+ throws NotFoundException, UnauthorizedException, RepositoryException {
+
+ assert rawRepositoryName != null;
+ assert rawWorkspaceName != null;
+ assert path != null;
+
+ Session session = getSession(rawRepositoryName, rawWorkspaceName);
+
+ Item item;
+ try {
+ item = session.getItem(path);
+ } catch (PathNotFoundException pnfe) {
+ throw new NotFoundException(pnfe.getMessage(), pnfe);
+ }
+ item.remove();
+ session.save();
+ }
+
+ /**
+ * Updates the properties at the path.
+ * <p>
+ * If path points to a property, this method expects the request content to be either a JSON array or a JSON string. The array
+ * or string will become the values or value of the property. If path points to a node, this method expects the request
+ * content to be a JSON object. The keys of the objects correspond to property names that will be set and the values for the
+ * keys correspond to the values that will be set on the properties.
+ * </p>
+ *
+ * @param rawRepositoryName the URL-encoded repository name
+ * @param rawWorkspaceName the URL-encoded workspace name
+ * @param path the path to the item
+ * @param requestContent the JSON-encoded representation of the values and, possibly, properties to be set
+ * @return the JSON-encoded representation of the node on which the property or properties were set.
+ * @throws NotFoundException if the parent of the item to be added does not exist
+ * @throws UnauthorizedException if the user does not have the access required to create the node at this path
+ * @throws JSONException if there is an error encoding the node
+ * @throws RepositoryException if any other error occurs
+ */
+ @PUT
+ @Path( "/{repositoryName}/{workspaceName}/items{path:.*}" )
+ @Consumes( "application/json" )
+ public String putItem( @PathParam( "repositoryName" ) String rawRepositoryName,
+ @PathParam( "workspaceName" ) String rawWorkspaceName,
+ @PathParam( "path" ) String path,
+ String requestContent ) throws UnauthorizedException, JSONException, RepositoryException {
+
+ assert path != null;
+ assert rawRepositoryName != null;
+ assert rawWorkspaceName != null;
+
+ Session session = getSession(rawRepositoryName, rawWorkspaceName);
+ Node node;
+ Item item;
+ if ("".equals(path) || "/".equals(path)) {
+ item = session.getRootNode();
+ } else {
+ try {
+ item = session.getItem(path);
+ } catch (PathNotFoundException pnfe) {
+ throw new NotFoundException(pnfe.getMessage(), pnfe);
+ }
+ }
+
+ if (item instanceof Node) {
+ JSONObject properties = new JSONObject(requestContent);
+ node = (Node)item;
+
+ for (Iterator<?> iter = properties.keys(); iter.hasNext();) {
+ String key = (String)iter.next();
+
+ setPropertyOnNode(node, key, properties.get(key));
+ }
+
+ } else {
+ /*
+ * The incoming content should be a JSON string or a JSON array. Wrap it into an object so it can be parsed more easily
+ */
+
+ JSONObject properties = new JSONObject("{ \"value\": " + requestContent + "}");
+ Property property = (Property)item;
+ node = property.getParent();
+
+ setPropertyOnNode(node, property.getName(), properties.get("value"));
+ }
+
+ return jsonFor(node, 0).toString();
+ }
+
+ private String workspaceNameFor( String rawWorkspaceName ) {
+ String workspaceName = URL_ENCODER.decode(rawWorkspaceName);
+
+ if (EMPTY_WORKSPACE_NAME.equals(workspaceName)) {
+ workspaceName = "";
+ }
+
+ return workspaceName;
+ }
+
+ private String repositoryNameFor( String rawRepositoryName ) {
+ String repositoryName = URL_ENCODER.decode(rawRepositoryName);
+
+ if (EMPTY_REPOSITORY_NAME.equals(repositoryName)) {
+ repositoryName = "";
+ }
+
return repositoryName;
}
+ @Provider
+ public static class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException> {
+
+ public Response toResponse( NotFoundException exception ) {
+ return Response.status(Status.NOT_FOUND).entity(exception.getMessage()).build();
+ }
+
+ }
+
+ @Provider
+ public static class JSONExceptionMapper implements ExceptionMapper<JSONException> {
+
+ public Response toResponse( JSONException exception ) {
+ return Response.status(Status.BAD_REQUEST).entity(exception.getMessage()).build();
+ }
+
+ }
+
+ @Provider
+ public static class RepositoryExceptionMapper implements ExceptionMapper<RepositoryException> {
+
+ public Response toResponse( RepositoryException exception ) {
+ /*
+ * This error code is murky - the request must have been syntactically valid to get to
+ * the JCR operations, but there isn't an HTTP status code for "semantically invalid."
+ */
+ return Response.status(Status.BAD_REQUEST).entity(exception.getMessage()).build();
+ }
+
+ }
+
}
Added: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/RepositoryFactory.java
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/RepositoryFactory.java (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/RepositoryFactory.java 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,41 @@
+package org.jboss.dna.web.jcr.rest;
+
+import java.util.Collection;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.servlet.ServletContext;
+import org.jboss.dna.web.jcr.rest.spi.RepositoryProvider;
+
+public class RepositoryFactory {
+
+ public static final String PROVIDER_KEY = "org.jboss.dna.web.jcr.rest.REPOSITORY_PROVIDER";
+
+ private static RepositoryProvider provider;
+
+ private RepositoryFactory() {
+
+ }
+
+ static void initialize( ServletContext context ) {
+ String className = context.getInitParameter(PROVIDER_KEY);
+
+ try {
+ Class<? extends RepositoryProvider> providerClass = Class.forName(className).asSubclass(RepositoryProvider.class);
+ provider = providerClass.newInstance();
+ } catch (Exception ex) {
+ throw new IllegalStateException(ex);
+ }
+ }
+
+ public static Repository getRepository( String repositoryName ) throws RepositoryException {
+ return provider.getRepository(repositoryName);
+ }
+
+ public static Collection<String> getJcrRepositoryNames() {
+ return provider.getJcrRepositoryNames();
+ }
+
+ static void shutdown() {
+ provider.shutdown();
+ }
+}
Property changes on: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/RepositoryFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/RepositoryEntry.java
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/RepositoryEntry.java (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/RepositoryEntry.java 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,32 @@
+package org.jboss.dna.web.jcr.rest.model;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement( name = "repository" )
+public class RepositoryEntry {
+
+ private String name;
+ private RepositoryResources resources;
+
+ public RepositoryEntry() {
+ resources = new RepositoryResources();
+ }
+
+ public RepositoryEntry( String contextName,
+ String repositoryName ) {
+ this.name = repositoryName;
+
+ resources = new RepositoryResources(contextName, repositoryName);
+ }
+
+ @XmlElement
+ public String getName() {
+ return name;
+ }
+
+ @XmlElement
+ public RepositoryResources getResources() {
+ return resources;
+ }
+}
Property changes on: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/RepositoryEntry.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/RepositoryResources.java
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/RepositoryResources.java (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/RepositoryResources.java 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,21 @@
+package org.jboss.dna.web.jcr.rest.model;
+
+import javax.xml.bind.annotation.XmlElement;
+
+public class RepositoryResources {
+ private String baseUri;
+
+ public RepositoryResources() {
+ }
+
+ public RepositoryResources( String contextName,
+ String repositoryName ) {
+ this.baseUri = contextName + "/" + repositoryName;
+ }
+
+ @XmlElement( name = "workspaces" )
+ public String getWorkspaces() {
+ return baseUri;
+ }
+}
+
Property changes on: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/RepositoryResources.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/WorkspaceEntry.java
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/WorkspaceEntry.java (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/WorkspaceEntry.java 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,34 @@
+package org.jboss.dna.web.jcr.rest.model;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement( name = "workspace" )
+public class WorkspaceEntry {
+
+ private String name;
+ private WorkspaceResources resources;
+
+ public WorkspaceEntry() {
+
+ }
+
+ public WorkspaceEntry( String contextName,
+ String repositoryName,
+ String workspaceName ) {
+ this.name = workspaceName;
+
+ resources = new WorkspaceResources(contextName, repositoryName, workspaceName);
+ }
+
+ @XmlElement
+ public String getName() {
+ return name;
+ }
+
+ @XmlElement
+ public WorkspaceResources getResources() {
+ return resources;
+ }
+}
+
Property changes on: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/WorkspaceEntry.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/WorkspaceResources.java
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/WorkspaceResources.java (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/WorkspaceResources.java 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,22 @@
+package org.jboss.dna.web.jcr.rest.model;
+
+import javax.xml.bind.annotation.XmlElement;
+
+public class WorkspaceResources {
+ private String baseUri;
+
+ public WorkspaceResources() {
+ }
+
+ public WorkspaceResources( String contextName,
+ String repositoryName,
+ String workspaceName ) {
+ this.baseUri = contextName + "/" + repositoryName + "/" + workspaceName;
+ }
+
+ @XmlElement( name = "items" )
+ public String getWorkspaces() {
+ return baseUri + "/items";
+ }
+}
+
Property changes on: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/model/WorkspaceResources.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/spi/DnaJcrRepositoryProvider.java
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/spi/DnaJcrRepositoryProvider.java (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/spi/DnaJcrRepositoryProvider.java 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,46 @@
+package org.jboss.dna.web.jcr.rest.spi;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import org.jboss.dna.graph.connector.inmemory.InMemoryRepositorySource;
+import org.jboss.dna.jcr.JcrConfiguration;
+import org.jboss.dna.jcr.JcrEngine;
+
+public class DnaJcrRepositoryProvider implements RepositoryProvider {
+
+ private JcrEngine jcrEngine;
+
+ public DnaJcrRepositoryProvider() {
+ jcrEngine = new JcrConfiguration().withConfigurationRepository()
+ .usingClass(InMemoryRepositorySource.class.getName())
+ .loadedFromClasspath()
+ .describedAs("Configuration Repository")
+ .with("name").setTo("configuration")
+ .with("retryLimit")
+ .setTo(5)
+ .and()
+ .addRepository("Source2")
+ .usingClass(InMemoryRepositorySource.class.getName())
+ .loadedFromClasspath()
+ .describedAs("description")
+ .with("name").setTo("JCR Repository")
+ .and()
+ .build();
+ jcrEngine.start();
+
+ }
+
+ public Set<String> getJcrRepositoryNames() {
+ return new HashSet<String>(jcrEngine.getJcrRepositoryNames());
+ }
+
+ public Repository getRepository( String repositoryName ) throws RepositoryException {
+ return jcrEngine.getRepository(repositoryName);
+ }
+
+ public void shutdown() {
+ jcrEngine.shutdown();
+ }
+}
Property changes on: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/spi/DnaJcrRepositoryProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/spi/RepositoryProvider.java
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/spi/RepositoryProvider.java (rev 0)
+++ trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/spi/RepositoryProvider.java 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,35 @@
+package org.jboss.dna.web.jcr.rest.spi;
+
+import java.util.Set;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+
+/**
+ * Interface for any class that provides access to one or more local JCR repositories. Repository providers must provide a public,
+ * no-argument constructor.
+ */
+public interface RepositoryProvider {
+
+ /**
+ * Returns a reference to the named repository
+ *
+ * @param repositoryName the name of the repository to retrieve; may be null
+ * @return the repository with the given name; may not be null
+ * @throws RepositoryException if no repository with the given name exists or there is an error obtaining a reference to the
+ * named repository
+ */
+ Repository getRepository( String repositoryName ) throws RepositoryException;
+
+ /**
+ * Returns the available repository names
+ *
+ * @return the available repository names; may not be null
+ */
+ Set<String> getJcrRepositoryNames();
+
+ /**
+ * Signals the repository provider that it should complete any pending transactions, shutdown, and release
+ * any external resource held.
+ */
+ void shutdown();
+}
Property changes on: trunk/extensions/dna-web-jcr-rest/src/main/java/org/jboss/dna/web/jcr/rest/spi/RepositoryProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/extensions/dna-web-jcr-rest/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/extensions/dna-web-jcr-rest/src/main/webapp/WEB-INF/web.xml 2009-05-28 02:13:55 UTC (rev 940)
+++ trunk/extensions/dna-web-jcr-rest/src/main/webapp/WEB-INF/web.xml 2009-05-28 12:57:37 UTC (rev 941)
@@ -1,54 +1,65 @@
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
-<!--
- JBoss DNA (http://www.jboss.org/dna)
- See the COPYRIGHT.txt file distributed with this work for information
- regarding copyright ownership. Some portions may be licensed
- to Red Hat, Inc. under one or more contributor license agreements.
- See the AUTHORS.txt file in the distribution for a full listing of
- individual contributors.
+ <!--
+ JBoss DNA (http://www.jboss.org/dna) See the COPYRIGHT.txt file
+ distributed with this work for information regarding copyright
+ ownership. Some portions may be licensed to Red Hat, Inc. under one or
+ more contributor license agreements. See the AUTHORS.txt file in the
+ distribution for a full listing of individual contributors. JBoss DNA
+ is free software. Unless otherwise indicated, all code in JBoss DNA is
+ licensed to you under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either version
+ 2.1 of the License, or (at your option) any later version. JBoss DNA
+ is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details. You should have received a copy of the GNU
+ Lesser General Public License along with this software; if not, write
+ to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ Boston, MA 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+<web-app>
+ <display-name>JBoss DNA JCR RESTful Interface</display-name>
- JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
- is licensed to you under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
+ <context-param>
+ <param-name>org.jboss.dna.web.jcr.rest.REPOSITORY_PROVIDER</param-name>
+ <param-value>org.jboss.dna.web.jcr.rest.spi.DnaJcrRepositoryProvider</param-value>
+ </context-param>
- JBoss DNA is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ <context-param>
+ <param-name>resteasy.providers</param-name>
+ <param-value>org.jboss.dna.web.jcr.rest.JcrResources$NotFoundExceptionMapper,
+ org.jboss.dna.web.jcr.rest.JcrResources$JSONExceptionMapper,
+ org.jboss.dna.web.jcr.rest.JcrResources$RepositoryExceptionMapper
+ </param-value>
+ </context-param>
- You should have received a copy of the GNU Lesser General Public
- License along with this software; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ <context-param>
+ <param-name>javax.ws.rs.core.Application</param-name>
+ <param-value>org.jboss.dna.web.jcr.rest.JcrApplication</param-value>
+ </context-param>
- -->
-<web-app>
- <display-name>JBoss DNA JCR RESTful Interface</display-name>
+ <listener>
+ <listener-class>
+ org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
+ </listener-class>
+ </listener>
- <context-param>
- <param-name>javax.ws.rs.core.Application</param-name>
- <param-value>org.jboss.dna.web.jcr.rest.JcrApplication</param-value>
- </context-param>
+ <listener>
+ <listener-class>org.jboss.dna.web.jcr.rest.DnaJcrDeployer</listener-class>
+ </listener>
- <listener>
- <listener-class>
- org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
- </listener-class>
- </listener>
-
- <servlet>
- <servlet-name>Resteasy</servlet-name>
- <servlet-class>
- org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
+ <servlet>
+ <servlet-name>Resteasy</servlet-name>
+ <servlet-class>
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
</servlet-class>
- </servlet>
+ </servlet>
- <servlet-mapping>
- <servlet-name>Resteasy</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Resteasy</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
</web-app>
\ No newline at end of file
Added: trunk/extensions/dna-web-jcr-rest-war/.classpath
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/.classpath (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/.classpath 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: trunk/extensions/dna-web-jcr-rest-war/.project
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/.project (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/.project 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>dna-web-jcr-rest-war</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/extensions/dna-web-jcr-rest-war/.settings/.jsdtscope
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/.settings/.jsdtscope (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/.settings/.jsdtscope 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.jdt.core.prefs 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,7 @@
+#Wed May 27 16:41:12 EDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.common.component 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="dna-web-jcr-rest-war">
+ <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/dna-web-jcr-rest/dna-web-jcr-rest">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/dna-jcr/dna-jcr">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/dna-common/dna-common">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/dna-graph/dna-graph">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/dna-repository/dna-repository">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/dna-connector-federation/dna-connector-federation">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/dna-cnd/dna-cnd">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <property name="context-root" value="dna-web-jcr-rest-war"/>
+ <property name="java-output-path"/>
+ </wb-module>
+</project-modules>
Added: trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.common.project.facet.core.xml 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.web" version="2.3"/>
+</faceted-project>
Property changes on: trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.jsdt.ui.superType.container 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/.settings/org.eclipse.wst.jsdt.ui.superType.name 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/extensions/dna-web-jcr-rest-war/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/.settings/org.maven.ide.eclipse.prefs 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,9 @@
+#Wed May 27 16:41:08 EDT 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=true
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
Added: trunk/extensions/dna-web-jcr-rest-war/pom.xml
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/pom.xml (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/pom.xml 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,111 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>dna</artifactId>
+ <groupId>org.jboss.dna</groupId>
+ <version>0.5-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+ <artifactId>dna-web-jcr-rest-war</artifactId>
+ <packaging>war</packaging>
+ <name>JBoss DNA JCR REST Servlet</name>
+ <description>JBoss DNA servlet that provides RESTful access to JCR items</description>
+ <url>http://labs.jboss.org/dna</url>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-web-jcr-rest</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.4.3</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- TESTING DEPENDENCIES -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit-dep</artifactId>
+ <version>4.4</version>
+ <scope>integration-test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-client</artifactId>
+ <version>1.0-beta-8</version>
+ <scope>integration-test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <finalName>resources</finalName>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>start-container</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop-container</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <configuration>
+ <properties>
+ <cargo.logging>high</cargo.logging>
+ </properties>
+ </configuration>
+ <container>
+ <systemProperties>
+ <java.security.auth.login.config>${project.build.directory}/test-classes/jetty-dna.policy</java.security.auth.login.config>
+ </systemProperties>
+ </container>
+ <wait>false</wait>
+ </configuration>
+ </plugin>
+ <!--
+ Override the default Surefire behavior to run during
+ integration-test phase
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-it</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Property changes on: trunk/extensions/dna-web-jcr-rest-war/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/extensions/dna-web-jcr-rest-war/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/src/main/webapp/META-INF/MANIFEST.MF (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/src/main/webapp/META-INF/MANIFEST.MF 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/extensions/dna-web-jcr-rest-war/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/extensions/dna-web-jcr-rest-war/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ trunk/extensions/dna-web-jcr-rest-war/src/main/webapp/WEB-INF/web.xml 2009-05-28 12:57:37 UTC (rev 941)
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+ <!--
+ JBoss DNA (http://www.jboss.org/dna) See the COPYRIGHT.txt file
+ distributed with this work for information regarding copyright
+ ownership. Some portions may be licensed to Red Hat, Inc. under one or
+ more contributor license agreements. See the AUTHORS.txt file in the
+ distribution for a full listing of individual contributors. JBoss DNA
+ is free software. Unless otherwise indicated, all code in JBoss DNA is
+ licensed to you under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either version
+ 2.1 of the License, or (at your option) any later version. JBoss DNA
+ is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details. You should have received a copy of the GNU
+ Lesser General Public License along with this software; if not, write
+ to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ Boston, MA 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+<web-app>
+ <display-name>JBoss DNA JCR RESTful Interface</display-name>
+
+ <context-param>
+ <param-name>org.jboss.dna.web.jcr.rest.REPOSITORY_PROVIDER</param-name>
+ <param-value>org.jboss.dna.web.jcr.rest.spi.DnaJcrRepositoryProvider</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>resteasy.providers</param-name>
+ <param-value>org.jboss.dna.web.jcr.rest.JcrResources$NotFoundExceptionMapper,
+ org.jboss.dna.web.jcr.rest.JcrResources$JSONExceptionMapper,
+ org.jboss.dna.web.jcr.rest.JcrResources$RepositoryExceptionMapper
+ </param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.ws.rs.core.Application</param-name>
+ <param-value>org.jboss.dna.web.jcr.rest.JcrApplication</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>
+ org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
+ </listener-class>
+ </listener>
+
+ <listener>
+ <listener-class>org.jboss.dna.web.jcr.rest.DnaJcrDeployer</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>Resteasy</servlet-name>
+ <servlet-class>
+ org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
+ </servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Resteasy</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Property changes on: trunk/extensions/dna-web-jcr-rest-war/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
15 years, 1 month
DNA SVN: r940 - in trunk/dna-jcr/src: main/resources/org/jboss/dna/jcr and 1 other directories.
by dna-commits@lists.jboss.org
Author: bcarothers
Date: 2009-05-27 22:13:55 -0400 (Wed, 27 May 2009)
New Revision: 940
Modified:
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrI18n.java
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrMultiValueProperty.java
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrSingleValueProperty.java
trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties
trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrTckTest.java
Log:
DNA-438 JR TCK Test SetValueValueFormatExceptionTest Fails
Applied patch that forces type conversion to the current property type on the property setValue methods. The patch also checks that the parameter to setValue(Node) is, in fact, referenceable.
Modified: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrI18n.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrI18n.java 2009-05-27 23:10:00 UTC (rev 939)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrI18n.java 2009-05-28 02:13:55 UTC (rev 940)
@@ -135,6 +135,8 @@
public static I18n allNodeTypeTemplatesMustComeFromSameSession;
+ public static I18n nodeNotReferenceable;
+
static {
try {
I18n.initialize(JcrI18n.class);
Modified: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrMultiValueProperty.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrMultiValueProperty.java 2009-05-27 23:10:00 UTC (rev 939)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrMultiValueProperty.java 2009-05-28 02:13:55 UTC (rev 940)
@@ -189,6 +189,11 @@
return;
}
+ for (int i = 0; i < values.length; i++) {
+ // Force a conversion as per SetValueValueFormatExceptionTest in JR TCK
+ if (values[i] != null) ((JcrValue) values[i]).asType(this.getType());
+ }
+
cache.getEditorFor(propertyId.getNodeId()).setProperty(propertyId.getPropertyName(), values, PropertyType.UNDEFINED);
}
@@ -212,7 +217,7 @@
for (int i = 0; i != numValues; ++i) {
String value = values[i];
if (value == null) continue; // skip null values
- valuesList.add(createValue(values[i], PropertyType.STRING));
+ valuesList.add(createValue(values[i], PropertyType.STRING).asType(this.getType()));
}
if (valuesList.isEmpty()) {
jcrValues = EMPTY_VALUES;
@@ -223,7 +228,7 @@
jcrValues = EMPTY_VALUES;
}
- cache.getEditorFor(propertyId.getNodeId()).setProperty(propertyId.getPropertyName(), jcrValues, PropertyType.STRING);
+ cache.getEditorFor(propertyId.getNodeId()).setProperty(propertyId.getPropertyName(), jcrValues, this.getType());
}
/**
Modified: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrSingleValueProperty.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrSingleValueProperty.java 2009-05-27 23:10:00 UTC (rev 939)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrSingleValueProperty.java 2009-05-28 02:13:55 UTC (rev 940)
@@ -191,6 +191,10 @@
JcrValue jcrValue = null;
if (value instanceof JcrValue) {
jcrValue = (JcrValue)value;
+
+ // Force a conversion as per SetValueValueFormatExceptionTest in JR TCK
+ jcrValue.asType(this.getType());
+
cache.getEditorFor(propertyId.getNodeId()).setProperty(propertyId.getPropertyName(), jcrValue);
return;
}
@@ -199,6 +203,7 @@
cache.getEditorFor(propertyId.getNodeId()).removeProperty(propertyId.getPropertyName());
return;
}
+
// We have to convert from one Value implementation to ours ...
switch (value.getType()) {
case PropertyType.STRING:
@@ -250,7 +255,7 @@
this.remove();
return;
}
- setValue(createValue(value, PropertyType.STRING));
+ setValue(createValue(value, PropertyType.STRING).asType(this.getType()));
}
/**
@@ -264,7 +269,7 @@
this.remove();
return;
}
- setValue(createValue(context().getValueFactories().getBinaryFactory().create(value), PropertyType.DATE));
+ setValue(createValue(context().getValueFactories().getBinaryFactory().create(value), PropertyType.BINARY).asType(this.getType()));
}
/**
@@ -274,7 +279,7 @@
*/
public void setValue( long value )
throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
- setValue(createValue(new Long(value), PropertyType.LONG));
+ setValue(createValue(new Long(value), PropertyType.LONG).asType(this.getType()));
}
/**
@@ -284,7 +289,7 @@
*/
public void setValue( double value )
throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
- setValue(createValue(new Double(value), PropertyType.DOUBLE));
+ setValue(createValue(new Double(value), PropertyType.DOUBLE).asType(this.getType()));
}
/**
@@ -298,7 +303,7 @@
this.remove();
return;
}
- setValue(createValue(context().getValueFactories().getDateFactory().create(value), PropertyType.DATE));
+ setValue(createValue(context().getValueFactories().getDateFactory().create(value), PropertyType.DATE).asType(this.getType()));
}
/**
@@ -308,7 +313,7 @@
*/
public void setValue( boolean value )
throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException {
- setValue(createValue(new Boolean(value), PropertyType.BOOLEAN));
+ setValue(createValue(new Boolean(value), PropertyType.BOOLEAN).asType(this.getType()));
}
/**
@@ -322,8 +327,13 @@
this.remove();
return;
}
+
+ if (!value.isNodeType(JcrMixLexicon.REFERENCEABLE.getString(this.context().getNamespaceRegistry()))) {
+ throw new ValueFormatException(JcrI18n.nodeNotReferenceable.text());
+ }
+
String uuid = value.getUUID();
- setValue(createValue(uuid, PropertyType.REFERENCE));
+ setValue(createValue(uuid, PropertyType.REFERENCE).asType(this.getType()));
}
/**
Modified: trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties
===================================================================
--- trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties 2009-05-27 23:10:00 UTC (rev 939)
+++ trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties 2009-05-28 02:13:55 UTC (rev 940)
@@ -119,3 +119,5 @@
missingMandatoryItem=The mandatory {0} named '{1}' defined in type '{2}' is missing from the node at '{3}'
allNodeTypeTemplatesMustComeFromSameSession=All node type templates must be created from the same javax.jcr.Session
+
+nodeNotReferenceable=Only referenceable nodes may be the value of reference properties.
\ No newline at end of file
Modified: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrTckTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrTckTest.java 2009-05-27 23:10:00 UTC (rev 939)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrTckTest.java 2009-05-28 02:13:55 UTC (rev 940)
@@ -60,6 +60,7 @@
import org.apache.jackrabbit.test.api.SetValueLongTest;
import org.apache.jackrabbit.test.api.SetValueReferenceTest;
import org.apache.jackrabbit.test.api.SetValueStringTest;
+import org.apache.jackrabbit.test.api.SetValueValueFormatExceptionTest;
import org.apache.jackrabbit.test.api.SetValueVersionExceptionTest;
import org.apache.jackrabbit.test.api.ValueFactoryTest;
import org.apache.jackrabbit.test.api.WorkspaceCloneReferenceableTest;
@@ -187,7 +188,7 @@
addTestSuite(SetValueReferenceTest.class);
addTestSuite(SetValueStringTest.class);
addTestSuite(SetValueConstraintViolationExceptionTest.class);
- // addTestSuite(SetValueValueFormatExceptionTest.class);
+ addTestSuite(SetValueValueFormatExceptionTest.class);
addTestSuite(SetValueVersionExceptionTest.class);
addTestSuite(SetPropertyBooleanTest.class);
15 years, 1 month
DNA SVN: r939 - trunk/dna-jcr/src/main/java/org/jboss/dna/jcr.
by dna-commits@lists.jboss.org
Author: bcarothers
Date: 2009-05-27 19:10:00 -0400 (Wed, 27 May 2009)
New Revision: 939
Modified:
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/SessionCache.java
Log:
DNA-437 TCK Tests Fail on Workspace.copy
Applied a patch that adds a check that the final segment in the destination path does not have a SNS index on it and also attempts to check that SNS constraints on the parent node of the destination are met. The SNS check will not function properly if multiple workspace operations are performed without a refresh, but it's an incremental improvement over the current state.
This fixes 3 test cases in the nightly TCK test, but doesn't allow us to uncomment any additional tests in the CI TCK test yet.
Modified: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java 2009-05-22 18:34:30 UTC (rev 938)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrWorkspace.java 2009-05-27 23:10:00 UTC (rev 939)
@@ -60,6 +60,7 @@
import org.jboss.dna.jcr.JcrContentHandler.EnclosingSAXException;
import org.jboss.dna.jcr.JcrContentHandler.SaveMode;
import org.jboss.dna.jcr.JcrRepository.Option;
+import org.jboss.dna.jcr.cache.NodeInfo;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -284,8 +285,25 @@
throw new RepositoryException(JcrI18n.invalidPathParameter.text(destAbsPath, "destAbsPath"), e);
}
+ // Doing a literal test here because the path factory will canonicalize "/node[1]" to "/node"
+ if (destAbsPath.endsWith("]")) {
+ throw new RepositoryException();
+ }
+
+ /*
+ * Make sure that the node has a definition at the new location
+ */
+ SessionCache cache = this.session.cache();
+ NodeInfo nodeInfo = cache.findNodeInfo(null, srcPath);
+ NodeInfo parent = cache.findNodeInfo(null, destPath.getParent());
+
+ // This throws a ConstraintViolationException if there is no matching definition
+ // In practice, this won't always work until we figure out how to refresh the destination parent's cache entry
+ cache.findBestNodeDefinition(parent.getUuid(), destPath.getLastSegment().getName(), nodeInfo.getPrimaryTypeName());
+
// Perform the copy operation, but use the "to" form (not the "into", which takes the parent) ...
graph.copy(srcPath).to(destPath);
+
}
/**
Modified: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/SessionCache.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/SessionCache.java 2009-05-22 18:34:30 UTC (rev 938)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/SessionCache.java 2009-05-27 23:10:00 UTC (rev 939)
@@ -514,7 +514,8 @@
List<Name> mixinTypeNames = node.getMixinTypeNames();
Children children = nodeInfo.getChildren();
- int snsCount = children.getCountOfSameNameSiblingsWithName(newNodeName);
+ // Need to add one to speculate that this node will be added
+ int snsCount = children.getCountOfSameNameSiblingsWithName(newNodeName) + 1;
JcrNodeDefinition definition = nodeTypes().findChildNodeDefinition(primaryTypeName,
mixinTypeNames,
newNodeName,
15 years, 1 month
DNA SVN: r938 - trunk/extensions/dna-connector-svn.
by dna-commits@lists.jboss.org
Author: spagop
Date: 2009-05-22 14:34:30 -0400 (Fri, 22 May 2009)
New Revision: 938
Modified:
trunk/extensions/dna-connector-svn/pom.xml
Log:
new artifact for svnkit
<dependency>
<groupId>org.tmatesoft.svnkit</groupId>
<artifactId>svnkit</artifactId>
<version>1.2.3.5521</version>
</dependency>
Modified: trunk/extensions/dna-connector-svn/pom.xml
===================================================================
--- trunk/extensions/dna-connector-svn/pom.xml 2009-05-22 14:20:59 UTC (rev 937)
+++ trunk/extensions/dna-connector-svn/pom.xml 2009-05-22 18:34:30 UTC (rev 938)
@@ -49,7 +49,7 @@
<dependency>
<groupId>org.tmatesoft.svnkit</groupId>
<artifactId>svnkit</artifactId>
- <version>1.2.0.4949</version>
+ <version>1.2.3.5521</version>
</dependency>
<!--
Testing (note the scope)
15 years, 1 month
DNA SVN: r937 - trunk/extensions/dna-connector-svn/src/main/java/org/jboss/dna/connector/svn.
by dna-commits@lists.jboss.org
Author: spagop
Date: 2009-05-22 10:20:59 -0400 (Fri, 22 May 2009)
New Revision: 937
Modified:
trunk/extensions/dna-connector-svn/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java
Log:
super() takes three parameters
Modified: trunk/extensions/dna-connector-svn/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java
===================================================================
--- trunk/extensions/dna-connector-svn/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java 2009-05-22 13:35:17 UTC (rev 936)
+++ trunk/extensions/dna-connector-svn/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java 2009-05-22 14:20:59 UTC (rev 937)
@@ -115,7 +115,7 @@
ExecutionContext context,
boolean updatesAllowed,
RepositoryAccessData accessData ) {
- super(sourceName, context);
+ super(sourceName, context, null);
assert defaultWorkspace != null;
assert availableWorkspaceNames != null;
this.defaultNamespaceUri = getExecutionContext().getNamespaceRegistry().getDefaultNamespaceUri();
15 years, 1 month
DNA SVN: r936 - trunk/extensions/dna-connector-svn/src/main/resources/org/jboss/dna/connector/svn.
by dna-commits@lists.jboss.org
Author: spagop
Date: 2009-05-22 09:35:17 -0400 (Fri, 22 May 2009)
New Revision: 936
Modified:
trunk/extensions/dna-connector-svn/src/main/resources/org/jboss/dna/connector/svn/SVNConnectorI18n.properties
Log:
new test cases to test the workspace features
Modified: trunk/extensions/dna-connector-svn/src/main/resources/org/jboss/dna/connector/svn/SVNConnectorI18n.properties
===================================================================
--- trunk/extensions/dna-connector-svn/src/main/resources/org/jboss/dna/connector/svn/SVNConnectorI18n.properties 2009-05-22 13:34:54 UTC (rev 935)
+++ trunk/extensions/dna-connector-svn/src/main/resources/org/jboss/dna/connector/svn/SVNConnectorI18n.properties 2009-05-22 13:35:17 UTC (rev 936)
@@ -23,8 +23,9 @@
#
connectorName = SVN Connector
+workspaceDoesNotExist = The workspace "{0}" does not exist
nodeDoesNotExist = This node kind is missing at {0}
-locationInRequestMustHavePath = Location must have a path {0}
+locationInRequestMustHavePath = {0} requires a path in the request\: {1}
nodeIsActuallyUnknow = This node kind is actually unknown {0}
propertyIsRequired = The {0} property is required but has no value
errorSerializingCachePolicyInSource = Error serializing a {0} instance owned by the {1} SVNRepositorySource
@@ -34,4 +35,19 @@
sourceDoesNotSupportCreatingWorkspaces = {0} is a source that does not allow creating workspaces
sourceDoesNotSupportCloningWorkspaces = {0} is a source that does not allow cloning workspaces
sourceDoesNotSupportDeletingWorkspaces = {0} is a source that does not allow deleting workspaces
-connectingFailureOrUserAuthenticationProblem=failure occured while connecting to the repository {0} or the user's authentication failed
\ No newline at end of file
+connectingFailureOrUserAuthenticationProblem=failure occured while connecting to the repository {0} or the user's authentication failed
+workspaceDoesNotExist = The workspace "{0}" does not exist
+pathForDefaultWorkspaceDoesNotExist = The path "{0}" for the default workspace for the file system source "{1}" does not represent an existing directory
+pathForDefaultWorkspaceIsNotDirectory = The path "{0}" for the default workspace for the file system source "{1}" is actually a path to an existing file
+pathForDefaultWorkspaceCannotBeRead = The path "{0}" for the default workspace for the file system source "{1}" cannot be read
+pathForPredefinedWorkspaceDoesNotExist = The path "{0}" for the predefined workspace for the file system source "{1}" does not represent an existing directory
+pathForPredefinedWorkspaceIsNotDirectory = The path "{0}" for the predefined workspace for the file system source "{1}" is actually a path to an existing file
+pathForPredefinedWorkspaceCannotBeRead = The path "{0}" for the predefined workspace for the file system source "{1}" cannot be read
+sameNameSiblingsAreNotAllowed = {0} does not allow same name siblings on nodes: {1}
+onlyTheDefaultNamespaceIsAllowed = {0} requires node names use the default namespace: {1}
+unableToCreateWorkspaces ={0} does not allow creating new workspaces (request was to create "{1}")
+locationInRequestMustHavePath = {0} requires a path in the request: {1}
+sameNameSiblingsAreNotAllowed = {0} does not allow same name siblings on nodes: {1}
+onlyTheDefaultNamespaceIsAllowed = {0} requires node names use the default namespace: {1}
+sourceIsReadOnly = {0} is a read-only source; no updates are allowed
+unableToCreateWorkspaces = {0} does not allow creating new workspaces (request was to create "{1}")
\ No newline at end of file
15 years, 1 month
DNA SVN: r935 - in trunk/extensions/dna-connector-svn/src/test/resources: dummy_svn_repos/db and 3 other directories.
by dna-commits@lists.jboss.org
Author: spagop
Date: 2009-05-22 09:34:54 -0400 (Fri, 22 May 2009)
New Revision: 935
Added:
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/10
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/11
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/12
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/13
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/14
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/15
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/16
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/17
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/18
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/19
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/20
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/21
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/22
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/23
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/24
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/25
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/26
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/27
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/28
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/29
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/30
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/31
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/32
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/6
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/7
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/8
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/9
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/10
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/11
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/12
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/13
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/14
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/15
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/16
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/17
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/18
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/19
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/20
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/21
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/22
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/23
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/24
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/25
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/26
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/27
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/28
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/29
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/30
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/31
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/32
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/6
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/7
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/8
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/9
trunk/extensions/dna-connector-svn/src/test/resources/files/
trunk/extensions/dna-connector-svn/src/test/resources/files/JBoss DNA Submission Receipt for JBoss World 2009.pdf
Modified:
trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/current
Log:
new test cases to test the workspace features
Modified: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/current
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/current 2009-05-22 13:34:17 UTC (rev 934)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/current 2009-05-22 13:34:54 UTC (rev 935)
@@ -1 +1 @@
-5 9 1
+32 w 1
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/10
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/10 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/10 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:28:56.503525Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/11
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/11 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/11 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:29:06.542753Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/12
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/12 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/12 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:29:15.713014Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/13
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/13 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/13 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:29:36.965833Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/14
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/14 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/14 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:29:48.028440Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/15
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/15 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/15 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:30:12.946253Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/16
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/16 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/16 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:30:44.800365Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/17
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/17 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/17 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:30:53.811950Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/18
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/18 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/18 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:31:26.356662Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/19
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/19 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/19 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:31:52.351940Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/20
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/20 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/20 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-17T07:05:55.711924Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/21
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/21 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/21 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-17T07:06:33.222800Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/22
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/22 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/22 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-17T07:06:44.095490Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/23
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/23 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/23 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-17T07:55:24.066440Z
+K 7
+svn:log
+V 5
+trunk
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/24
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/24 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/24 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-17T07:57:42.174119Z
+K 7
+svn:log
+V 4
+root
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/25
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/25 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/25 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-17T07:58:43.481797Z
+K 7
+svn:log
+V 6
+node a
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/26
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/26 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/26 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-17T08:54:31.033832Z
+K 7
+svn:log
+V 6
+node c
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/27
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/27 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/27 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-17T08:55:10.276451Z
+K 7
+svn:log
+V 6
+node h
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/28
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/28 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/28 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-17T09:09:02.865289Z
+K 7
+svn:log
+V 49
+JBoss DNA Submission Receipt for JBoss World 2009
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/29
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/29 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/29 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-04-07T21:14:54.887281Z
+K 7
+svn:log
+V 8
+branches
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/30
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/30 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/30 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,14 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-04-07T21:15:12.410426Z
+K 7
+svn:log
+V 5
+tags
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/31
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/31 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/31 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-05-22T11:23:08.877375Z
+K 7
+svn:log
+V 8
+branches
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/32
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/32 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/32 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-05-22T11:35:34.203690Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/6
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/6 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/6 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:23:33.076361Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/7
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/7 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/7 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:23:53.509880Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/8
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/8 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/8 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:24:06.032952Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/9
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/9 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revprops/9 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 2
+sp
+K 8
+svn:date
+V 27
+2009-03-03T19:28:38.286395Z
+K 7
+svn:log
+V 0
+
+END
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/10
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/10 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/10 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,71 @@
+id: d.0.r10/0
+type: dir
+count: 0
+cpath: /trunk/root/a
+copyroot: 0 /
+
+PLAIN
+K 1
+a
+V 13
+dir d.0.r10/0
+END
+ENDREP
+id: c.0.r10/111
+type: dir
+pred: c.0.r9/0
+count: 1
+text: 10 69 29 29 bd3f1c20f38e0d592800df2a6659d0a0
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 15
+dir c.0.r10/111
+END
+ENDREP
+id: 9.0.r10/293
+type: dir
+pred: 9.0.r9/110
+count: 2
+text: 10 246 34 34 31f13ebab797aea7719c604ad409ca0a
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 12
+dir a.0.r7/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 12
+dir b.0.r8/0
+K 5
+trunk
+V 15
+dir 9.0.r10/293
+END
+ENDREP
+id: 0.0.r10/594
+type: dir
+pred: 0.0.r9/405
+count: 10
+text: 10 426 155 155 4365f353c529602b87381eaafabb6e3d
+cpath: /
+copyroot: 0 /
+
+_0.0.t9-1 add false false /trunk/root/a
+
+
+594 725
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/11
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/11 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/11 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,75 @@
+id: e.0.r11/0
+type: dir
+count: 0
+cpath: /trunk/root/b
+copyroot: 0 /
+
+PLAIN
+K 1
+a
+V 13
+dir d.0.r10/0
+K 1
+b
+V 13
+dir e.0.r11/0
+END
+ENDREP
+id: c.0.r11/136
+type: dir
+pred: c.0.r10/111
+count: 2
+text: 11 69 54 54 1a99a0b949c8345d39bf3f3001019b51
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 15
+dir c.0.r11/136
+END
+ENDREP
+id: 9.0.r11/321
+type: dir
+pred: 9.0.r10/293
+count: 3
+text: 11 274 34 34 9468e83accae88299189ad389d06cb41
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 12
+dir a.0.r7/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 12
+dir b.0.r8/0
+K 5
+trunk
+V 15
+dir 9.0.r11/321
+END
+ENDREP
+id: 0.0.r11/623
+type: dir
+pred: 0.0.r10/594
+count: 11
+text: 11 455 155 155 c0a68a8725e91d194f57f21292cd8b06
+cpath: /
+copyroot: 0 /
+
+_0.0.t10-1 add false false /trunk/root/b
+
+
+623 755
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/12
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/12 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/12 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,79 @@
+id: f.0.r12/0
+type: dir
+count: 0
+cpath: /trunk/root/c
+copyroot: 0 /
+
+PLAIN
+K 1
+a
+V 13
+dir d.0.r10/0
+K 1
+b
+V 13
+dir e.0.r11/0
+K 1
+c
+V 13
+dir f.0.r12/0
+END
+ENDREP
+id: c.0.r12/161
+type: dir
+pred: c.0.r11/136
+count: 3
+text: 12 69 79 79 d434f1bc7adbe032496673a02a98939f
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 15
+dir c.0.r12/161
+END
+ENDREP
+id: 9.0.r12/346
+type: dir
+pred: 9.0.r11/321
+count: 4
+text: 12 299 34 34 14be2d76f1ba7a4c7bc77e75a65ff494
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 12
+dir a.0.r7/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 12
+dir b.0.r8/0
+K 5
+trunk
+V 15
+dir 9.0.r12/346
+END
+ENDREP
+id: 0.0.r12/648
+type: dir
+pred: 0.0.r11/623
+count: 12
+text: 12 480 155 155 a9032b240bacc8c93491dde427d1fb8e
+cpath: /
+copyroot: 0 /
+
+_0.0.t11-1 add false false /trunk/root/c
+
+
+648 780
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/13
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/13 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/13 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,94 @@
+id: g.0.r13/0
+type: dir
+count: 0
+cpath: /trunk/root/a/d
+copyroot: 0 /
+
+PLAIN
+K 1
+d
+V 13
+dir g.0.r13/0
+END
+ENDREP
+id: d.0.r13/113
+type: dir
+pred: d.0.r10/0
+count: 1
+text: 13 71 29 29 972340535a011a714b783a324cb1515f
+cpath: /trunk/root/a
+copyroot: 0 /
+
+PLAIN
+K 1
+a
+V 15
+dir d.0.r13/113
+K 1
+b
+V 13
+dir e.0.r11/0
+K 1
+c
+V 13
+dir f.0.r12/0
+END
+ENDREP
+id: c.0.r13/345
+type: dir
+pred: c.0.r12/161
+count: 4
+text: 13 251 81 81 63cbb1a745af3951b8da3ef9a25f33a2
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 15
+dir c.0.r13/345
+END
+ENDREP
+id: 9.0.r13/531
+type: dir
+pred: 9.0.r12/346
+count: 5
+text: 13 484 34 34 2172536e8fd491e0aedf131baa96f2ca
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 12
+dir a.0.r7/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 12
+dir b.0.r8/0
+K 5
+trunk
+V 15
+dir 9.0.r13/531
+END
+ENDREP
+id: 0.0.r13/833
+type: dir
+pred: 0.0.r12/648
+count: 13
+text: 13 665 155 155 9b098d3b947ca6c9c1802706b813fe68
+cpath: /
+copyroot: 0 /
+
+_0.0.t12-1 add false false /trunk/root/a/d
+
+
+833 965
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/14
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/14 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/14 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,98 @@
+id: h.0.r14/0
+type: dir
+count: 0
+cpath: /trunk/root/a/e
+copyroot: 0 /
+
+PLAIN
+K 1
+d
+V 13
+dir g.0.r13/0
+K 1
+e
+V 13
+dir h.0.r14/0
+END
+ENDREP
+id: d.0.r14/138
+type: dir
+pred: d.0.r13/113
+count: 2
+text: 14 71 54 54 7fec78898be775362ae93fd85a27c626
+cpath: /trunk/root/a
+copyroot: 0 /
+
+PLAIN
+K 1
+a
+V 15
+dir d.0.r14/138
+K 1
+b
+V 13
+dir e.0.r11/0
+K 1
+c
+V 13
+dir f.0.r12/0
+END
+ENDREP
+id: c.0.r14/372
+type: dir
+pred: c.0.r13/345
+count: 5
+text: 14 278 81 81 239ab88a677cca83a419dcf89265eda8
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 15
+dir c.0.r14/372
+END
+ENDREP
+id: 9.0.r14/558
+type: dir
+pred: 9.0.r13/531
+count: 6
+text: 14 511 34 34 ae09a0955fb634bd41c33b6b4b38003e
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 12
+dir a.0.r7/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 12
+dir b.0.r8/0
+K 5
+trunk
+V 15
+dir 9.0.r14/558
+END
+ENDREP
+id: 0.0.r14/860
+type: dir
+pred: 0.0.r13/833
+count: 14
+text: 14 692 155 155 aebd319bdb169ba68833a8bb5d87de24
+cpath: /
+copyroot: 0 /
+
+_0.0.t13-1 add false false /trunk/root/a/e
+
+
+860 992
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/15
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/15 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/15 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,113 @@
+id: i.0.r15/0
+type: dir
+count: 0
+cpath: /trunk/root/a/d/i
+copyroot: 0 /
+
+PLAIN
+K 1
+i
+V 13
+dir i.0.r15/0
+END
+ENDREP
+id: g.0.r15/115
+type: dir
+pred: g.0.r13/0
+count: 1
+text: 15 73 29 29 93fac645700c9e1b23a05797500466ec
+cpath: /trunk/root/a/d
+copyroot: 0 /
+
+PLAIN
+K 1
+d
+V 15
+dir g.0.r15/115
+K 1
+e
+V 13
+dir h.0.r14/0
+END
+ENDREP
+id: d.0.r15/324
+type: dir
+pred: d.0.r14/138
+count: 3
+text: 15 255 56 56 1336eaa0c2f17478f0f745483091fc90
+cpath: /trunk/root/a
+copyroot: 0 /
+
+PLAIN
+K 1
+a
+V 15
+dir d.0.r15/324
+K 1
+b
+V 13
+dir e.0.r11/0
+K 1
+c
+V 13
+dir f.0.r12/0
+END
+ENDREP
+id: c.0.r15/559
+type: dir
+pred: c.0.r14/372
+count: 6
+text: 15 465 81 81 48bfceac6724068f89ed2b5a901f20fe
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 15
+dir c.0.r15/559
+END
+ENDREP
+id: 9.0.r15/745
+type: dir
+pred: 9.0.r14/558
+count: 7
+text: 15 698 34 34 687e80d121d44e98b6bb5942fc7e8346
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 12
+dir a.0.r7/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 12
+dir b.0.r8/0
+K 5
+trunk
+V 15
+dir 9.0.r15/745
+END
+ENDREP
+id: 0.0.r15/1047
+type: dir
+pred: 0.0.r14/860
+count: 15
+text: 15 879 155 155 6bb9d640af18b0495f6a0dc05305f867
+cpath: /
+copyroot: 0 /
+
+_0.0.t14-1 add false false /trunk/root/a/d/i
+
+
+1047 1180
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/16
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/16 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/16 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,113 @@
+id: j.0.r16/0
+type: dir
+count: 0
+cpath: /trunk/root/a/e/j
+copyroot: 0 /
+
+PLAIN
+K 1
+j
+V 13
+dir j.0.r16/0
+END
+ENDREP
+id: h.0.r16/115
+type: dir
+pred: h.0.r14/0
+count: 1
+text: 16 73 29 29 d1f17dcb51f50917e578febd099cb247
+cpath: /trunk/root/a/e
+copyroot: 0 /
+
+PLAIN
+K 1
+d
+V 15
+dir g.0.r15/115
+K 1
+e
+V 15
+dir h.0.r16/115
+END
+ENDREP
+id: d.0.r16/326
+type: dir
+pred: d.0.r15/324
+count: 4
+text: 16 255 58 58 d23f10b29d8ac1cd3efd2a4e9fe75866
+cpath: /trunk/root/a
+copyroot: 0 /
+
+PLAIN
+K 1
+a
+V 15
+dir d.0.r16/326
+K 1
+b
+V 13
+dir e.0.r11/0
+K 1
+c
+V 13
+dir f.0.r12/0
+END
+ENDREP
+id: c.0.r16/561
+type: dir
+pred: c.0.r15/559
+count: 7
+text: 16 467 81 81 356981fda664c269cc17d4967c47b791
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 15
+dir c.0.r16/561
+END
+ENDREP
+id: 9.0.r16/747
+type: dir
+pred: 9.0.r15/745
+count: 8
+text: 16 700 34 34 e79c4ce28bb3e7575c6984f44120e08e
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 12
+dir a.0.r7/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 12
+dir b.0.r8/0
+K 5
+trunk
+V 15
+dir 9.0.r16/747
+END
+ENDREP
+id: 0.0.r16/1049
+type: dir
+pred: 0.0.r15/1047
+count: 16
+text: 16 881 155 155 c43138be7bef893367def1fc6f13cbaa
+cpath: /
+copyroot: 0 /
+
+_0.0.t15-1 add false false /trunk/root/a/e/j
+
+
+1049 1183
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/17
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/17 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/17 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,117 @@
+id: k.0.r17/0
+type: dir
+count: 0
+cpath: /trunk/root/a/e/k
+copyroot: 0 /
+
+PLAIN
+K 1
+j
+V 13
+dir j.0.r16/0
+K 1
+k
+V 13
+dir k.0.r17/0
+END
+ENDREP
+id: h.0.r17/140
+type: dir
+pred: h.0.r16/115
+count: 2
+text: 17 73 54 54 3ca7e0449e9d517fa851fa489c4c9613
+cpath: /trunk/root/a/e
+copyroot: 0 /
+
+PLAIN
+K 1
+d
+V 15
+dir g.0.r15/115
+K 1
+e
+V 15
+dir h.0.r17/140
+END
+ENDREP
+id: d.0.r17/353
+type: dir
+pred: d.0.r16/326
+count: 5
+text: 17 282 58 58 ed989cf504a1f81613886aae99c7c4ad
+cpath: /trunk/root/a
+copyroot: 0 /
+
+PLAIN
+K 1
+a
+V 15
+dir d.0.r17/353
+K 1
+b
+V 13
+dir e.0.r11/0
+K 1
+c
+V 13
+dir f.0.r12/0
+END
+ENDREP
+id: c.0.r17/588
+type: dir
+pred: c.0.r16/561
+count: 8
+text: 17 494 81 81 a5249b046d06f98b3511e531061ee3b3
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 15
+dir c.0.r17/588
+END
+ENDREP
+id: 9.0.r17/774
+type: dir
+pred: 9.0.r16/747
+count: 9
+text: 17 727 34 34 d80dbbcc6484018bc37bab61d190b3b6
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 12
+dir a.0.r7/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 12
+dir b.0.r8/0
+K 5
+trunk
+V 15
+dir 9.0.r17/774
+END
+ENDREP
+id: 0.0.r17/1076
+type: dir
+pred: 0.0.r16/1049
+count: 17
+text: 17 908 155 155 f2e61b219dd20dd412ba11b5b7d5e71a
+cpath: /
+copyroot: 0 /
+
+_0.0.t16-1 add false false /trunk/root/a/e/k
+
+
+1076 1210
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/18
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/18 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/18 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,94 @@
+id: l.0.r18/0
+type: dir
+count: 0
+cpath: /trunk/root/b/g
+copyroot: 0 /
+
+PLAIN
+K 1
+g
+V 13
+dir l.0.r18/0
+END
+ENDREP
+id: e.0.r18/113
+type: dir
+pred: e.0.r11/0
+count: 1
+text: 18 71 29 29 7c8baa4a4f605ba8efd6c8c86430d5fc
+cpath: /trunk/root/b
+copyroot: 0 /
+
+PLAIN
+K 1
+a
+V 15
+dir d.0.r17/353
+K 1
+b
+V 15
+dir e.0.r18/113
+K 1
+c
+V 13
+dir f.0.r12/0
+END
+ENDREP
+id: c.0.r18/347
+type: dir
+pred: c.0.r17/588
+count: 9
+text: 18 251 83 83 eeaa4cab9c150a9cc512871c93acfb64
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 15
+dir c.0.r18/347
+END
+ENDREP
+id: 9.0.r18/533
+type: dir
+pred: 9.0.r17/774
+count: 10
+text: 18 486 34 34 a15a07db731d87e8d7f08f47b213766a
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 12
+dir a.0.r7/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 12
+dir b.0.r8/0
+K 5
+trunk
+V 15
+dir 9.0.r18/533
+END
+ENDREP
+id: 0.0.r18/836
+type: dir
+pred: 0.0.r17/1076
+count: 18
+text: 18 668 155 155 24df8f97db549910ab24f4e2fdc7b6ea
+cpath: /
+copyroot: 0 /
+
+_0.0.t17-1 add false false /trunk/root/b/g
+
+
+836 969
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/19
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/19 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/19 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,94 @@
+id: m.0.r19/0
+type: dir
+count: 0
+cpath: /trunk/root/c/h
+copyroot: 0 /
+
+PLAIN
+K 1
+h
+V 13
+dir m.0.r19/0
+END
+ENDREP
+id: f.0.r19/113
+type: dir
+pred: f.0.r12/0
+count: 1
+text: 19 71 29 29 f5f036fcd377acd1657947718fdb33d0
+cpath: /trunk/root/c
+copyroot: 0 /
+
+PLAIN
+K 1
+a
+V 15
+dir d.0.r17/353
+K 1
+b
+V 15
+dir e.0.r18/113
+K 1
+c
+V 15
+dir f.0.r19/113
+END
+ENDREP
+id: c.0.r19/349
+type: dir
+pred: c.0.r18/347
+count: 10
+text: 19 251 85 85 20b9fa559bc7981360b3aee63059d3aa
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 15
+dir c.0.r19/349
+END
+ENDREP
+id: 9.0.r19/536
+type: dir
+pred: 9.0.r18/533
+count: 11
+text: 19 489 34 34 4b8c2a58a1bde5fc0a43941bea0ede61
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 12
+dir a.0.r7/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 12
+dir b.0.r8/0
+K 5
+trunk
+V 15
+dir 9.0.r19/536
+END
+ENDREP
+id: 0.0.r19/839
+type: dir
+pred: 0.0.r18/836
+count: 19
+text: 19 671 155 155 0a579ba24d62f6e29cd10f6289a00958
+cpath: /
+copyroot: 0 /
+
+_0.0.t18-1 add false false /trunk/root/c/h
+
+
+839 971
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/20
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/20 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/20 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,31 @@
+PLAIN
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 12
+dir b.0.r8/0
+K 5
+trunk
+V 15
+dir 9.0.r19/536
+END
+ENDREP
+id: 0.0.r20/137
+type: dir
+pred: 0.0.r19/839
+count: 20
+text: 20 0 124 124 96a7e0085b2bcaa41d664e4b481580c0
+cpath: /
+copyroot: 0 /
+
+a.0.r7/0 delete false false /branches
+
+
+137 267
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/21
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/21 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/21 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,27 @@
+PLAIN
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 5
+trunk
+V 15
+dir 9.0.r19/536
+END
+ENDREP
+id: 0.0.r21/110
+type: dir
+pred: 0.0.r20/137
+count: 21
+text: 21 0 97 97 5e2bc32f59efbe55a86c89043dfdc863
+cpath: /
+copyroot: 0 /
+
+b.0.r8/0 delete false false /tags
+
+
+110 238
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/22
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/22 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/22 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,23 @@
+PLAIN
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+END
+ENDREP
+id: 0.0.r22/79
+type: dir
+pred: 0.0.r21/110
+count: 22
+text: 22 0 66 66 9228079c02fadcefd75c0442734c5d3e
+cpath: /
+copyroot: 0 /
+
+9.0.r19/536 delete false false /trunk
+
+
+79 206
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/23
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/23 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/23 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,33 @@
+id: n.0.r23/0
+type: dir
+count: 0
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 5
+trunk
+V 13
+dir n.0.r23/0
+END
+ENDREP
+id: 0.0.r23/170
+type: dir
+pred: 0.0.r22/79
+count: 23
+text: 23 62 95 95 7053fe103be9360c8600ace6a5b5b3e7
+cpath: /
+copyroot: 0 /
+
+_0.0.t22-1 add false false /trunk
+
+
+170 298
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/24
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/24 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/24 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,48 @@
+id: o.0.r24/0
+type: dir
+count: 0
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 13
+dir o.0.r24/0
+END
+ENDREP
+id: n.0.r24/112
+type: dir
+pred: n.0.r23/0
+count: 1
+text: 24 67 32 32 1f9df28309ef0792764bf510e4fa7cc6
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 5
+trunk
+V 15
+dir n.0.r24/112
+END
+ENDREP
+id: 0.0.r24/353
+type: dir
+pred: 0.0.r23/170
+count: 24
+text: 24 243 97 97 ba154ee6fefe2a1f03f3e5b73bf23c1e
+cpath: /
+copyroot: 0 /
+
+_0.0.t23-1 add false false /trunk/root
+
+
+353 483
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/25
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/25 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/25 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,63 @@
+id: p.0.r25/0
+type: dir
+count: 0
+cpath: /trunk/root/a
+copyroot: 0 /
+
+PLAIN
+K 1
+a
+V 13
+dir p.0.r25/0
+END
+ENDREP
+id: o.0.r25/111
+type: dir
+pred: o.0.r24/0
+count: 1
+text: 25 69 29 29 85fed750300d1f78aefea557e70b068e
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 15
+dir o.0.r25/111
+END
+ENDREP
+id: n.0.r25/294
+type: dir
+pred: n.0.r24/112
+count: 2
+text: 25 247 34 34 da42c5920fcac9ef814c11e7265020c9
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 5
+trunk
+V 15
+dir n.0.r25/294
+END
+ENDREP
+id: 0.0.r25/538
+type: dir
+pred: 0.0.r24/353
+count: 25
+text: 25 428 97 97 2499b58f34d4725ae602738e60dec05c
+cpath: /
+copyroot: 0 /
+
+_0.0.t24-1 add false false /trunk/root/a
+
+
+538 668
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/26
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/26 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/26 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,67 @@
+id: q.0.r26/0
+type: dir
+count: 0
+cpath: /trunk/root/c
+copyroot: 0 /
+
+PLAIN
+K 1
+a
+V 13
+dir p.0.r25/0
+K 1
+c
+V 13
+dir q.0.r26/0
+END
+ENDREP
+id: o.0.r26/136
+type: dir
+pred: o.0.r25/111
+count: 2
+text: 26 69 54 54 bcb4d75fa31ef5848961034b26dbca95
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 15
+dir o.0.r26/136
+END
+ENDREP
+id: n.0.r26/321
+type: dir
+pred: n.0.r25/294
+count: 3
+text: 26 274 34 34 3b51b391139400f835cefb23aff3370e
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 5
+trunk
+V 15
+dir n.0.r26/321
+END
+ENDREP
+id: 0.0.r26/565
+type: dir
+pred: 0.0.r25/538
+count: 26
+text: 26 455 97 97 875ebc6ccf664f70dcdf96af5ccab184
+cpath: /
+copyroot: 0 /
+
+_0.0.t25-1 add false false /trunk/root/c
+
+
+565 695
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/27
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/27 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/27 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,82 @@
+id: r.0.r27/0
+type: dir
+count: 0
+cpath: /trunk/root/c/h
+copyroot: 0 /
+
+PLAIN
+K 1
+h
+V 13
+dir r.0.r27/0
+END
+ENDREP
+id: q.0.r27/113
+type: dir
+pred: q.0.r26/0
+count: 1
+text: 27 71 29 29 c263743f50376e8568a6766b99e5f7f7
+cpath: /trunk/root/c
+copyroot: 0 /
+
+PLAIN
+K 1
+a
+V 13
+dir p.0.r25/0
+K 1
+c
+V 15
+dir q.0.r27/113
+END
+ENDREP
+id: o.0.r27/320
+type: dir
+pred: o.0.r26/136
+count: 3
+text: 27 251 56 56 a52216246ee43f7d62b5b3af46d2e866
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 15
+dir o.0.r27/320
+END
+ENDREP
+id: n.0.r27/506
+type: dir
+pred: n.0.r26/321
+count: 4
+text: 27 459 34 34 b0fe673d5c46e582be15bbd4682c24c6
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 5
+trunk
+V 15
+dir n.0.r27/506
+END
+ENDREP
+id: 0.0.r27/750
+type: dir
+pred: 0.0.r26/565
+count: 27
+text: 27 640 97 97 f4976b49507d2213db153963ce3984ae
+cpath: /
+copyroot: 0 /
+
+_0.0.t26-1 add false false /trunk/root/c/h
+
+
+750 880
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/28
===================================================================
(Binary files differ)
Property changes on: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/28
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/29
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/29 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/29 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,37 @@
+id: t.0.r29/0
+type: dir
+count: 0
+cpath: /branches
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 13
+dir t.0.r29/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 5
+trunk
+V 18
+dir n.0.r28/176280
+END
+ENDREP
+id: 0.0.r29/210
+type: dir
+pred: 0.0.r28/176533
+count: 29
+text: 29 65 132 132 14ab41944dc20a0b0d38ba2117afa58e
+cpath: /
+copyroot: 0 /
+
+_0.0.t28-1 add false false /branches
+
+
+210 344
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/30
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/30 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/30 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,41 @@
+id: u.0.r30/0
+type: dir
+count: 0
+cpath: /tags
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 13
+dir t.0.r29/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 13
+dir u.0.r30/0
+K 5
+trunk
+V 18
+dir n.0.r28/176280
+END
+ENDREP
+id: 0.0.r30/234
+type: dir
+pred: 0.0.r29/210
+count: 30
+text: 30 61 160 160 8b114e8bbd8c11af3ca74cb5e31e139e
+cpath: /
+copyroot: 0 /
+
+_0.0.t29-1 add false false /tags
+
+
+234 365
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/31
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/31 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/31 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,31 @@
+PLAIN
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 13
+dir u.0.r30/0
+K 5
+trunk
+V 18
+dir n.0.r28/176280
+END
+ENDREP
+id: 0.0.r31/141
+type: dir
+pred: 0.0.r30/234
+count: 31
+text: 31 0 128 128 a774cc7997e4b0a9176eb1fd0993dee4
+cpath: /
+copyroot: 0 /
+
+t.0.r29/0 delete false false /branches
+
+
+141 271
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/32
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/32 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/32 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,41 @@
+id: v.0.r32/0
+type: dir
+count: 0
+cpath: /branches
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 13
+dir v.0.r32/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 13
+dir u.0.r30/0
+K 5
+trunk
+V 18
+dir n.0.r28/176280
+END
+ENDREP
+id: 0.0.r32/238
+type: dir
+pred: 0.0.r31/141
+count: 32
+text: 32 65 160 160 7ae882bf05a651dae6e1808346128fce
+cpath: /
+copyroot: 0 /
+
+_0.0.t31-1 add false false /branches
+
+
+238 369
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/6
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/6 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/6 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,33 @@
+id: 9.0.r6/0
+type: dir
+count: 0
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 5
+trunk
+V 12
+dir 9.0.r6/0
+END
+ENDREP
+id: 0.0.r6/168
+type: dir
+pred: 0.0.r5/5252
+count: 6
+text: 6 61 94 94 eb0fff79ae6e1ddec05cdc4387e0be5d
+cpath: /
+copyroot: 0 /
+
+_0.0.t5-1 add false false /trunk
+
+
+168 294
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/7
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/7 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/7 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,37 @@
+id: a.0.r7/0
+type: dir
+count: 0
+cpath: /branches
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 12
+dir a.0.r7/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 5
+trunk
+V 12
+dir 9.0.r6/0
+END
+ENDREP
+id: 0.0.r7/202
+type: dir
+pred: 0.0.r6/168
+count: 7
+text: 7 64 125 125 09e5a936e852d553ffffa02c94219bb6
+cpath: /
+copyroot: 0 /
+
+_0.0.t6-1 add false false /branches
+
+
+202 329
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/8
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/8 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/8 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,41 @@
+id: b.0.r8/0
+type: dir
+count: 0
+cpath: /tags
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 12
+dir a.0.r7/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 12
+dir b.0.r8/0
+K 5
+trunk
+V 12
+dir 9.0.r6/0
+END
+ENDREP
+id: 0.0.r8/225
+type: dir
+pred: 0.0.r7/202
+count: 8
+text: 8 60 152 152 e6a43f118860564e559ac452935502b8
+cpath: /
+copyroot: 0 /
+
+_0.0.t7-1 add false false /tags
+
+
+225 352
Added: trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/9
===================================================================
--- trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/9 (rev 0)
+++ trunk/extensions/dna-connector-svn/src/test/resources/dummy_svn_repos/db/revs/9 2009-05-22 13:34:54 UTC (rev 935)
@@ -0,0 +1,56 @@
+id: c.0.r9/0
+type: dir
+count: 0
+cpath: /trunk/root
+copyroot: 0 /
+
+PLAIN
+K 4
+root
+V 12
+dir c.0.r9/0
+END
+ENDREP
+id: 9.0.r9/110
+type: dir
+pred: 9.0.r6/0
+count: 1
+text: 9 66 31 31 0f47817f40421b5a490871c80683b487
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 12
+dir a.0.r7/0
+K 5
+nodeA
+V 15
+dir 1.0.r5/4139
+K 5
+nodeB
+V 15
+dir 2.0.r5/5040
+K 4
+tags
+V 12
+dir b.0.r8/0
+K 5
+trunk
+V 14
+dir 9.0.r9/110
+END
+ENDREP
+id: 0.0.r9/405
+type: dir
+pred: 0.0.r8/225
+count: 9
+text: 9 238 154 154 fcdcb8458ba03ceca3c3534380813798
+cpath: /
+copyroot: 0 /
+
+_0.0.t8-1 add false false /trunk/root
+
+
+405 533
Added: trunk/extensions/dna-connector-svn/src/test/resources/files/JBoss DNA Submission Receipt for JBoss World 2009.pdf
===================================================================
(Binary files differ)
Property changes on: trunk/extensions/dna-connector-svn/src/test/resources/files/JBoss DNA Submission Receipt for JBoss World 2009.pdf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 1 month