abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dand...@apache.org
Subject svn commit: r649280 - in /incubator/abdera/java/branches/abdera-0.4.0-incubating: build/ bundle/ dependencies/ server/ server/src/main/java/org/apache/abdera/protocol/server/impl/ server/src/test/java/org/apache/abdera/protocol/server/test/route/
Date Thu, 17 Apr 2008 21:24:38 GMT
Author: dandiep
Date: Thu Apr 17 14:24:36 2008
New Revision: 649280

URL: http://svn.apache.org/viewvc?rev=649280&view=rev
Log:
ABDERA-147: add easymock to dependencies

ABDERA-144: proper logging level for exceptions.

ABDERA-146: bad edit link for entries.


Modified:
    incubator/abdera/java/branches/abdera-0.4.0-incubating/build/build.xml
    incubator/abdera/java/branches/abdera-0.4.0-incubating/bundle/pom.xml
    incubator/abdera/java/branches/abdera-0.4.0-incubating/dependencies/deps.properties
    incubator/abdera/java/branches/abdera-0.4.0-incubating/server/pom.xml
    incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractCollectionAdapter.java
    incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultWorkspaceManager.java
    incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/RouteManager.java
    incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/test/java/org/apache/abdera/protocol/server/test/route/RouteTest.java

Modified: incubator/abdera/java/branches/abdera-0.4.0-incubating/build/build.xml
URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/abdera-0.4.0-incubating/build/build.xml?rev=649280&r1=649279&r2=649280&view=diff
==============================================================================
--- incubator/abdera/java/branches/abdera-0.4.0-incubating/build/build.xml (original)
+++ incubator/abdera/java/branches/abdera-0.4.0-incubating/build/build.xml Thu Apr 17 14:24:36
2008
@@ -595,6 +595,9 @@
       <get src="${jetty-util.dir}/${jetty-util.jar}" dest="${dependencies}/${jetty-util.jar}"
usetimestamp="true" />
       <get src="${htmlparser.dir}/${htmlparser.jar}" dest="${dependencies}/${htmlparser.jar}"
usetimestamp="true" />
       <get src="${htmlparser.dir}/${htmlserializer.jar}" dest="${dependencies}/${htmlserializer.jar}"
usetimestamp="true" />
+      <get src="${easymock.dir}/${easymock.jar}" dest="${dependencies}/${easymock.jar}"
usetimestamp="true" />
+      <get src="${easymockclassextension.dir}/${easymockclassextension.jar}" dest="${dependencies}/${easymockclassextension.jar}"
usetimestamp="true" />
+       <get src="${cglib.dir}/${cglib.jar}" dest="${dependencies}/${cglib.jar}" usetimestamp="true"
/>
     </parallel>
   </target>
 

Modified: incubator/abdera/java/branches/abdera-0.4.0-incubating/bundle/pom.xml
URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/abdera-0.4.0-incubating/bundle/pom.xml?rev=649280&r1=649279&r2=649280&view=diff
==============================================================================
--- incubator/abdera/java/branches/abdera-0.4.0-incubating/bundle/pom.xml (original)
+++ incubator/abdera/java/branches/abdera-0.4.0-incubating/bundle/pom.xml Thu Apr 17 14:24:36
2008
@@ -18,13 +18,13 @@
     <parent>
         <groupId>org.apache.abdera</groupId>
         <artifactId>abdera</artifactId>
-        <version>0.4.0-incubating</version>
+        <version>0.5.0-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>abdera-bundle</artifactId>
     <packaging>jar</packaging>
     <name>Abdera Bundle Jar</name>
-    <version>0.4.0-incubating</version>
+    <version>0.5.0-incubating-SNAPSHOT</version>
     <description>Bundle of all Abdera jars</description>
     <inceptionYear>2006</inceptionYear>
     <url>http://incubator.apache.org/abdera</url>
@@ -40,97 +40,97 @@
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-client</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-spring</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-server</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-jcr</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-couchdb</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-filesystem</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-jdbc</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-security</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-extensions-gdata</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-extensions-geo</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-extensions-html</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-extensions-json</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-extensions-main</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-extensions-media</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-extensions-oauth</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-extensions-opensearch</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-extensions-serializer</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-extensions-sharing</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.abdera</groupId>
             <artifactId>abdera-extensions-wsse</artifactId>
-            <version>0.4.0-incubating</version>
+            <version>${project.version}</version>
         </dependency>
     </dependencies>
     

