You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@abdera.apache.org by da...@apache.org on 2007/11/29 17:45:33 UTC

svn commit: r599512 - in /incubator/abdera/java/trunk: jcr/src/main/java/org/apache/abdera/jcr/JcrCollectionProvider.java jcr/src/test/java/org/apache/abdera/jcr/JcrCollectionProviderTest.java pom.xml

Author: dandiep
Date: Thu Nov 29 08:45:33 2007
New Revision: 599512

URL: http://svn.apache.org/viewvc?rev=599512&view=rev
Log:
Fix pom so json jar downloads. Also fix JCR test as sanitization seemed to have changed a little while ago.

Modified:
    incubator/abdera/java/trunk/jcr/src/main/java/org/apache/abdera/jcr/JcrCollectionProvider.java
    incubator/abdera/java/trunk/jcr/src/test/java/org/apache/abdera/jcr/JcrCollectionProviderTest.java
    incubator/abdera/java/trunk/pom.xml

Modified: incubator/abdera/java/trunk/jcr/src/main/java/org/apache/abdera/jcr/JcrCollectionProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/jcr/src/main/java/org/apache/abdera/jcr/JcrCollectionProvider.java?rev=599512&r1=599511&r2=599512&view=diff
==============================================================================
--- incubator/abdera/java/trunk/jcr/src/main/java/org/apache/abdera/jcr/JcrCollectionProvider.java (original)
+++ incubator/abdera/java/trunk/jcr/src/main/java/org/apache/abdera/jcr/JcrCollectionProvider.java Thu Nov 29 08:45:33 2007
@@ -244,10 +244,10 @@
       Session session = getSession(request);
 
       Node collectionNode = session.getNodeByUUID(collectionNodeId);
-      String resourceName = EncodingUtil.sanitize(title);
-      entry =  createEntry(title, summary, updated, authors, 
-                           content, session, collectionNode,
-                           resourceName, 0);
+      String resourceName = EncodingUtil.sanitize(title, "-");
+      entry = createEntry(title, summary, updated, authors, 
+                          content, session, collectionNode,
+                          resourceName, 0);
       
       return entry;
     } catch (RepositoryException e) {
@@ -261,17 +261,16 @@
     }
   }
 
-  private Node createEntry(String title, String summary, 
-                           Date updated, List<Person> authors, 
-                           Content content, Session session, 
-                           Node collectionNode, String resourceName, int num)
+  protected Node createEntry(String title, String summary, 
+                             Date updated, List<Person> authors, 
+                             Content content, Session session, 
+                             Node collectionNode, String resourceName, int num)
     throws ResponseContextException, RepositoryException {
     try {
       String name = resourceName;
       if (num > 0) {
         name = name + "_" + num;
       }
-      
       Node entry = collectionNode.addNode(name, "abdera:entry");
       
       entry.addMixin("mix:referenceable");

Modified: incubator/abdera/java/trunk/jcr/src/test/java/org/apache/abdera/jcr/JcrCollectionProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/jcr/src/test/java/org/apache/abdera/jcr/JcrCollectionProviderTest.java?rev=599512&r1=599511&r2=599512&view=diff
==============================================================================
--- incubator/abdera/java/trunk/jcr/src/test/java/org/apache/abdera/jcr/JcrCollectionProviderTest.java (original)
+++ incubator/abdera/java/trunk/jcr/src/test/java/org/apache/abdera/jcr/JcrCollectionProviderTest.java Thu Nov 29 08:45:33 2007
@@ -117,7 +117,7 @@
     //prettyPrint(abdera, res.getDocument());
 
     IRI location = res.getLocation();
-    assertEquals(colUri + "/Some%20Entry", location.toString());
+    assertEquals(colUri + "/Some-Entry", location.toString());
 
     // GET the entry
     res = client.get(location.toString());

Modified: incubator/abdera/java/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/pom.xml?rev=599512&r1=599511&r2=599512&view=diff
==============================================================================
--- incubator/abdera/java/trunk/pom.xml (original)
+++ incubator/abdera/java/trunk/pom.xml Thu Nov 29 08:45:33 2007
@@ -296,4 +296,11 @@
       <url>scpexe://people.apache.org/www/people.apache.org/repo/m2-incubating-repository</url>
     </repository>
   </distributionManagement>
+  <repositories>
+    <repository>
+      <id>apache.incubating</id>
+      <name>Apache Incubating Repository</name>
+      <url>http://people.apache.org/repo/m2-incubating-repository</url>
+    </repository>
+  </repositories> 
 </project>