]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-84: Adding JAX-RS specific CollectionSpace service provider node.
authorRichard Millet <richard.millet@berkeley.edu>
Thu, 30 Apr 2009 22:34:10 +0000 (22:34 +0000)
committerRichard Millet <richard.millet@berkeley.edu>
Thu, 30 Apr 2009 22:34:10 +0000 (22:34 +0000)
JaxRsServiceProvider/build.xml
JaxRsServiceProvider/src/main/java/org/collectionspace/services/jaxrs/CollectionSpaceJaxRsApplication.java [new file with mode: 0644]
JaxRsServiceProvider/src/main/webapp/WEB-INF/web.xml

index cdba8639c36a333ca6d08a02fbee522df5b2fe5b..4fd6f9f4749e636ceabe719db04d88507dcd23af 100644 (file)
@@ -6,7 +6,7 @@
 
   <target name="deploy" description="Deploy">
     <copy todir="${jboss.dir}/server/default/deploy">
-      <fileset file="${basedir}/target/helloworld.war" />
+      <fileset file="${basedir}/target/CollectionSpace.war" />
     </copy>
   </target>
 
diff --git a/JaxRsServiceProvider/src/main/java/org/collectionspace/services/jaxrs/CollectionSpaceJaxRsApplication.java b/JaxRsServiceProvider/src/main/java/org/collectionspace/services/jaxrs/CollectionSpaceJaxRsApplication.java
new file mode 100644 (file)
index 0000000..5ba58f0
--- /dev/null
@@ -0,0 +1,29 @@
+package org.collectionspace.services.jaxrs;
+
+import org.collectionspace.services.CollectionObjectResource;
+import javax.ws.rs.core.Application;
+import java.util.HashSet;
+import java.util.Set;
+
+public class CollectionSpaceJaxRsApplication extends Application {
+
+    private Set<Object> singletons = new HashSet<Object>();
+    private Set<Class<?>> empty = new HashSet<Class<?>>();
+
+    public CollectionSpaceJaxRsApplication() {
+        singletons.add(new CollectionObjectResource());
+//        singletons.add(new DomainIdentifierResource());
+//        singletons.add(new PingResource());
+    }
+
+    @Override
+    public Set<Class<?>> getClasses() {
+        return empty;
+    }
+
+    @Override
+    public Set<Object> getSingletons() {
+        return singletons;
+    }
+}
+
index 0c188a4fb9ee0e5729c6dafb6fa2d15ded5e02e4..6777d8f8effaccc0af1d18b677e51de51ea9a9bb 100644 (file)
@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">\r
 <web-app>\r
-    <display-name>HelloworldNuxeo</display-name>\r
+    <display-name>CollectionSpace</display-name>\r
 \r
     <context-param>\r
         <param-name>javax.ws.rs.Application</param-name>\r
-        <param-value>org.collectionspace.hello.services.HelloworldNuxeoApplication</param-value>\r
+        <param-value>org.collectionspace.services.jaxrs.CollectionSpaceJaxRsApplication</param-value>\r
     </context-param>\r
 \r
     <context-param>\r
         <param-name>resteasy.servlet.mapping.prefix</param-name>\r
-        <param-value>/cspace-nuxeo</param-value>\r
+        <param-value>/nuxeo-rest</param-value>\r
     </context-param>\r
 \r
     <listener>\r
@@ -28,7 +28,7 @@
 \r
     <servlet-mapping>\r
         <servlet-name>Resteasy</servlet-name>\r
-        <url-pattern>/cspace-nuxeo/*</url-pattern>\r
+        <url-pattern>/nuxeo-rest/*</url-pattern>\r
     </servlet-mapping>\r
 \r
 </web-app>\r