Modified: incubator/abdera/java/branches/abdera-0.4.0-incubating/dependencies/deps.properties
URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/abdera-0.4.0-incubating/dependencies/deps.properties?rev=649280&r1=649279&r2=649280&view=diff
==============================================================================
--- incubator/abdera/java/branches/abdera-0.4.0-incubating/dependencies/deps.properties (original)
+++ incubator/abdera/java/branches/abdera-0.4.0-incubating/dependencies/deps.properties Thu
Apr 17 14:24:36 2008
@@ -76,4 +76,12 @@
 htmlparser.zip=http://about.validator.nu/htmlparser/htmlparser-1.0.5.zip
 htmlparser.dir=http://people.apache.org/~jmsnell
 htmlparser.jar=htmlparser-1.0.5.jar
-htmlserializer.jar=serializer.jar
\ No newline at end of file
+htmlserializer.jar=serializer.jar
+
+#### Required for tests ####
+easymock.dir=http://repo1.maven.org/maven2/org/easymock/easymock/2.3/
+easymock.jar=easymock-2.3.jar
+easymockclassextension.dir=http://repo1.maven.org/maven2/org/easymock/easymockclassextension/2.3/
+easymockclassextension.jar=easymockclassextension-2.3.jar
+cglib.dir=http://repo1.maven.org/maven2/cglib/cglib-nodep/2.1_3/
+cglib.jar=cglib-nodep-2.1_3.jar

Modified: incubator/abdera/java/branches/abdera-0.4.0-incubating/server/pom.xml
URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/abdera-0.4.0-incubating/server/pom.xml?rev=649280&r1=649279&r2=649280&view=diff
==============================================================================
--- incubator/abdera/java/branches/abdera-0.4.0-incubating/server/pom.xml (original)
+++ incubator/abdera/java/branches/abdera-0.4.0-incubating/server/pom.xml Thu Apr 17 14:24:36
2008
@@ -14,60 +14,81 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<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">
-  <parent>
-    <groupId>org.apache.abdera</groupId>
-    <artifactId>abdera</artifactId>
-    <version>0.4.0-incubating</version>
-  </parent>  
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>abdera-server</artifactId>
-  <packaging>jar</packaging>
-  <name>Abdera Server</name>
-  <version>0.4.0-incubating</version>
-  <description>Atom Publishing Protocol Specification Server-Side Implementation</description>
-
-  <properties>
-    <topDir>${basedir}/..</topDir>
-  </properties>
-  
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.abdera</groupId>
-      <artifactId>abdera-core</artifactId>
-      <version>0.4.0-incubating</version>
-      <scope>compile</scope>
-    </dependency>   
-    <dependency>
-      <groupId>org.apache.abdera</groupId>
-      <artifactId>abdera-parser</artifactId>
-      <version>0.4.0-incubating</version>
-      <scope>compile</scope>
-    </dependency>   
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <version>2.4</version>
-    </dependency>
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.mortbay.jetty</groupId>
-      <artifactId>jetty</artifactId>
-      <version>${jetty.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.abdera</groupId>
-      <artifactId>abdera-client</artifactId>
-      <version>0.4.0-incubating</version>
-      <scope>test</scope>
-    </dependency>   
-  </dependencies>
+<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">
+  <parent>
+    <groupId>org.apache.abdera</groupId>
+    <artifactId>abdera</artifactId>
+    <version>0.4.0-incubating</version>
+  </parent>  
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>abdera-server</artifactId>
+  <packaging>jar</packaging>
+  <name>Abdera Server</name>
+  <version>0.4.0-incubating</version>
+  <description>Atom Publishing Protocol Specification Server-Side Implementation</description>
+
+  <properties>
+    <topDir>${basedir}/..</topDir>
+  </properties>
+  
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.abdera</groupId>
+      <artifactId>abdera-core</artifactId>
+      <version>0.4.0-incubating</version>
+      <scope>compile</scope>
+    </dependency>   
+    <dependency>
+      <groupId>org.apache.abdera</groupId>
+      <artifactId>abdera-parser</artifactId>
+      <version>0.4.0-incubating</version>
+      <scope>compile</scope>
+    </dependency>   
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <version>2.4</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jetty</artifactId>
+      <version>${jetty.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.abdera</groupId>
+      <artifactId>abdera-client</artifactId>
+      <version>0.4.0-incubating</version>
+      <scope>test</scope>
+    </dependency>
+    
+    <dependency>
+      	<groupId>org.easymock</groupId>
+      	<artifactId>easymock</artifactId>
+      	<version>2.3</version>
+      	<scope>test</scope>
+      </dependency>
+      
+      <dependency>
+      	<groupId>org.easymock</groupId>
+      	<artifactId>easymockclassextension</artifactId>
+      	<version>2.3</version>
+      	<scope>test</scope>
+      </dependency>
+      
+      <dependency>
+      	<groupId>cglib</groupId>
+      	<artifactId>cglib-nodep</artifactId>
+      	<version>2.1_3</version>
+      	<scope>test</scope>
+      </dependency>   
+  </dependencies>
 </project>

Modified: incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractCollectionAdapter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractCollectionAdapter.java?rev=649280&r1=649279&r2=649280&view=diff
==============================================================================
--- incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractCollectionAdapter.java
(original)
+++ incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractCollectionAdapter.java
Thu Apr 17 14:24:36 2008
@@ -207,8 +207,8 @@
    * @return
    */
   protected ResponseContext createErrorResponse(ResponseContextException e) {
-    if (log.isInfoEnabled()) {
-      log.info("A ResponseException was thrown.", e);
+    if (log.isDebugEnabled()) {
+      log.debug("A ResponseException was thrown.", e);
     } else if (e.getResponseContext() instanceof EmptyResponseContext
                && ((EmptyResponseContext)e.getResponseContext()).getStatus() >=
500) {
       log.warn("A ResponseException was thrown.", e);

Modified: incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultWorkspaceManager.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultWorkspaceManager.java?rev=649280&r1=649279&r2=649280&view=diff
==============================================================================
--- incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultWorkspaceManager.java
(original)
+++ incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/DefaultWorkspaceManager.java
Thu Apr 17 14:24:36 2008
@@ -32,7 +32,7 @@
   public static final String COLLECTION_ADAPTER_ATTRIBUTE = "collectionProvider";
 
   public CollectionAdapter getCollectionAdapter(RequestContext request) {
-    String path = request.getTargetBasePath() + request.getTargetPath();
+    String path = request.getContextPath() + request.getTargetPath();
     
     // Typically this happens when a Resolver wants to override the CollectionAdapter being
used
     CollectionAdapter ca = (CollectionAdapter) request.getAttribute(Scope.REQUEST, COLLECTION_ADAPTER_ATTRIBUTE);

Modified: incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/RouteManager.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/RouteManager.java?rev=649280&r1=649279&r2=649280&view=diff
==============================================================================
--- incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/RouteManager.java
(original)
+++ incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/RouteManager.java
Thu Apr 17 14:24:36 2008
@@ -154,8 +154,8 @@
         if (!map.containsKey(var) && value != null) {
           map.put(var, value);
         }
-      }
-      return context.getTargetBasePath() + route.expand(getContext(map));
+      }            
+      return context.getContextPath() + route.expand(getContext(map));
     } else {
       return null;
     }

Modified: incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/test/java/org/apache/abdera/protocol/server/test/route/RouteTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/test/java/org/apache/abdera/protocol/server/test/route/RouteTest.java?rev=649280&r1=649279&r2=649280&view=diff
==============================================================================
--- incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/test/java/org/apache/abdera/protocol/server/test/route/RouteTest.java
(original)
+++ incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/test/java/org/apache/abdera/protocol/server/test/route/RouteTest.java
Thu Apr 17 14:24:36 2008
@@ -17,6 +17,10 @@
  */
 package org.apache.abdera.protocol.server.test.route;
 
+import static org.easymock.EasyMock.expect;
+import static org.easymock.classextension.EasyMock.createMock;
+import static org.easymock.classextension.EasyMock.replay;
+
 import java.util.HashMap;
 import java.util.Map;
 
@@ -24,6 +28,10 @@
 
 import org.apache.abdera.i18n.templates.HashMapContext;
 import org.apache.abdera.i18n.templates.Route;
+import org.apache.abdera.protocol.server.RequestContext;
+import org.apache.abdera.protocol.server.Target;
+import org.apache.abdera.protocol.server.context.RequestContextWrapper;
+import org.apache.abdera.protocol.server.impl.RouteManager;
 import org.junit.Test;
 
 public class RouteTest extends Assert {
@@ -168,5 +176,20 @@
     Map<String, String> vars = route.parse("/base/test/");
     assertEquals("test", vars.get("collection"));
   }
+    
+  @Test
+  public void testUrlFor() throws Exception {
+    RouteManager manager = new RouteManager().addRoute(new Route("entry", "/base/:collection/:entry"));
 
+    Target targetMock = createMock(Target.class);
+    expect(targetMock.getParameter("collection")).andReturn("entries");
+    expect(targetMock.getParameter("entry")).andReturn("123");
+    replay(targetMock);
+    RequestContext contextMock = createMock(RequestContextWrapper.class);
+    expect(contextMock.getContextPath()).andReturn("/appBase");
+    expect(contextMock.getTarget()).andReturn(targetMock).times(2);
+    replay(contextMock);
+
+    assertEquals(manager.urlFor(contextMock, "entry", null), "/appBase/base/entries/123");
+  }
 }



Mime
View raw message