Upgrade to jetty 8, Jersey 2.3, cometd 2.7, coweb 1.0.1 and more...
--- a/.classpath Sun Oct 06 14:12:02 2013 +0200
+++ b/.classpath Wed Oct 16 17:32:51 2013 +0200
@@ -4,69 +4,24 @@
<classpathentry kind="src" path="server/src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
- <classpathentry kind="var" path="M2_REPO/org/opencoweb/coweb-bots/1.0/coweb-bots-1.0.jar" sourcepath="M2_REPO/org/opencoweb/coweb-bots/1.0/coweb-bots-1.0-sources.jar">
- <attributes>
- <attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/org/opencoweb/coweb-bots/1.0/coweb-bots-1.0-javadoc.jar!/"/>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/opencoweb/coweb-server/1.0/coweb-server-1.0.jar" sourcepath="M2_REPO/org/opencoweb/coweb-server/1.0/coweb-server-1.0-sources.jar">
- <attributes>
- <attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/org/opencoweb/coweb-server/1.0/coweb-server-1.0-javadoc.jar!/"/>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/opencoweb/coweb-operationengine/1.0/coweb-operationengine-1.0.jar" sourcepath="M2_REPO/org/opencoweb/coweb-operationengine/1.0/coweb-operationengine-1.0-sources.jar">
- <attributes>
- <attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/org/opencoweb/coweb-operationengine/1.0/coweb-operationengine-1.0-javadoc.jar!/"/>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/cometd/java/bayeux-api/2.5.0/bayeux-api-2.5.0.jar" sourcepath="M2_REPO/org/cometd/java/bayeux-api/2.5.0/bayeux-api-2.5.0-sources.jar">
+ <classpathentry kind="var" path="M2_REPO/org/cometd/java/bayeux-api/2.7.0/bayeux-api-2.7.0.jar" sourcepath="M2_REPO/org/cometd/java/bayeux-api/2.5.0/bayeux-api-2.5.0-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/org/cometd/java/bayeux-api/2.5.0/bayeux-api-2.5.0-javadoc.jar!/"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/cometd/java/cometd-java-common/2.5.0/cometd-java-common-2.5.0.jar" sourcepath="M2_REPO/org/cometd/java/cometd-java-common/2.5.0/cometd-java-common-2.5.0-sources.jar">
+ <classpathentry kind="var" path="M2_REPO/org/cometd/java/cometd-java-common/2.7.0/cometd-java-common-2.7.0.jar" sourcepath="M2_REPO/org/cometd/java/cometd-java-common/2.5.0/cometd-java-common-2.5.0-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/org/cometd/java/cometd-java-common/2.5.0/cometd-java-common-2.5.0-javadoc.jar!/"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-util/8.1.9.v20130131/jetty-util-8.1.9.v20130131.jar">
- <attributes>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.6.6/slf4j-api-1.6.6.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.6.6/slf4j-api-1.6.6-sources.jar">
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.6.6/slf4j-api-1.6.6-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/org/slf4j/slf4j-api/1.6.6/slf4j-api-1.6.6-javadoc.jar!/"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-continuation/8.1.9.v20130131/jetty-continuation-8.1.9.v20130131.jar">
- <attributes>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-jmx/8.1.9.v20130131/jetty-jmx-8.1.9.v20130131.jar">
- <attributes>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-server/1.17.1/jersey-server-1.17.1.jar" sourcepath="M2_REPO/com/sun/jersey/jersey-server/1.17/jersey-server-1.17-sources.jar">
- <attributes>
- <attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/com/sun/jersey/jersey-server/1.17/jersey-server-1.17-javadoc.jar!/"/>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-core/1.17.1/jersey-core-1.17.1.jar" sourcepath="M2_REPO/com/sun/jersey/jersey-core/1.17/jersey-core-1.17-sources.jar">
- <attributes>
- <attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/com/sun/jersey/jersey-core/1.17/jersey-core-1.17-javadoc.jar!/"/>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
<classpathentry kind="var" path="M2_REPO/org/mongodb/mongo-java-driver/2.11.0/mongo-java-driver-2.11.0.jar" sourcepath="M2_REPO/org/mongodb/mongo-java-driver/2.10.1/mongo-java-driver-2.10.1-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/org/mongodb/mongo-java-driver/2.10.1/mongo-java-driver-2.10.1-javadoc.jar!/"/>
@@ -119,19 +74,19 @@
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/cometd/java/cometd-java-annotations/2.5.0/cometd-java-annotations-2.5.0.jar" sourcepath="M2_REPO/org/cometd/java/cometd-java-annotations/2.5.0/cometd-java-annotations-2.5.0-sources.jar">
+ <classpathentry kind="var" path="M2_REPO/org/cometd/java/cometd-java-annotations/2.7.0/cometd-java-annotations-2.7.0.jar" sourcepath="M2_REPO/org/cometd/java/cometd-java-annotations/2.5.0/cometd-java-annotations-2.5.0-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/org/cometd/java/cometd-java-annotations/2.5.0/cometd-java-annotations-2.5.0-javadoc.jar!/"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/cometd/java/cometd-java-server/2.5.0/cometd-java-server-2.5.0.jar" sourcepath="M2_REPO/org/cometd/java/cometd-java-server/2.5.0/cometd-java-server-2.5.0-sources.jar">
+ <classpathentry kind="var" path="M2_REPO/org/cometd/java/cometd-java-server/2.7.0/cometd-java-server-2.7.0.jar" sourcepath="M2_REPO/org/cometd/java/cometd-java-server/2.5.0/cometd-java-server-2.5.0-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/org/cometd/java/cometd-java-server/2.5.0/cometd-java-server-2.5.0-javadoc.jar!/"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5-sources.jar">
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5-sources.jar">
<attributes>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
@@ -200,56 +155,20 @@
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.1.4/jackson-core-2.1.4.jar" sourcepath="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.1.4/jackson-core-2.1.4-sources.jar">
+ <classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.2.3/jackson-core-2.2.3.jar" sourcepath="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.1.4/jackson-core-2.1.4-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.1.4/jackson-core-2.1.4-javadoc.jar!/"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.1.4/jackson-databind-2.1.4.jar" sourcepath="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.1.4/jackson-databind-2.1.4-sources.jar">
+ <classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.2.3/jackson-databind-2.2.3.jar" sourcepath="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.1.4/jackson-databind-2.1.4-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.1.4/jackson-databind-2.1.4-javadoc.jar!/"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/cometd/java/cometd-websocket-jetty/2.5.1/cometd-websocket-jetty-2.5.1.jar" sourcepath="M2_REPO/org/cometd/java/cometd-websocket-jetty/2.5.1/cometd-websocket-jetty-2.5.1-sources.jar">
- <attributes>
- <attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/org/cometd/java/cometd-websocket-jetty/2.5.1/cometd-websocket-jetty-2.5.1-javadoc.jar!/"/>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/jetty-websocket/8.1.9.v20130131/jetty-websocket-8.1.9.v20130131.jar">
- <attributes>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.1.4/jackson-annotations-2.1.4.jar" sourcepath="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.1.4/jackson-annotations-2.1.4-sources.jar">
- <attributes>
- <attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.1.4/jackson-annotations-2.1.4-javadoc.jar!/"/>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-test-framework/jersey-test-framework-core/1.17.1/jersey-test-framework-core-1.17.1.jar" sourcepath="M2_REPO/com/sun/jersey/jersey-test-framework/jersey-test-framework-core/1.17/jersey-test-framework-core-1.17-sources.jar">
+ <classpathentry kind="var" path="M2_REPO/org/eclipse/jetty/aggregate/jetty-all/8.1.13.v20130916/jetty-all-8.1.13.v20130916.jar" sourcepath="/M2_REPO/org/eclipse/jetty/aggregate/jetty-all/9.0.5.v20130815/jetty-all-9.0.5.v20130815-sources.jar">
<attributes>
- <attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/com/sun/jersey/jersey-test-framework/jersey-test-framework-core/1.17/jersey-test-framework-core-1.17-javadoc.jar!/"/>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-servlet/1.17.1/jersey-servlet-1.17.1.jar" sourcepath="M2_REPO/com/sun/jersey/jersey-servlet/1.17/jersey-servlet-1.17-sources.jar">
- <attributes>
- <attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/com/sun/jersey/jersey-servlet/1.17/jersey-servlet-1.17-javadoc.jar!/"/>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/com/sun/jersey/contribs/jersey-spring/1.17.1/jersey-spring-1.17.1.jar" sourcepath="M2_REPO/com/sun/jersey/contribs/jersey-spring/1.17/jersey-spring-1.17-sources.jar">
- <attributes>
- <attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/com/sun/jersey/contribs/jersey-spring/1.17/jersey-spring-1.17-javadoc.jar!/"/>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-client/1.17.1/jersey-client-1.17.1.jar" sourcepath="M2_REPO/com/sun/jersey/jersey-client/1.17/jersey-client-1.17-sources.jar">
- <attributes>
- <attribute name="javadoc_location" value="jar:file:/Users/ymh/.m2/repository/com/sun/jersey/jersey-client/1.17/jersey-client-1.17-javadoc.jar!/"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
@@ -269,10 +188,17 @@
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-json/1.17.1/jersey-json-1.17.1.jar">
- <attributes>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
+ <classpathentry kind="lib" path="server/lib/org/opencoweb/coweb-bots/1.0.1-SNAPSHOT/coweb-bots-1.0.1-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="server/lib/org/opencoweb/coweb-operationengine/1.0.1-SNAPSHOT/coweb-operationengine-1.0.1-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="server/lib/org/opencoweb/coweb-server/1.0.1-SNAPSHOT/coweb-server-1.0.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.2.3/jackson-annotations-2.2.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/core/jersey-client/2.3.1/jersey-client-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/core/jersey-common/2.3.1/jersey-common-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/core/jersey-server/2.3.1/jersey-server-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/containers/jersey-container-servlet-core/2.3.1/jersey-container-servlet-core-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/test-framework/jersey-test-framework-core/2.3.1/jersey-test-framework-core-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/ext/jersey-spring3/2.3.1/jersey-spring3-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/ws/rs/javax.ws.rs-api/2.0/javax.ws.rs-api-2.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/media/jersey-media-json-jackson/2.3.1/jersey-media-json-jackson-2.3.1.jar"/>
<classpathentry kind="output" path="server/target/classes"/>
</classpath>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/admin-archetype/1.0.1-SNAPSHOT/_remote.repositories Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,4 @@
+#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
+#Mon Oct 14 16:54:20 CEST 2013
+admin-archetype-1.0.1-SNAPSHOT.jar>=
+admin-archetype-1.0.1-SNAPSHOT.pom>=
Binary file server/lib/org/opencoweb/admin-archetype/1.0.1-SNAPSHOT/admin-archetype-1.0.1-SNAPSHOT.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/admin-archetype/1.0.1-SNAPSHOT/admin-archetype-1.0.1-SNAPSHOT.pom Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.opencoweb</groupId>
+ <artifactId>coweb-admin</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>admin-archetype</artifactId>
+ <packaging>maven-archetype</packaging>
+ <name>OpenCoweb :: Java :: Admin :: Archetype</name>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-packaging</artifactId>
+ <version>2.0-alpha-5</version>
+ </extension>
+ </extensions>
+ <plugins>
+ <plugin>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.0-alpha-4</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/main/resources</directory>
+ <filtering>false</filtering>
+ </resource>
+ <resource>
+ <directory>${basedir}/src/main/resources</directory>
+ <includes>
+ <include>**/archetype-metadata.xml</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </build>
+
+</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/admin-archetype/1.0.1-SNAPSHOT/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+ <groupId>org.opencoweb</groupId>
+ <artifactId>admin-archetype</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <localCopy>true</localCopy>
+ </snapshot>
+ <lastUpdated>20131014145420</lastUpdated>
+ <snapshotVersions>
+ <snapshotVersion>
+ <extension>jar</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145420</updated>
+ </snapshotVersion>
+ <snapshotVersion>
+ <extension>pom</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145420</updated>
+ </snapshotVersion>
+ </snapshotVersions>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/admin-archetype/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>admin-archetype</artifactId>
+ <versioning>
+ <versions>
+ <version>1.0.1-SNAPSHOT</version>
+ </versions>
+ <lastUpdated>20131014145420</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/admin-jar/1.0.1-SNAPSHOT/_remote.repositories Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,4 @@
+#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
+#Mon Oct 14 16:54:21 CEST 2013
+admin-jar-1.0.1-SNAPSHOT.jar>=
+admin-jar-1.0.1-SNAPSHOT.pom>=
Binary file server/lib/org/opencoweb/admin-jar/1.0.1-SNAPSHOT/admin-jar-1.0.1-SNAPSHOT.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/admin-jar/1.0.1-SNAPSHOT/admin-jar-1.0.1-SNAPSHOT.pom Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-admin</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>admin-jar</artifactId>
+ <packaging>jar</packaging>
+ <name>OpenCoweb :: Java :: Admin :: Jar</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax</groupId>
+ <artifactId>javaee-api</artifactId>
+ <version>6.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wink</groupId>
+ <artifactId>wink-json4j</artifactId>
+ <version>1.1.2-incubating</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-server</artifactId>
+ <version>${project.version}</version>
+ <type>jar</type>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/admin-jar/1.0.1-SNAPSHOT/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+ <groupId>org.opencoweb</groupId>
+ <artifactId>admin-jar</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <localCopy>true</localCopy>
+ </snapshot>
+ <lastUpdated>20131014145421</lastUpdated>
+ <snapshotVersions>
+ <snapshotVersion>
+ <extension>jar</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145421</updated>
+ </snapshotVersion>
+ <snapshotVersion>
+ <extension>pom</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145421</updated>
+ </snapshotVersion>
+ </snapshotVersions>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/admin-jar/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>admin-jar</artifactId>
+ <versioning>
+ <versions>
+ <version>1.0.1-SNAPSHOT</version>
+ </versions>
+ <lastUpdated>20131014145421</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-admin/1.0.1-SNAPSHOT/_remote.repositories Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,3 @@
+#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
+#Mon Oct 14 16:54:20 CEST 2013
+coweb-admin-1.0.1-SNAPSHOT.pom>=
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-admin/1.0.1-SNAPSHOT/coweb-admin-1.0.1-SNAPSHOT.pom Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-java</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>coweb-admin</artifactId>
+ <packaging>pom</packaging>
+ <name>OpenCoweb :: Java :: Admin</name>
+
+ <modules>
+ <module>admin-archetype</module>
+ <module>admin-jar</module>
+ </modules>
+</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-admin/1.0.1-SNAPSHOT/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-admin</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <localCopy>true</localCopy>
+ </snapshot>
+ <lastUpdated>20131014145420</lastUpdated>
+ <snapshotVersions>
+ <snapshotVersion>
+ <extension>pom</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145420</updated>
+ </snapshotVersion>
+ </snapshotVersions>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-admin/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-admin</artifactId>
+ <versioning>
+ <versions>
+ <version>1.0.1-SNAPSHOT</version>
+ </versions>
+ <lastUpdated>20131014145420</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-archetype/1.0.1-SNAPSHOT/_remote.repositories Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,4 @@
+#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
+#Mon Oct 14 16:54:20 CEST 2013
+coweb-archetype-1.0.1-SNAPSHOT.jar>=
+coweb-archetype-1.0.1-SNAPSHOT.pom>=
Binary file server/lib/org/opencoweb/coweb-archetype/1.0.1-SNAPSHOT/coweb-archetype-1.0.1-SNAPSHOT.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-archetype/1.0.1-SNAPSHOT/coweb-archetype-1.0.1-SNAPSHOT.pom Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.opencoweb</groupId>
+ <artifactId>coweb-java</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-archetype</artifactId>
+ <packaging>maven-archetype</packaging>
+ <name>OpenCoweb :: Java :: Archetype</name>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-packaging</artifactId>
+ <version>2.0-alpha-5</version>
+ </extension>
+ </extensions>
+ <plugins>
+ <plugin>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.0-alpha-4</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/main/resources</directory>
+ <filtering>false</filtering>
+ </resource>
+ <resource>
+ <directory>${basedir}/src/main/resources</directory>
+ <includes>
+ <include>**/archetype-metadata.xml</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </build>
+
+</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-archetype/1.0.1-SNAPSHOT/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-archetype</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <localCopy>true</localCopy>
+ </snapshot>
+ <lastUpdated>20131014145420</lastUpdated>
+ <snapshotVersions>
+ <snapshotVersion>
+ <extension>jar</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145420</updated>
+ </snapshotVersion>
+ <snapshotVersion>
+ <extension>pom</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145420</updated>
+ </snapshotVersion>
+ </snapshotVersions>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-archetype/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-archetype</artifactId>
+ <versioning>
+ <versions>
+ <version>1.0.1-SNAPSHOT</version>
+ </versions>
+ <lastUpdated>20131014145420</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-bots/1.0.1-SNAPSHOT/_remote.repositories Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,4 @@
+#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
+#Mon Oct 14 16:54:09 CEST 2013
+coweb-bots-1.0.1-SNAPSHOT.jar>=
+coweb-bots-1.0.1-SNAPSHOT.pom>=
Binary file server/lib/org/opencoweb/coweb-bots/1.0.1-SNAPSHOT/coweb-bots-1.0.1-SNAPSHOT.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-bots/1.0.1-SNAPSHOT/coweb-bots-1.0.1-SNAPSHOT.pom Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-java</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>coweb-bots</artifactId>
+ <groupId>org.opencoweb</groupId>
+ <packaging>jar</packaging>
+ <name>OpenCoweb :: Java :: Bots</name>
+</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-bots/1.0.1-SNAPSHOT/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-bots</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <localCopy>true</localCopy>
+ </snapshot>
+ <lastUpdated>20131014145409</lastUpdated>
+ <snapshotVersions>
+ <snapshotVersion>
+ <extension>jar</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145409</updated>
+ </snapshotVersion>
+ <snapshotVersion>
+ <extension>pom</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145409</updated>
+ </snapshotVersion>
+ </snapshotVersions>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-bots/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-bots</artifactId>
+ <versioning>
+ <versions>
+ <version>1.0.1-SNAPSHOT</version>
+ </versions>
+ <lastUpdated>20131014145409</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-build/1.0.1-SNAPSHOT/_remote.repositories Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,4 @@
+#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
+#Mon Oct 14 16:54:22 CEST 2013
+coweb-build-1.0.1-SNAPSHOT.pom>=
+coweb-build-1.0.1-SNAPSHOT.war>=
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-build/1.0.1-SNAPSHOT/coweb-build-1.0.1-SNAPSHOT.pom Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-java</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>coweb-build</artifactId>
+ <name>OpenCoweb Build :: Applications</name>
+ <packaging>war</packaging>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ <configuration>
+ <overlays>
+ <overlay>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-javascript</artifactId>
+ <type>war</type>
+ <excludes>
+ <exclude>META-INF/**</exclude>
+ <exclude>WEB-INF/**</exclude>
+ </excludes>
+ <targetPath>lib</targetPath>
+ </overlay>
+ </overlays>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-bots</artifactId>
+ <version>${coweb-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-operationengine</artifactId>
+ <version>${coweb-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-server</artifactId>
+ <version>${coweb-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-javascript</artifactId>
+ <version>${coweb-version}</version>
+ <type>war</type>
+ </dependency>
+ </dependencies>
+</project>
Binary file server/lib/org/opencoweb/coweb-build/1.0.1-SNAPSHOT/coweb-build-1.0.1-SNAPSHOT.war has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-build/1.0.1-SNAPSHOT/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-build</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <localCopy>true</localCopy>
+ </snapshot>
+ <lastUpdated>20131014145422</lastUpdated>
+ <snapshotVersions>
+ <snapshotVersion>
+ <extension>war</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145422</updated>
+ </snapshotVersion>
+ <snapshotVersion>
+ <extension>pom</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145422</updated>
+ </snapshotVersion>
+ </snapshotVersions>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-build/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-build</artifactId>
+ <versioning>
+ <versions>
+ <version>1.0.1-SNAPSHOT</version>
+ </versions>
+ <lastUpdated>20131014145422</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-client/1.0.1-SNAPSHOT/_remote.repositories Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,4 @@
+#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
+#Mon Oct 14 16:54:19 CEST 2013
+coweb-client-1.0.1-SNAPSHOT.jar>=
+coweb-client-1.0.1-SNAPSHOT.pom>=
Binary file server/lib/org/opencoweb/coweb-client/1.0.1-SNAPSHOT/coweb-client-1.0.1-SNAPSHOT.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-client/1.0.1-SNAPSHOT/coweb-client-1.0.1-SNAPSHOT.pom Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-java</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-client</artifactId>
+ <name>OpenCoweb :: Java :: Client</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.cometd.java</groupId>
+ <artifactId>cometd-java-client</artifactId>
+ <version>${cometd-version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-client/1.0.1-SNAPSHOT/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-client</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <localCopy>true</localCopy>
+ </snapshot>
+ <lastUpdated>20131014145419</lastUpdated>
+ <snapshotVersions>
+ <snapshotVersion>
+ <extension>jar</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145419</updated>
+ </snapshotVersion>
+ <snapshotVersion>
+ <extension>pom</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145419</updated>
+ </snapshotVersion>
+ </snapshotVersions>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-client/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-client</artifactId>
+ <versioning>
+ <versions>
+ <version>1.0.1-SNAPSHOT</version>
+ </versions>
+ <lastUpdated>20131014145419</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-java/1.0.1-SNAPSHOT/_remote.repositories Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,3 @@
+#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
+#Mon Oct 14 16:54:04 CEST 2013
+coweb-java-1.0.1-SNAPSHOT.pom>=
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-java/1.0.1-SNAPSHOT/coweb-java-1.0.1-SNAPSHOT.pom Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-java</artifactId>
+ <packaging>pom</packaging>
+
+ <name>OpenCoweb</name>
+ <description>Open Cooperative Web Framework</description>
+ <version>1.0.1-SNAPSHOT</version>
+ <url>http://opencoweb.org</url>
+ <inceptionYear>2011</inceptionYear>
+ <organization>
+ <name>The Dojo Foundation</name>
+ <url>http://dojofoundation.org</url>
+ </organization>
+
+ <licenses>
+ <license>
+ <name>The New BSD License</name>
+ <url>http://www.opensource.org/licenses/bsd-license.html</url>
+ </license>
+ <license>
+ <name>The Academic Free License, v. 2.1</name>
+ <url>http://en.wikipedia.org/wiki/Academic_Free_License</url>
+ </license>
+ </licenses>
+
+ <developers>
+ <developer>
+ <id>parente</id>
+ <name>Peter Parente</name>
+ <email>pparent@us.ibm.com</email>
+ <organization>IBM Corporation</organization>
+ </developer>
+ <developer>
+ <id>bpburns</id>
+ <name>Brian Burns</name>
+ <email>bburns@us.ibm.com</email>
+ <organization>IBM Corporation</organization>
+ </developer>
+ <developer>
+ <id>vinomaster</id>
+ <name>Dan Gisolfi</name>
+ <email>gisolfi@us.ibm.com</email>
+ <organization>IBM Corporation</organization>
+ </developer>
+ </developers>
+
+ <scm>
+ <connection>scm:git:git@github.com:opencoweb/coweb.git</connection>
+ <developerConnection>scm:git:git@github.com:opencoweb/coweb.git</developerConnection>
+ <url>git@github.com:opencoweb/coweb.git</url>
+ </scm>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <cometd-version>2.7.0</cometd-version>
+ <coweb-version>1.0.1-SNAPSHOT</coweb-version>
+ </properties>
+
+ <modules>
+ <module>coweb-operationengine</module>
+ <module>coweb-bots</module>
+ <module>coweb-server</module>
+ <module>coweb-javascript</module>
+ <module>coweb-client</module>
+ <module>coweb-archetype</module>
+ <module>coweb-admin</module>
+ <module>coweb-build</module>
+ </modules>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <doctitle>${project.name} ${project.version} Java Server API</doctitle>
+ </configuration>
+ <executions>
+ <execution>
+ <id>aggregate</id>
+ <goals>
+ <goal>aggregate</goal>
+ </goals>
+ <phase>site</phase>
+ <configuration></configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <profiles>
+ <profile>
+ <id>release-sign-artifacts</id>
+ <activation>
+ <property>
+ <name>performRelease</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <id>sign-artifacts</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-java/1.0.1-SNAPSHOT/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-java</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <localCopy>true</localCopy>
+ </snapshot>
+ <lastUpdated>20131014145404</lastUpdated>
+ <snapshotVersions>
+ <snapshotVersion>
+ <extension>pom</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145404</updated>
+ </snapshotVersion>
+ </snapshotVersions>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-java/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-java</artifactId>
+ <versioning>
+ <versions>
+ <version>1.0.1-SNAPSHOT</version>
+ </versions>
+ <lastUpdated>20131014145404</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-javascript/1.0.1-SNAPSHOT/_remote.repositories Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,4 @@
+#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
+#Mon Oct 14 16:54:19 CEST 2013
+coweb-javascript-1.0.1-SNAPSHOT.pom>=
+coweb-javascript-1.0.1-SNAPSHOT.war>=
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-javascript/1.0.1-SNAPSHOT/coweb-javascript-1.0.1-SNAPSHOT.pom Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-java</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-javascript</artifactId>
+ <name>OpenCoweb :: Java :: JavaScript</name>
+ <packaging>war</packaging>
+
+ <properties>
+ <i18n-plugin-url>http://requirejs.org/docs/release/1.0.0/minified/i18n.js</i18n-plugin-url>
+ <coweb-jsoe>${project.build.directory}/${project.artifactId}-${project.version}/coweb/jsoe</coweb-jsoe>
+ <coweb-jsoe-src>src/main/webapp/coweb/jsoe</coweb-jsoe-src>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <warSourceExcludes>coweb/jsoe/</warSourceExcludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.4</version>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>compile</phase>
+ <goals><goal>unpack</goal></goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.cometd.javascript</groupId>
+ <artifactId>cometd-javascript-common</artifactId>
+ <version>${cometd.version}</version>
+ <type>war</type>
+ <overWrite>false</overWrite>
+ <outputDirectory>${project.build.directory}/tmp</outputDirectory>
+ <includes>**/cometd.js,**/cometd/AckExtension.js</includes>
+ </artifactItem>
+ </artifactItems>
+ <!-- other configurations here -->
+ </configuration>
+ </execution>
+ </executions>
+
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>prepare-package</phase>
+ <configuration>
+ <tasks>
+ <property name="workpath" location="${project.build.directory}/tmp" />
+ <echo message="HERE *************************** ${workpath}" />
+
+ <!-- Pull in cometd. -->
+ <delete dir="${project.build.directory}/${project.artifactId}-${project.version}/org/cometd" />
+ <copy file="${workpath}/org/cometd.js"
+ tofile="${project.build.directory}/${project.artifactId}-${project.version}/org/cometd.js" />
+ <copy file="${workpath}/org/cometd/AckExtension.js"
+ tofile="${project.build.directory}/${project.artifactId}-${project.version}/org/cometd/AckExtension.js" />
+
+ <!-- Pull in requirejs's i18n library. -->
+ <mkdir dir="${project.build.directory}/${project.artifactId}-${project.version}/org/requirejs"/>
+ <get src="${i18n-plugin-url}"
+ dest="${project.build.directory}/${project.artifactId}-${project.version}/org/requirejs/i18n.js"/>
+
+ <!-- Use only the relevant coweb-jsoe files. -->
+ <copy todir="${coweb-jsoe}">
+ <fileset dir="${coweb-jsoe-src}/src/coweb/jsoe">
+ <include name="*.js" />
+ <exclude name="OTEngine.js" />
+ </fileset>
+ </copy>
+ <copy todir="${coweb-jsoe}/nls">
+ <fileset dir="${coweb-jsoe-src}/src/coweb/jsoe/nls" />
+ </copy>
+
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.cometd.javascript</groupId>
+ <artifactId>cometd-javascript-common</artifactId>
+ <version>${cometd-version}</version>
+ <type>war</type>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
Binary file server/lib/org/opencoweb/coweb-javascript/1.0.1-SNAPSHOT/coweb-javascript-1.0.1-SNAPSHOT.war has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-javascript/1.0.1-SNAPSHOT/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-javascript</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <localCopy>true</localCopy>
+ </snapshot>
+ <lastUpdated>20131014145419</lastUpdated>
+ <snapshotVersions>
+ <snapshotVersion>
+ <extension>war</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145419</updated>
+ </snapshotVersion>
+ <snapshotVersion>
+ <extension>pom</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145419</updated>
+ </snapshotVersion>
+ </snapshotVersions>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-javascript/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-javascript</artifactId>
+ <versioning>
+ <versions>
+ <version>1.0.1-SNAPSHOT</version>
+ </versions>
+ <lastUpdated>20131014145419</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-operationengine/1.0.1-SNAPSHOT/_remote.repositories Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,4 @@
+#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
+#Mon Oct 14 16:54:09 CEST 2013
+coweb-operationengine-1.0.1-SNAPSHOT.jar>=
+coweb-operationengine-1.0.1-SNAPSHOT.pom>=
Binary file server/lib/org/opencoweb/coweb-operationengine/1.0.1-SNAPSHOT/coweb-operationengine-1.0.1-SNAPSHOT.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-operationengine/1.0.1-SNAPSHOT/coweb-operationengine-1.0.1-SNAPSHOT.pom Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-java</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-operationengine</artifactId>
+ <name>OpenCoweb :: Java :: OperationEngine</name>
+
+</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-operationengine/1.0.1-SNAPSHOT/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-operationengine</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <localCopy>true</localCopy>
+ </snapshot>
+ <lastUpdated>20131014145409</lastUpdated>
+ <snapshotVersions>
+ <snapshotVersion>
+ <extension>jar</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145409</updated>
+ </snapshotVersion>
+ <snapshotVersion>
+ <extension>pom</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145409</updated>
+ </snapshotVersion>
+ </snapshotVersions>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-operationengine/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-operationengine</artifactId>
+ <versioning>
+ <versions>
+ <version>1.0.1-SNAPSHOT</version>
+ </versions>
+ <lastUpdated>20131014145409</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-server/1.0.1-SNAPSHOT/_remote.repositories Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,4 @@
+#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
+#Mon Oct 14 16:54:10 CEST 2013
+coweb-server-1.0.1-SNAPSHOT.pom>=
+coweb-server-1.0.1-SNAPSHOT.jar>=
Binary file server/lib/org/opencoweb/coweb-server/1.0.1-SNAPSHOT/coweb-server-1.0.1-SNAPSHOT.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-server/1.0.1-SNAPSHOT/coweb-server-1.0.1-SNAPSHOT.pom Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-java</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-server</artifactId>
+ <name>OpenCoweb :: Java :: Server</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-bots</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-operationengine</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.cometd.java</groupId>
+ <artifactId>cometd-java-server</artifactId>
+ <version>${cometd-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.cometd.java</groupId>
+ <artifactId>bayeux-api</artifactId>
+ <version>${cometd-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.cometd.java</groupId>
+ <artifactId>cometd-java-common</artifactId>
+ <version>${cometd-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.cometd.java</groupId>
+ <artifactId>cometd-websocket-jetty</artifactId>
+ <version>${cometd-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-server/1.0.1-SNAPSHOT/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-server</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <localCopy>true</localCopy>
+ </snapshot>
+ <lastUpdated>20131014145410</lastUpdated>
+ <snapshotVersions>
+ <snapshotVersion>
+ <extension>jar</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145410</updated>
+ </snapshotVersion>
+ <snapshotVersion>
+ <extension>pom</extension>
+ <value>1.0.1-SNAPSHOT</value>
+ <updated>20131014145410</updated>
+ </snapshotVersion>
+ </snapshotVersions>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/coweb-server/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>org.opencoweb</groupId>
+ <artifactId>coweb-server</artifactId>
+ <versioning>
+ <versions>
+ <version>1.0.1-SNAPSHOT</version>
+ </versions>
+ <lastUpdated>20131014145410</lastUpdated>
+ </versioning>
+</metadata>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/lib/org/opencoweb/maven-metadata-local.xml Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <plugins>
+ <plugin>
+ <name>OpenCoweb :: Java :: Archetype</name>
+ <prefix>coweb-archetype</prefix>
+ <artifactId>coweb-archetype</artifactId>
+ </plugin>
+ <plugin>
+ <name>OpenCoweb :: Java :: Admin :: Archetype</name>
+ <prefix>admin-archetype</prefix>
+ <artifactId>admin-archetype</artifactId>
+ </plugin>
+ </plugins>
+</metadata>
--- a/server/pom.xml Sun Oct 06 14:12:02 2013 +0200
+++ b/server/pom.xml Wed Oct 16 17:32:51 2013 +0200
@@ -8,21 +8,37 @@
<packaging>war</packaging>
<properties>
- <surefire-version>2.14</surefire-version>
- <coweb-version>1.0</coweb-version>
+ <surefire-version>2.16</surefire-version>
+ <coweb-version>1.0.1-SNAPSHOT</coweb-version>
<cowebx-version>1.0</cowebx-version>
- <jersey-version>1.17.1</jersey-version>
+ <jersey-version>2.3.1</jersey-version>
<spring-version>3.2.1.RELEASE</spring-version>
<spring-data-mongodb-version>1.2.0.RELEASE</spring-data-mongodb-version>
<spring-security-version>3.1.3.RELEASE</spring-security-version>
- <jetty-version>8.1.10.v20130312</jetty-version>
+ <spring-data-commons-version>1.5.0.RELEASE</spring-data-commons-version>
+ <spring-data-jpa-version>1.3.0.RELEASE</spring-data-jpa-version>
+ <jetty-plugin-version>8.1.13.v20130916</jetty-plugin-version>
+ <jetty-version>8.1.13.v20130916</jetty-version>
<junit-version>4.10</junit-version>
<thymeleaf-version>2.0.16</thymeleaf-version>
<thymeleaf-springsecurity-version>2.0.0</thymeleaf-springsecurity-version>
- <cometd-version>2.5.1</cometd-version>
- <jackson-version>2.1.4</jackson-version>
+ <cometd-version>2.7.0</cometd-version>
+ <jackson-version>2.2.3</jackson-version>
<joda-version>2.1</joda-version>
<mongo-driver-version>2.11.0</mongo-driver-version>
+ <jaxrs-api-version>2.0</jaxrs-api-version>
+ <javax-annotation-version>1.2</javax-annotation-version>
+ <javax-inject-version>1</javax-inject-version>
+ <javax-servlet-api-version>3.1.0</javax-servlet-api-version>
+ <javax-servlet-jstl-version>1.2</javax-servlet-jstl-version>
+ <javax-persistence-api-version>1.0.2</javax-persistence-api-version>
+ <javax-validation-api-version>1.1.0.CR2</javax-validation-api-version>
+ <hibernate-validator-version>4.2.0.Final</hibernate-validator-version>
+ <slf4j-log4j12-version>1.7.5</slf4j-log4j12-version>
+ <nekohtml-version>1.9.16</nekohtml-version>
+ <commons-codec-version>1.7</commons-codec-version>
+ <bson4jackson-version>2.1.1</bson4jackson-version>
+ <fasterxml-java-uuid-generator-version>3.1.3</fasterxml-java-uuid-generator-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
@@ -32,7 +48,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.0</version>
+ <version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
@@ -42,7 +58,7 @@
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
- <version>${jetty-version}</version>
+ <version>${jetty-plugin-version}</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webApp>
@@ -55,7 +71,7 @@
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
- <archive>
+ <archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
@@ -136,6 +152,15 @@
</build>
<repositories>
<repository>
+ <id>lib</id>
+ <name>lib</name>
+ <releases>
+ <enabled>true</enabled>
+ <checksumPolicy>ignore</checksumPolicy>
+ </releases>
+ <url>file://${project.basedir}/lib</url>
+ </repository>
+ <repository>
<id>spring-maven-release</id>
<name>Spring Maven Release Repository</name>
<url>http://maven.springframework.org/release</url>
@@ -149,24 +174,39 @@
<id>spring-release</id>
<name>Spring Maven SNAPSHOT Repository</name>
<url>http://repo.springsource.org/release</url>
- </repository>
+ </repository>
</repositories>
<dependencies>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
- <version>1</version>
+ <version>${javax-inject-version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
- <version>3.0.1</version>
+ <version>${javax-servlet-api-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ <version>${jaxrs-api-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>javax.annotation-api</artifactId>
+ <version>${javax-annotation-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.cometd.java</groupId>
+ <artifactId>bayeux-api</artifactId>
+ <version>${cometd-version}</version>
</dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-common</artifactId>
<version>${cometd-version}</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.cometd.java</groupId>
<artifactId>cometd-java-annotations</artifactId>
@@ -176,7 +216,7 @@
<groupId>org.cometd.java</groupId>
<artifactId>cometd-websocket-jetty</artifactId>
<version>${cometd-version}</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.opencoweb</groupId>
<artifactId>coweb-bots</artifactId>
@@ -200,20 +240,20 @@
<type>war</type>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-server</artifactId>
- <version>${jersey-version}</version>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-json</artifactId>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-server</artifactId>
<version>${jersey-version}</version>
</dependency>
<dependency>
- <groupId>com.sun.jersey.contribs</groupId>
- <artifactId>jersey-spring</artifactId>
+ <groupId>org.glassfish.jersey.media</groupId>
+ <artifactId>jersey-media-json-jackson</artifactId>
<version>${jersey-version}</version>
- <exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.ext</groupId>
+ <artifactId>jersey-spring3</artifactId>
+ <version>${jersey-version}</version>
+ <!--exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
@@ -234,14 +274,14 @@
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
- </exclusions>
+ </exclusions-->
</dependency>
- <dependency>
- <groupId>com.sun.jersey.jersey-test-framework</groupId>
- <artifactId>jersey-test-framework-grizzly2</artifactId>
- <version>${jersey-version}</version>
- <scope>test</scope>
- </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
+ <version>${jersey-version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
@@ -250,7 +290,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>1.7.2</version>
+ <version>${slf4j-log4j12-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
@@ -266,13 +306,13 @@
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring-version}</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring-version}</version>
<scope>test</scope>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
@@ -281,12 +321,12 @@
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
- <version>1.5.0.RELEASE</version>
+ <version>${spring-data-commons-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
- <version>1.3.0.RELEASE</version>
+ <version>${spring-data-jpa-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
@@ -296,18 +336,18 @@
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
- <version>1.0.2</version>
+ <version>${javax-persistence-api-version}</version>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
<version>${junit-version}</version>
- <scope>test</scope>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
- <version>1.2</version>
+ <version>${javax-servlet-jstl-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
@@ -328,7 +368,22 @@
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
- <version>1.9.16</version>
+ <version>${nekohtml-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ <version>${jackson-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>${jackson-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ <version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
@@ -338,36 +393,11 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>1.7</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <version>${jetty-version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-client</artifactId>
- <version>${jetty-version}</version>
+ <version>${commons-codec-version}</version>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-websocket</artifactId>
- <version>${jetty-version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-jmx</artifactId>
- <version>${jetty-version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- <version>${jetty-version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-servlets</artifactId>
+ <groupId>org.eclipse.jetty.aggregate</groupId>
+ <artifactId>jetty-all</artifactId>
<version>${jetty-version}</version>
</dependency>
<dependency>
@@ -398,7 +428,7 @@
<dependency>
<groupId>de.undercouch</groupId>
<artifactId>bson4jackson</artifactId>
- <version>2.1.1</version>
+ <version>${bson4jackson-version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
@@ -408,21 +438,21 @@
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
- <version>1.1.0.CR2</version>
+ <version>${javax-validation-api-version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
- <version>4.2.0.Final</version>
+ <version>${hibernate-validator-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.uuid</groupId>
<artifactId>java-uuid-generator</artifactId>
- <version>3.1.3</version>
+ <version>${fasterxml-java-uuid-generator-version}</version>
</dependency>
</dependencies>
<organization>
- <name>IRI</name>
- <url>http://www.iri.centrepompidou.fr</url>
+ <name>IRI</name>
+ <url>http://www.iri.centrepompidou.fr</url>
</organization>
</project>
--- a/server/src/main/java/org/iri_research/renkan/models/Project.java Sun Oct 06 14:12:02 2013 +0200
+++ b/server/src/main/java/org/iri_research/renkan/models/Project.java Wed Oct 16 17:32:51 2013 +0200
@@ -23,6 +23,7 @@
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
+import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
@Document(collection="projects")
@@ -34,7 +35,9 @@
@Field("rev_counter")
private int revCounter = 1;
+ @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone="GMT")
private Date created;
+ @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone="GMT")
private Date updated;
// Space
@@ -109,6 +112,7 @@
return this.users;
}
+ @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone="GMT")
public Date getCreated() {
return created;
}
@@ -175,6 +179,7 @@
return new_key.equals(signature);
}
+ @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone="GMT")
public Date getUpdated() {
return updated;
}
--- a/server/src/main/java/org/iri_research/renkan/models/ProjectRevision.java Sun Oct 06 14:12:02 2013 +0200
+++ b/server/src/main/java/org/iri_research/renkan/models/ProjectRevision.java Wed Oct 16 17:32:51 2013 +0200
@@ -10,6 +10,8 @@
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
@Document(collection="projectRevisions")
public class ProjectRevision extends AbstractRenkanModel<ObjectId> {
@@ -21,6 +23,7 @@
@DBRef
private Project project;
+ @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone="GMT")
private Date created;
// Nodes
@@ -66,6 +69,7 @@
return edges;
}
+ @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone="GMT")
public Date getCreated() {
return created;
}
--- a/server/src/main/java/org/iri_research/renkan/models/ProjectSync.java Sun Oct 06 14:12:02 2013 +0200
+++ b/server/src/main/java/org/iri_research/renkan/models/ProjectSync.java Wed Oct 16 17:32:51 2013 +0200
@@ -6,6 +6,8 @@
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
@Document(collection="projectSyncs")
public class ProjectSync {
@@ -19,6 +21,7 @@
private int revision;
+ @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone="GMT")
private Date created;
private String user;
--- a/server/src/main/java/org/iri_research/renkan/models/Space.java Sun Oct 06 14:12:02 2013 +0200
+++ b/server/src/main/java/org/iri_research/renkan/models/Space.java Wed Oct 16 17:32:51 2013 +0200
@@ -14,6 +14,7 @@
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
+import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
@Document(collection="spaces")
@@ -43,6 +44,8 @@
@JsonProperty("created_by")
private String createdBy = null;
private String image;
+
+ @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone="GMT")
private Date created;
public String getImage() {
@@ -54,6 +57,7 @@
return createdBy;
}
+ @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone="GMT")
public Date getCreated() {
return created;
}
--- a/server/src/main/java/org/iri_research/renkan/models/User.java Sun Oct 06 14:12:02 2013 +0200
+++ b/server/src/main/java/org/iri_research/renkan/models/User.java Wed Oct 16 17:32:51 2013 +0200
@@ -8,6 +8,7 @@
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
+import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
@Document(collection="users")
@@ -23,9 +24,11 @@
private boolean locked;
@Field("expiration_date")
+ @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone="GMT")
private Date expirationDate;
@Field("credentials_expiration_date")
+ @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ", timezone="GMT")
private Date credentialExpirationDate;
public User(String id, String title, String description, String uri, String color) {
--- a/server/src/main/java/org/iri_research/renkan/rest/ObjectMapperProvider.java Sun Oct 06 14:12:02 2013 +0200
+++ b/server/src/main/java/org/iri_research/renkan/rest/ObjectMapperProvider.java Wed Oct 16 17:32:51 2013 +0200
@@ -12,12 +12,12 @@
@Provider
public class ObjectMapperProvider implements ContextResolver<ObjectMapper> {
- @Override
- public ObjectMapper getContext(Class<?> type) {
- ObjectMapper objectMapper = new ObjectMapper();
- objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
-
- return objectMapper;
- }
+ @Override
+ public ObjectMapper getContext(Class<?> type) {
+ ObjectMapper objectMapper = new ObjectMapper();
+ objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS , false);
+
+ return objectMapper;
+ }
}
--- a/server/src/main/java/org/iri_research/renkan/rest/ProjectsResource.java Sun Oct 06 14:12:02 2013 +0200
+++ b/server/src/main/java/org/iri_research/renkan/rest/ProjectsResource.java Wed Oct 16 17:32:51 2013 +0200
@@ -4,6 +4,7 @@
import java.util.Date;
import java.util.List;
+import javax.inject.Singleton;
import javax.ws.rs.Path;
import org.iri_research.renkan.Constants;
@@ -15,8 +16,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import com.sun.jersey.spi.resource.Singleton;
-
@Singleton
@Path("projects")
--- a/server/src/main/java/org/iri_research/renkan/rest/RenkanResource.java Sun Oct 06 14:12:02 2013 +0200
+++ b/server/src/main/java/org/iri_research/renkan/rest/RenkanResource.java Wed Oct 16 17:32:51 2013 +0200
@@ -6,14 +6,12 @@
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.WebApplicationException;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
@@ -21,6 +19,7 @@
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.core.UriInfo;
+import org.glassfish.jersey.server.JSONP;
import org.iri_research.renkan.models.IRenkanModel;
import org.iri_research.renkan.repositories.IRenkanRepository;
import org.slf4j.Logger;
@@ -33,151 +32,178 @@
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.DBObject;
-import com.sun.jersey.api.json.JSONWithPadding;
public abstract class RenkanResource<T extends IRenkanModel<ID>, ID extends Serializable> {
-
- private Logger logger = LoggerFactory.getLogger(RenkanResource.class);
-
- protected String[] baseObjectListFieldList = {"description","title","uri","created", "color"};
+
+ private Logger logger = LoggerFactory.getLogger(RenkanResource.class);
+
+ protected String[] baseObjectListFieldList = { "description", "title",
+ "uri", "created", "color" };
+
+ abstract protected IRenkanRepository<T, ID> getRepository();
+
+ abstract protected ID getNewId();
+
+ abstract protected List<String> getObjectListFieldList();
+
+ @Context
+ private UriInfo uriInfo;
+
+ protected DBCollection getCollection() {
+ return this.getRepository().getCollection();
+ }
- abstract protected IRenkanRepository<T, ID> getRepository();
- abstract protected ID getNewId();
- abstract protected List<String> getObjectListFieldList();
+ abstract protected void prepareObject(T obj);
+
+ protected void doDeleteObject(ID objectId) {
+ this.getRepository().delete(objectId);
+ }
- @Context
- private UriInfo uriInfo;
+ // TODO: this produce application/javascript by default. I would rather have
+ // application/json. The prefered behaviour would be to produde js only od
+ // the callbacl query param is used
+ @GET
+ @Path("{id : [a-zA-Z\\-0-9]+}")
+ @JSONP(callback="callback", queryParam="callback")
+ @Produces({"application/javascript", "application/x-javascript",
+ "text/ecmascript", "application/ecmascript", "text/jscript", MediaType.APPLICATION_JSON + ";charset=utf-8"})
+ public T getObject(@PathParam("id") ID objectId) {
+
+ this.logger.debug("GetObject: " + objectId);
+
+ T obj = this.getRepository().findOne(objectId);
- protected DBCollection getCollection() {
- return this.getRepository().getCollection();
- }
-
- abstract protected void prepareObject(T obj);
-
- protected void doDeleteObject(ID objectId) {
- this.getRepository().delete(objectId);
- }
-
-
- //TODO: this produce application/javascript by default. I would rather have application/json. The prefered behaviour would be to produde js only od the callbacl query param is used
- @GET
- @Path("{id : [a-zA-Z\\-0-9]+}")
- @Produces({ "application/javascript",
- "application/x-javascript", "text/ecmascript",
- "application/ecmascript", "text/jscript", MediaType.APPLICATION_JSON + ";charset=utf-8"})
- public JSONWithPadding getObject(@PathParam("id") ID objectId, @QueryParam("callback") @DefaultValue("callback") String callback) {
-
- this.logger.debug("GetObject: " + objectId);
-
- T obj = this.getRepository().findOne(objectId);
-
- if (null == obj) {
- throw new WebApplicationException(Status.NOT_FOUND);
- }
-
- return new JSONWithPadding(obj, callback);
- }
-
- @DELETE
- @Path("{id : [a-zA-Z\\-0-9]+}")
- @Produces(MediaType.TEXT_PLAIN + ";charset=utf-8")
- public Response deleteObject(@PathParam("id") ID objectId) {
-
- this.logger.debug("DeleteObject : id " + objectId);
- this.doDeleteObject(objectId);
-
- return Response.ok(this.uriInfo.getAbsolutePathBuilder().build().toString() + " deleted").build();
-
- }
-
- /**
- * test: curl -i -X PUT -H 'Content-Type: application/json' -d @test-data.json http://localhost:8080/renkan/rest/spaces/12eff140-e65c-11e1-aff1-0800200c9a66
- * @param objId
- * @param objectContent
- */
- @PUT
- @Path("{id : [a-zA-Z\\-0-9]+}")
- @Consumes(MediaType.APPLICATION_JSON + ";charset=utf-8")
- public Response putRenkanObject(@PathParam("id") ID objId, T obj) {
+ if (null == obj) {
+ throw new WebApplicationException(Status.NOT_FOUND);
+ }
+
+ return obj;
+ }
+
+ @DELETE
+ @Path("{id : [a-zA-Z\\-0-9]+}")
+ @Produces(MediaType.TEXT_PLAIN + ";charset=utf-8")
+ public Response deleteObject(@PathParam("id") ID objectId) {
+
+ this.logger.debug("DeleteObject : id " + objectId);
+ this.doDeleteObject(objectId);
+
+ return Response.ok(
+ this.uriInfo.getAbsolutePathBuilder().build().toString()
+ + " deleted").build();
+
+ }
+
+ /**
+ * test: curl -i -X PUT -H 'Content-Type: application/json' -d
+ * @test-data.json http://localhost:8080/renkan/rest/spaces/
+ * 12eff140-e65c-11e1-aff1-0800200c9a66
+ *
+ * @param objId
+ * @param objectContent
+ */
+ @PUT
+ @Path("{id : [a-zA-Z\\-0-9]+}")
+ @Consumes(MediaType.APPLICATION_JSON + ";charset=utf-8")
+ public Response putRenkanObject(@PathParam("id") ID objId, T obj) {
+
+ if (!objId.equals(obj.getId())) {
+ throw new WebApplicationException(Response
+ .status(Status.BAD_REQUEST)
+ .entity("Id parameter and id in JSON do not match").build());
+ }
+
+ if (!this.getRepository().exists(objId)) {
+ throw new WebApplicationException(Response.status(Status.NOT_FOUND)
+ .build());
+ }
- if(!objId.equals(obj.getId())) {
- throw new WebApplicationException(Response.status(Status.BAD_REQUEST).entity("Id parameter and id in JSON do not match").build());
- }
-
- if(!this.getRepository().exists(objId)) {
- throw new WebApplicationException(Response.status(Status.NOT_FOUND).build());
- }
-
- this.prepareObject(obj);
- this.getRepository().save(obj);
- return Response.noContent().build();
-
- }
-
- @POST
- @Consumes(MediaType.APPLICATION_JSON + ";charset=utf-8")
- @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
- public Response postRenkanObject(T obj) {
+ this.prepareObject(obj);
+ this.getRepository().save(obj);
+ return Response.noContent().build();
+
+ }
+
+ @POST
+ @Consumes(MediaType.APPLICATION_JSON + ";charset=utf-8")
+ @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
+ public Response postRenkanObject(T obj) {
+
+ if (obj.getId() != null) {
+ throw new WebApplicationException(Response
+ .status(Status.BAD_REQUEST)
+ .entity("Id in JSON must be null").build());
+ }
- if(obj.getId() != null) {
- throw new WebApplicationException(Response.status(Status.BAD_REQUEST).entity("Id in JSON must be null").build());
- }
-
- obj.setId(getNewId());
- this.prepareObject(obj);
- obj = this.getRepository().save(obj);
- return Response.created(this.uriInfo.getAbsolutePathBuilder().segment(obj.getId().toString()).build()).entity(obj).build();
- }
-
+ obj.setId(getNewId());
+ this.prepareObject(obj);
+ obj = this.getRepository().save(obj);
+ return Response
+ .created(
+ this.uriInfo.getAbsolutePathBuilder()
+ .segment(obj.getId().toString()).build())
+ .entity(obj).build();
+ }
+
+ @GET
+ @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
+ public String getObjectList() throws JsonProcessingException {
+
+ BasicDBObject keys = new BasicDBObject();
+
+ for (String fieldname : this.getObjectListFieldList()) {
+ keys.put(fieldname, 1);
+ }
+ DBCursor cursor = this.getCollection().find(new BasicDBObject(), keys);
+
+ List<DBObject> res = new ArrayList<DBObject>();
- @GET
- @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
- public String getObjectList() throws JsonProcessingException {
-
- BasicDBObject keys = new BasicDBObject();
-
- for (String fieldname : this.getObjectListFieldList()) {
- keys.put(fieldname, 1);
- }
- DBCursor cursor = this.getCollection().find(new BasicDBObject(), keys);
-
- List<DBObject> res = new ArrayList<DBObject>();
-
- try {
- while(cursor.hasNext()) {
- DBObject obj = cursor.next();
- obj.put("id", obj.get("_id"));
- DBObject links = new BasicDBObject();
-
- DBObject linkdef = new BasicDBObject();
- linkdef.put("href", this.uriInfo.getAbsolutePathBuilder().path(obj.get("_id").toString()).build().toString());
- linkdef.put("method", "get");
- linkdef.put("produces", MediaType.APPLICATION_JSON + ";charset=utf-8");
- links.put("view", linkdef);
-
- linkdef = new BasicDBObject();
- linkdef.put("href", this.uriInfo.getAbsolutePathBuilder().path(obj.get("_id").toString()).build().toString());
- linkdef.put("method", "put");
- linkdef.put("consumes", MediaType.APPLICATION_JSON + ";charset=utf-8");
- links.put("update", linkdef);
+ try {
+ while (cursor.hasNext()) {
+ DBObject obj = cursor.next();
+ obj.put("id", obj.get("_id"));
+ DBObject links = new BasicDBObject();
+
+ DBObject linkdef = new BasicDBObject();
+ linkdef.put(
+ "href",
+ this.uriInfo.getAbsolutePathBuilder()
+ .path(obj.get("_id").toString()).build()
+ .toString());
+ linkdef.put("method", "get");
+ linkdef.put("produces", MediaType.APPLICATION_JSON
+ + ";charset=utf-8");
+ links.put("view", linkdef);
- linkdef = new BasicDBObject();
- linkdef.put("href", this.uriInfo.getAbsolutePathBuilder().path(obj.get("_id").toString()).build().toString());
- linkdef.put("method", "delete");
- links.put("delete", linkdef);
-
- obj.put("__links", links);
- res.add(obj);
- }
- }
- finally {
- cursor.close();
- }
- ObjectMapper mapper = new ObjectMapper();
- mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
- return mapper.writeValueAsString(res);
- }
+ linkdef = new BasicDBObject();
+ linkdef.put(
+ "href",
+ this.uriInfo.getAbsolutePathBuilder()
+ .path(obj.get("_id").toString()).build()
+ .toString());
+ linkdef.put("method", "put");
+ linkdef.put("consumes", MediaType.APPLICATION_JSON
+ + ";charset=utf-8");
+ links.put("update", linkdef);
+ linkdef = new BasicDBObject();
+ linkdef.put(
+ "href",
+ this.uriInfo.getAbsolutePathBuilder()
+ .path(obj.get("_id").toString()).build()
+ .toString());
+ linkdef.put("method", "delete");
+ links.put("delete", linkdef);
-
+ obj.put("__links", links);
+ res.add(obj);
+ }
+ } finally {
+ cursor.close();
+ }
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
+ return mapper.writeValueAsString(res);
+ }
+
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/main/java/org/iri_research/renkan/rest/RestApplication.java Wed Oct 16 17:32:51 2013 +0200
@@ -0,0 +1,14 @@
+package org.iri_research.renkan.rest;
+
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.server.spring.SpringLifecycleListener;
+import org.glassfish.jersey.server.spring.scope.RequestContextFilter;
+
+
+public class RestApplication extends ResourceConfig {
+ public RestApplication() {
+ this.packages("org.iri_research.renkan.rest");
+ this.register(SpringLifecycleListener.class);
+ this.register(RequestContextFilter.class);
+ }
+}
--- a/server/src/main/java/org/iri_research/renkan/rest/SpacesResource.java Sun Oct 06 14:12:02 2013 +0200
+++ b/server/src/main/java/org/iri_research/renkan/rest/SpacesResource.java Wed Oct 16 17:32:51 2013 +0200
@@ -1,11 +1,11 @@
package org.iri_research.renkan.rest;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
+import javax.inject.Singleton;
import javax.ws.rs.Path;
import org.iri_research.renkan.Constants;
@@ -17,48 +17,45 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import com.sun.jersey.spi.resource.Singleton;
-
@Singleton
@Path("spaces")
@Component
public class SpacesResource extends RenkanResource<Space, String> {
-
- @SuppressWarnings("unused")
- private Logger logger = LoggerFactory.getLogger(SpacesResource.class);
-
- private String[] spaceObjectListFieldList = {"created_by","bin_config","image"};
-
- @Autowired
- private SpacesRepository spacesRepository;
-
- @Override
- protected IRenkanRepository<Space, String> getRepository() {
- return spacesRepository;
- }
+
+ @SuppressWarnings("unused")
+ private Logger logger = LoggerFactory.getLogger(SpacesResource.class);
+
+ private String[] spaceObjectListFieldList = { "created_by", "bin_config",
+ "image" };
+ @Autowired
+ private SpacesRepository spacesRepository;
+
+ @Override
+ protected IRenkanRepository<Space, String> getRepository() {
+ return spacesRepository;
+ }
- @Override
- protected String getNewId() {
- return Constants.UUID_GENERATOR.generate().toString();
- }
-
+ @Override
+ protected String getNewId() {
+ return Constants.UUID_GENERATOR.generate().toString();
+ }
- @Override
- protected void prepareObject(Space obj) {
- if(obj.getCreated() == null) {
- obj.setCreated(new Date());
- }
- }
-
+ @Override
+ protected void prepareObject(Space obj) {
+ if (obj.getCreated() == null) {
+ obj.setCreated(new Date());
+ }
+ }
- @Override
- protected List<String> getObjectListFieldList() {
- ArrayList<String> fieldList = new ArrayList<>(this.baseObjectListFieldList.length + this.spaceObjectListFieldList.length);
- fieldList.addAll(Arrays.asList(this.baseObjectListFieldList));
- fieldList.addAll(Arrays.asList(this.spaceObjectListFieldList));
- return fieldList;
- }
-
+ @Override
+ protected List<String> getObjectListFieldList() {
+ ArrayList<String> fieldList = new ArrayList<>(
+ this.baseObjectListFieldList.length
+ + this.spaceObjectListFieldList.length);
+ fieldList.addAll(Arrays.asList(this.baseObjectListFieldList));
+ fieldList.addAll(Arrays.asList(this.spaceObjectListFieldList));
+ return fieldList;
+ }
}
--- a/server/src/main/webapp/WEB-INF/web.xml Sun Oct 06 14:12:02 2013 +0200
+++ b/server/src/main/webapp/WEB-INF/web.xml Wed Oct 16 17:32:51 2013 +0200
@@ -66,11 +66,11 @@
<url-pattern>/ocw_admin/*</url-pattern>
</servlet-mapping>
<servlet>
- <servlet-name>rest Servlet</servlet-name>
- <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
+ <servlet-name>restServlet</servlet-name>
+ <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
- <param-name>com.sun.jersey.config.property.packages</param-name>
- <param-value>org.iri_research.renkan.rest</param-value>
+ <param-name>javax.ws.rs.Application</param-name>
+ <param-value>org.iri_research.renkan.rest.RestApplication</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
@@ -79,7 +79,7 @@
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
- <servlet-name>rest Servlet</servlet-name>
+ <servlet-name>restServlet</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
<servlet>
--- a/server/src/test/java/org/iri_research/renkan/test/rest/ProjectRestTest.java Sun Oct 06 14:12:02 2013 +0200
+++ b/server/src/test/java/org/iri_research/renkan/test/rest/ProjectRestTest.java Wed Oct 16 17:32:51 2013 +0200
@@ -5,6 +5,13 @@
import java.util.List;
import java.util.UUID;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.Application;
+
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.server.spring.SpringLifecycleListener;
+import org.glassfish.jersey.server.spring.scope.RequestContextFilter;
+import org.glassfish.jersey.test.JerseyTest;
import org.iri_research.renkan.models.Edge;
import org.iri_research.renkan.models.Node;
import org.iri_research.renkan.models.Project;
@@ -26,146 +33,168 @@
import org.springframework.data.mongodb.core.geo.Point;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.web.context.ContextLoaderListener;
import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.DBObject;
-import com.sun.jersey.api.client.WebResource;
-import com.sun.jersey.spi.spring.container.servlet.SpringServlet;
-import com.sun.jersey.test.framework.AppDescriptor;
-import com.sun.jersey.test.framework.JerseyTest;
-import com.sun.jersey.test.framework.WebAppDescriptor;
+//import com.sun.jersey.spi.spring.container.servlet.SpringServlet;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("rest-context.xml")
public class ProjectRestTest extends JerseyTest {
-
- private Logger logger = LoggerFactory.getLogger(ProjectRestTest.class);
-
- @Autowired
- private ProjectsRepository projectsRepository;
-
- @Autowired
- private SpacesRepository spacesRepository;
-
- @Autowired
- private NodesRepository nodesRepository;
-
- @Autowired
- private EdgesRepository edgesRepository;
-
- @Autowired
- private ProjectRevisionsRepository projectRevisionsRepository;
-
- @Autowired
- private MongoTemplate mongoTemplate;
-
- private Project testProject;
- private List<Node> testNodes = new ArrayList<Node>();
- private List<Edge> testEdges = new ArrayList<>();
-
- private Date creationDate = new Date();
-
- private String spaceId = UUID.randomUUID().toString();
-
- public ProjectRestTest() {
- }
-
- @Override
- protected AppDescriptor configure() {
- return new WebAppDescriptor.Builder("org.iri_research.renkan.rest")
- .contextPath("rest")
- .contextParam("contextConfigLocation", "classpath:/org/iri_research/renkan/test/rest/rest-context.xml")
- .initParam("com.sun.jersey.config.property.packages", "org.iri_research.renkan.rest")
- .servletClass(SpringServlet.class)
- .contextListenerClass(ContextLoaderListener.class)
- .build();
- };
-
- @Before
- public void setup() {
+
+ private Logger logger = LoggerFactory.getLogger(ProjectRestTest.class);
+
+ @Autowired
+ private ProjectsRepository projectsRepository;
+
+ @Autowired
+ private SpacesRepository spacesRepository;
+
+ @Autowired
+ private NodesRepository nodesRepository;
+
+ @Autowired
+ private EdgesRepository edgesRepository;
+
+ @Autowired
+ private ProjectRevisionsRepository projectRevisionsRepository;
+
+ @Autowired
+ private MongoTemplate mongoTemplate;
+
+ private Project testProject;
+ private List<Node> testNodes = new ArrayList<Node>();
+ private List<Edge> testEdges = new ArrayList<>();
+
+ private Date creationDate = new Date();
+
+ private String spaceId = UUID.randomUUID().toString();
+
+ public ProjectRestTest() {
+ }
+
+ //@Override
+ // protected AppDescriptor configure() {
+ // return new WebAppDescriptor.Builder("org.iri_research.renkan.rest")
+ // .contextPath("rest")
+ // .contextParam("contextConfigLocation",
+ // "classpath:/org/iri_research/renkan/test/rest/rest-context.xml")
+ // .initParam("com.sun.jersey.config.property.packages",
+ // "org.iri_research.renkan.rest")
+ // .servletClass(SpringServlet.class)
+ // .contextListenerClass(ContextLoaderListener.class)
+ // .build();
+ // };
+
+ @Override
+ protected Application configure() {
+ ResourceConfig rc = new ResourceConfig()
+ .packages("org.iri_research.renkan.rest")
+ .register(SpringLifecycleListener.class)
+ .register(RequestContextFilter.class)
+ .property("contextConfigLocation",
+ "classpath:/org/iri_research/renkan/test/rest/rest-context.xml");
+ rc.setApplicationName("rest");
+ return rc;
+ };
+
+
+ @Before
+ public void setup() {
+
+ logger.debug("Setup");
+ Space testSpace = new Space(this.spaceId, "test space", "Test space",
+ null, null, null, "test_user", null, this.creationDate);
+ testSpace = spacesRepository.save(testSpace);
+ testProject = new Project(testSpace.getId(), UUID.randomUUID()
+ .toString(), "test", "desc",
+ "http://localhost:8080/rest/projects/id", this.creationDate);
- logger.debug("Setup");
- Space testSpace = new Space(this.spaceId, "test space", "Test space", null, null, null, "test_user", null, this.creationDate);
- testSpace = spacesRepository.save(testSpace);
- testProject = new Project(testSpace.getId(), UUID.randomUUID().toString(), "test", "desc", "http://localhost:8080/rest/projects/id", this.creationDate);
-
- for(int i=0;i<3;i++) {
- Node node = new Node("Node"+i, "Node"+i, "Node "+i, "http://renkan.org/nodes/node"+i, "#ffff0"+i, "test_user", new Point(0, i), "http://renkan.org/images/node"+i, i, testProject.getId());
- node = this.nodesRepository.save(node);
- testProject.getNodes().add(node);
- this.testNodes.add(node);
- }
-
- for(int i=0;i<3;i++) {
- Edge edge = new Edge("Node"+i, "Node"+i, "Node "+i, "http://renkan.org/edges/edge"+i, "#ffff0"+i, this.testNodes.get((i+2)%3), this.testNodes.get(i), "test_user", testProject.getId());
- edge = this.edgesRepository.save(edge);
- testProject.getEdges().add(edge);
- this.testEdges.add(edge);
- }
-
- this.projectsRepository.save(testProject);
+ for (int i = 0; i < 3; i++) {
+ Node node = new Node("Node" + i, "Node" + i, "Node " + i,
+ "http://renkan.org/nodes/node" + i, "#ffff0" + i,
+ "test_user", new Point(0, i),
+ "http://renkan.org/images/node" + i, i, testProject.getId());
+ node = this.nodesRepository.save(node);
+ testProject.getNodes().add(node);
+ this.testNodes.add(node);
+ }
+
+ for (int i = 0; i < 3; i++) {
+ Edge edge = new Edge("Node" + i, "Node" + i, "Node " + i,
+ "http://renkan.org/edges/edge" + i, "#ffff0" + i,
+ this.testNodes.get((i + 2) % 3), this.testNodes.get(i),
+ "test_user", testProject.getId());
+ edge = this.edgesRepository.save(edge);
+ testProject.getEdges().add(edge);
+ this.testEdges.add(edge);
+ }
- }
-
- @After
- public void teardown() {
- logger.debug("Teardown");
- edgesRepository.deleteAll();
- nodesRepository.deleteAll();
- projectRevisionsRepository.deleteAll();
- projectsRepository.deleteAll();
- spacesRepository.deleteAll();
- }
-
-
- @Test
- public void testDeleteProject() {
+ this.projectsRepository.save(testProject);
+
+ }
+
+ @After
+ public void teardown() {
+ logger.debug("Teardown");
+ edgesRepository.deleteAll();
+ nodesRepository.deleteAll();
+ projectRevisionsRepository.deleteAll();
+ projectsRepository.deleteAll();
+ spacesRepository.deleteAll();
+ }
+
+ @Test
+ public void testDeleteProject() {
+
+ List<Node> nodes = testProject.getNodes();
+ List<Edge> edges = testProject.getEdges();
- List<Node> nodes= testProject.getNodes();
- List<Edge> edges= testProject.getEdges();
-
- WebResource webResource = this.resource();
- String respString = webResource.path("projects").path(testProject.getId()).delete(String.class);
-
- Assert.assertTrue("Response text must contain deleted", respString.contains("deleted"));
- Assert.assertTrue("Response text must contain id", respString.contains(this.testProject.getId()));
-
- DBObject filter = new BasicDBObject();
- filter.put("_id", testProject.getId());
-
- DBCollection coll = mongoTemplate.getCollection(mongoTemplate.getCollectionName(Project.class));
- DBCursor resFind = coll.find(filter);
-
- Assert.assertEquals("The project must not be found", 0, resFind.count());
-
- filter = new BasicDBObject();
- filter.put("project_id", testProject.getId());
-
- DBCollection nodesColl = mongoTemplate.getCollection(mongoTemplate.getCollectionName(Node.class));
- resFind = nodesColl.find(filter);
-
- Assert.assertEquals("no nodes left", 0, resFind.count());
-
- for(Node n: nodes) {
- DBObject nobj = nodesColl.findOne(n.getId());
- Assert.assertNull("node should be deleted", nobj);
- }
+ WebTarget webResource = this.target();
+ String respString = webResource.path("projects")
+ .path(testProject.getId()).request().delete(String.class);
+
+ Assert.assertTrue("Response text must contain deleted",
+ respString.contains("deleted"));
+ Assert.assertTrue("Response text must contain id",
+ respString.contains(this.testProject.getId()));
+
+ DBObject filter = new BasicDBObject();
+ filter.put("_id", testProject.getId());
+
+ DBCollection coll = mongoTemplate.getCollection(mongoTemplate
+ .getCollectionName(Project.class));
+ DBCursor resFind = coll.find(filter);
+
+ Assert.assertEquals("The project must not be found", 0, resFind.count());
+
+ filter = new BasicDBObject();
+ filter.put("project_id", testProject.getId());
-
- DBCollection edgesColl = mongoTemplate.getCollection(mongoTemplate.getCollectionName(Edge.class));
- resFind = edgesColl.find(filter);
-
- Assert.assertEquals("no edges left", 0, resFind.count());
-
- for(Edge e: edges) {
- DBObject eobj = edgesColl.findOne(e.getId());
- Assert.assertNull("edge should be deleted", eobj);
- }
-
- }
+ DBCollection nodesColl = mongoTemplate.getCollection(mongoTemplate
+ .getCollectionName(Node.class));
+ resFind = nodesColl.find(filter);
+
+ Assert.assertEquals("no nodes left", 0, resFind.count());
+
+ for (Node n : nodes) {
+ DBObject nobj = nodesColl.findOne(n.getId());
+ Assert.assertNull("node should be deleted", nobj);
+ }
+ DBCollection edgesColl = mongoTemplate.getCollection(mongoTemplate
+ .getCollectionName(Edge.class));
+ resFind = edgesColl.find(filter);
+
+ Assert.assertEquals("no edges left", 0, resFind.count());
+
+ for (Edge e : edges) {
+ DBObject eobj = edgesColl.findOne(e.getId());
+ Assert.assertNull("edge should be deleted", eobj);
+ }
+
+ }
}
--- a/server/src/test/java/org/iri_research/renkan/test/rest/SpaceRestTest.java Sun Oct 06 14:12:02 2013 +0200
+++ b/server/src/test/java/org/iri_research/renkan/test/rest/SpaceRestTest.java Wed Oct 16 17:32:51 2013 +0200
@@ -7,13 +7,23 @@
import java.util.Map;
import java.util.UUID;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.Application;
import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import junit.framework.Assert;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.server.model.Resource;
+import org.glassfish.jersey.server.spring.SpringLifecycleListener;
+import org.glassfish.jersey.server.spring.scope.RequestContextFilter;
+import org.glassfish.jersey.test.JerseyTest;
import org.iri_research.renkan.models.Space;
import org.iri_research.renkan.repositories.SpacesRepository;
+import org.iri_research.renkan.rest.SpacesResource;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.ISODateTimeFormat;
@@ -26,762 +36,853 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.web.context.ContextLoaderListener;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.sun.jersey.api.client.ClientHandlerException;
-import com.sun.jersey.api.client.ClientResponse;
-import com.sun.jersey.api.client.UniformInterfaceException;
-import com.sun.jersey.api.client.WebResource;
-import com.sun.jersey.spi.spring.container.servlet.SpringServlet;
-import com.sun.jersey.test.framework.AppDescriptor;
-import com.sun.jersey.test.framework.JerseyTest;
-import com.sun.jersey.test.framework.WebAppDescriptor;
+
+
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("rest-context.xml")
public class SpaceRestTest extends JerseyTest {
-
- private Logger logger = LoggerFactory.getLogger(SpaceRestTest.class);
-
- @Autowired
- private SpacesRepository spacesRepository;
-
- private Map<String,Space> spacesList = new HashMap<String, Space>();
- private String firstSpaceUUID = null;
-
+
+ private Logger logger = LoggerFactory.getLogger(SpaceRestTest.class);
+
+ @Autowired
+ private SpacesRepository spacesRepository;
+
+ private Map<String, Space> spacesList = new HashMap<String, Space>();
+ private String firstSpaceUUID = null;
+
+ public SpaceRestTest() {
+ }
+
+ // @Override
+ // protected AppDescriptor configure() {
+ // return new WebAppDescriptor.Builder("org.iri_research.renkan.rest")
+ // .contextPath("rest")
+ // .contextParam("contextConfigLocation",
+ // "classpath:/org/iri_research/renkan/test/rest/rest-context.xml")
+ // .initParam("com.sun.jersey.config.property.packages",
+ // "org.iri_research.renkan.rest")
+ // .servletClass(SpringServlet.class)
+ // .contextListenerClass(ContextLoaderListener.class)
+ // .build();
+ // };
+
+ @Override
+ protected Application configure() {
+ ResourceConfig rc = new ResourceConfig()
+ .packages("org.iri_research.renkan.rest")
+ .register(SpringLifecycleListener.class)
+ .register(RequestContextFilter.class)
+ .property("contextConfigLocation",
+ "classpath:/org/iri_research/renkan/test/rest/rest-context.xml");
+ rc.setApplicationName("rest");
+ return rc;
+ };
+
+ @Before
+ public void setup() {
- public SpaceRestTest() {
- }
-
- @Override
- protected AppDescriptor configure() {
- return new WebAppDescriptor.Builder("org.iri_research.renkan.rest")
- .contextPath("rest")
- .contextParam("contextConfigLocation", "classpath:/org/iri_research/renkan/test/rest/rest-context.xml")
- .initParam("com.sun.jersey.config.property.packages", "org.iri_research.renkan.rest")
- .servletClass(SpringServlet.class)
- .contextListenerClass(ContextLoaderListener.class)
- .build();
- };
-
- @Before
- public void setup() {
-
- logger.debug("Setup");
- spacesRepository.deleteAll();
- Date creationDate = new Date();
- this.firstSpaceUUID = UUID.randomUUID().toString();
- Space testSpace = new Space(firstSpaceUUID, "test", "Test space", "{}", "http://ldt.iri.centrepompidou.fr", "#ababab", "test_user", "http://ldt.iri.centrepompidou.fr", creationDate);
- testSpace = spacesRepository.save(testSpace);
- this.spacesList.put(firstSpaceUUID, testSpace);
- }
-
- @After
- public void teardown() {
- spacesRepository.deleteAll();
- }
+ logger.debug("Setup");
+ spacesRepository.deleteAll();
+ Date creationDate = new Date();
+ this.firstSpaceUUID = UUID.randomUUID().toString();
+ Space testSpace = new Space(firstSpaceUUID, "test", "Test space", "{}",
+ "http://ldt.iri.centrepompidou.fr", "#ababab", "test_user",
+ "http://ldt.iri.centrepompidou.fr", creationDate);
+ testSpace = spacesRepository.save(testSpace);
+ this.spacesList.put(firstSpaceUUID, testSpace);
+
+ Resource resource = Resource.builder(SpacesResource.class).build();
+ String baseUri = resource.getPath();
+ logger.debug("Path is " + baseUri);
+ for (Resource cres : resource.getChildResources()) {
+ logger.debug(cres.getAllMethods().toString() + " at " + baseUri + "/" + cres.getPath());
+ }
+
+ }
+
+ @After
+ public void teardown() {
+ spacesRepository.deleteAll();
+ }
+
+ @Test
+ public void testSetup() throws JsonProcessingException, IOException {
+
+ WebTarget webTarget = this.target("spaces");
+ String respString = webTarget.request().get(String.class);
-
- @Test
- public void testSetup() throws JsonProcessingException, IOException {
+ Assert.assertNotNull(
+ "The response string for the list of spaces must not be null",
+ respString);
+
+ logger.debug("RESPONSE : " + respString);
+
+ Assert.assertTrue(
+ "The length of the space list resp. string must be > 0",
+ respString.length() > 0);
+
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode spacesList = mapper.readTree(respString);
+
+ Assert.assertTrue("The spaceList must be an array",
+ spacesList.isArray());
+ Assert.assertEquals(
+ "The spaceList length must be = " + this.spacesList.size(),
+ this.spacesList.size(), spacesList.size());
+
+ for (JsonNode jsonNode : spacesList) {
+ Assert.assertTrue("the space must have an id",
+ jsonNode.hasNonNull("id"));
+ String id = jsonNode.get("id").asText();
+ Assert.assertTrue("The id must be in the spacesList",
+ this.spacesList.containsKey(id));
+ Space space = this.spacesList.get(id);
+ Assert.assertNotNull(
+ "The object must in the spacesList must not be null", space);
+
+ }
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").get(String.class);
-
- Assert.assertNotNull("The response string for the list of spaces must not be null", respString);
-
- logger.debug("RESPONSE : " + respString);
-
- Assert.assertTrue("The length of the space list resp. string must be > 0", respString.length() > 0);
-
-
- ObjectMapper mapper = new ObjectMapper();
- JsonNode spacesList = mapper.readTree(respString);
-
- Assert.assertTrue("The spaceList must be an array", spacesList.isArray());
- Assert.assertEquals("The spaceList length must be = " + this.spacesList.size(), this.spacesList.size(), spacesList.size());
-
- for (JsonNode jsonNode : spacesList) {
- Assert.assertTrue("the space must have an id", jsonNode.hasNonNull("id"));
- String id = jsonNode.get("id").asText();
- Assert.assertTrue("The id must be in the spacesList", this.spacesList.containsKey(id));
- Space space = this.spacesList.get(id);
- Assert.assertNotNull("The object must in the spacesList must not be null", space);
-
- }
-
- }
-
- @Test
- public void testTitle() throws JsonProcessingException, IOException {
-
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode spacesList = mapper.readTree(respString);
-
- for (JsonNode jsonNode : spacesList) {
- String id = jsonNode.get("_id").asText();
- Space space = this.spacesList.get(id);
-
- Assert.assertTrue("the space must have a title", jsonNode.hasNonNull("title"));
- String title = jsonNode.get("title").asText();
- Assert.assertEquals("space title must be equals to " + space.getTitle(), space.getTitle(), title);
- }
+ }
+
+ @Test
+ public void testTitle() throws JsonProcessingException, IOException {
+
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces").request().get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode spacesList = mapper.readTree(respString);
+
+ for (JsonNode jsonNode : spacesList) {
+ String id = jsonNode.get("_id").asText();
+ Space space = this.spacesList.get(id);
+
+ Assert.assertTrue("the space must have a title",
+ jsonNode.hasNonNull("title"));
+ String title = jsonNode.get("title").asText();
+ Assert.assertEquals(
+ "space title must be equals to " + space.getTitle(),
+ space.getTitle(), title);
+ }
+
+ }
- }
+ @Test
+ public void testDescription() throws JsonProcessingException, IOException {
+
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces").request().get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode spacesList = mapper.readTree(respString);
+
+ for (JsonNode jsonNode : spacesList) {
+ String id = jsonNode.get("id").asText();
+ Space space = this.spacesList.get(id);
+
+ Assert.assertTrue("the space must have a description",
+ jsonNode.hasNonNull("description"));
+ String description = jsonNode.get("description").asText();
+ Assert.assertEquals(
+ "space description must be equals to "
+ + space.getDescription(), space.getDescription(),
+ description);
+ }
+
+ }
+
+ @Test
+ public void testUri() throws JsonProcessingException, IOException {
- @Test
- public void testDescription() throws JsonProcessingException, IOException {
-
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode spacesList = mapper.readTree(respString);
-
- for (JsonNode jsonNode : spacesList) {
- String id = jsonNode.get("id").asText();
- Space space = this.spacesList.get(id);
-
- Assert.assertTrue("the space must have a description", jsonNode.hasNonNull("description"));
- String description = jsonNode.get("description").asText();
- Assert.assertEquals("space description must be equals to " + space.getDescription(), space.getDescription(), description);
- }
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces").request().get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode spacesList = mapper.readTree(respString);
+
+ for (JsonNode jsonNode : spacesList) {
+ String id = jsonNode.get("id").asText();
+ Space space = this.spacesList.get(id);
- }
+ Assert.assertTrue("the space must have a uri",
+ jsonNode.hasNonNull("uri"));
+ String uri = jsonNode.get("uri").asText();
+ Assert.assertEquals(
+ "space uri must be equals to " + space.getUri(),
+ space.getUri(), uri);
+ }
+
+ }
+
+ @Test
+ public void testColor() throws JsonProcessingException, IOException {
- @Test
- public void testUri() throws JsonProcessingException, IOException {
-
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode spacesList = mapper.readTree(respString);
-
- for (JsonNode jsonNode : spacesList) {
- String id = jsonNode.get("id").asText();
- Space space = this.spacesList.get(id);
-
- Assert.assertTrue("the space must have a uri", jsonNode.hasNonNull("uri"));
- String uri = jsonNode.get("uri").asText();
- Assert.assertEquals("space uri must be equals to " + space.getUri(), space.getUri(), uri);
- }
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces").request().get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode spacesList = mapper.readTree(respString);
- }
+ for (JsonNode jsonNode : spacesList) {
+ String id = jsonNode.get("id").asText();
+ Space space = this.spacesList.get(id);
- @Test
- public void testColor() throws JsonProcessingException, IOException {
-
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode spacesList = mapper.readTree(respString);
-
- for (JsonNode jsonNode : spacesList) {
- String id = jsonNode.get("id").asText();
- Space space = this.spacesList.get(id);
-
- Assert.assertTrue("the space must have a color", jsonNode.hasNonNull("color"));
- String color = jsonNode.get("color").asText();
- Assert.assertEquals("space color must be equals to " + space.getColor(), space.getColor(), color);
- }
+ Assert.assertTrue("the space must have a color",
+ jsonNode.hasNonNull("color"));
+ String color = jsonNode.get("color").asText();
+ Assert.assertEquals(
+ "space color must be equals to " + space.getColor(),
+ space.getColor(), color);
+ }
- }
+ }
+
+ @Test
+ public void testBinConfig() throws JsonProcessingException, IOException {
+
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces").request().get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode spacesList = mapper.readTree(respString);
-
-
- @Test
- public void testBinConfig() throws JsonProcessingException, IOException {
-
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode spacesList = mapper.readTree(respString);
-
- for (JsonNode jsonNode : spacesList) {
- String id = jsonNode.get("id").asText();
- Space space = this.spacesList.get(id);
-
- Assert.assertTrue("the space must have a bin_config", jsonNode.hasNonNull("bin_config"));
- String binConfig = jsonNode.get("bin_config").asText();
- Assert.assertEquals("space bin_config must be equals to " + space.getBinConfig(), space.getBinConfig(), binConfig);
- }
+ for (JsonNode jsonNode : spacesList) {
+ String id = jsonNode.get("id").asText();
+ Space space = this.spacesList.get(id);
+
+ Assert.assertTrue("the space must have a bin_config",
+ jsonNode.hasNonNull("bin_config"));
+ String binConfig = jsonNode.get("bin_config").asText();
+ Assert.assertEquals(
+ "space bin_config must be equals to "
+ + space.getBinConfig(), space.getBinConfig(),
+ binConfig);
+ }
+
+ }
+
+ @Test
+ public void testCreatedBy() throws JsonProcessingException, IOException {
+
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces").request().get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode spacesList = mapper.readTree(respString);
+
+ for (JsonNode jsonNode : spacesList) {
+ String id = jsonNode.get("id").asText();
+ Space space = this.spacesList.get(id);
+
+ Assert.assertTrue("the space must have a created_by",
+ jsonNode.hasNonNull("created_by"));
+ String createdBy = jsonNode.get("created_by").asText();
+ Assert.assertEquals(
+ "space created_by must be equals to "
+ + space.getCreatedBy(), space.getCreatedBy(),
+ createdBy);
+ }
+
+ }
+
+ @Test
+ public void testCreated() throws JsonProcessingException, IOException {
+
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces").request().get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode spacesList = mapper.readTree(respString);
+
+ for (JsonNode jsonNode : spacesList) {
+ String id = jsonNode.get("id").asText();
+ Space space = this.spacesList.get(id);
- }
-
- @Test
- public void testCreatedBy() throws JsonProcessingException, IOException {
-
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode spacesList = mapper.readTree(respString);
-
- for (JsonNode jsonNode : spacesList) {
- String id = jsonNode.get("id").asText();
- Space space = this.spacesList.get(id);
-
- Assert.assertTrue("the space must have a created_by", jsonNode.hasNonNull("created_by"));
- String createdBy = jsonNode.get("created_by").asText();
- Assert.assertEquals("space created_by must be equals to " + space.getCreatedBy(), space.getCreatedBy(), createdBy);
- }
+ Assert.assertTrue("the space must have a created",
+ jsonNode.hasNonNull("created"));
+
+ String dateStr = jsonNode.get("created").asText();
+
+ DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
+ DateTime date = fmt.parseDateTime(dateStr);
+
+ Assert.assertEquals("Created date must be the same",
+ space.getCreated(), date.toDate());
+
+ }
+
+ }
+
+ @Test
+ public void testImage() throws JsonProcessingException, IOException {
+
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces").request().get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode spacesList = mapper.readTree(respString);
- }
-
-
- @Test
- public void testCreated() throws JsonProcessingException, IOException {
-
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode spacesList = mapper.readTree(respString);
-
- for (JsonNode jsonNode : spacesList) {
- String id = jsonNode.get("id").asText();
- Space space = this.spacesList.get(id);
-
- Assert.assertTrue("the space must have a created", jsonNode.hasNonNull("created"));
-
- String dateStr = jsonNode.get("created").asText();
-
- DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
- DateTime date = fmt.parseDateTime(dateStr);
-
- Assert.assertEquals("Created date must be the same", space.getCreated(), date.toDate());
-
- }
+ for (JsonNode jsonNode : spacesList) {
+ String id = jsonNode.get("id").asText();
+ Space space = this.spacesList.get(id);
+
+ Assert.assertTrue("the space must have a image",
+ jsonNode.hasNonNull("image"));
+ String image = jsonNode.get("image").asText();
+ Assert.assertEquals(
+ "space image must be equals to " + space.getImage(),
+ space.getImage(), image);
+ }
+
+ }
+
+ @Test
+ public void testSingleCreated() throws JsonProcessingException, IOException {
+
+ Space space = this.spacesList.get(this.firstSpaceUUID);
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces")
+ .path(this.firstSpaceUUID).request().accept(MediaType.APPLICATION_JSON)
+ .get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode jsonNode = mapper.readTree(respString);
+
+ String id = jsonNode.get("id").asText();
+ Assert.assertEquals("id must be equals", space.getId(), id);
- }
-
- @Test
- public void testImage() throws JsonProcessingException, IOException {
-
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode spacesList = mapper.readTree(respString);
-
- for (JsonNode jsonNode : spacesList) {
- String id = jsonNode.get("id").asText();
- Space space = this.spacesList.get(id);
-
- Assert.assertTrue("the space must have a image", jsonNode.hasNonNull("image"));
- String image = jsonNode.get("image").asText();
- Assert.assertEquals("space image must be equals to " + space.getImage(), space.getImage(), image);
- }
+ Assert.assertTrue("the space must have a created",
+ jsonNode.hasNonNull("created"));
+
+ String dateStr = jsonNode.get("created").asText();
+
+ DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
+ DateTime date = fmt.parseDateTime(dateStr);
+
+ Assert.assertEquals("Created date must be the same",
+ space.getCreated(), date.toDate());
+
+ }
+
+ @Test
+ public void testSingleTitle() throws JsonProcessingException, IOException {
- }
-
- @Test
- public void testSingleCreated() throws JsonProcessingException, IOException {
-
- Space space = this.spacesList.get(this.firstSpaceUUID);
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").path(this.firstSpaceUUID).accept(MediaType.APPLICATION_JSON).get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode jsonNode = mapper.readTree(respString);
-
- String id = jsonNode.get("id").asText();
- Assert.assertEquals("id must be equals", space.getId(), id);
-
- Assert.assertTrue("the space must have a created", jsonNode.hasNonNull("created"));
-
- String dateStr = jsonNode.get("created").asText();
-
- DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
- DateTime date = fmt.parseDateTime(dateStr);
-
- Assert.assertEquals("Created date must be the same", space.getCreated(), date.toDate());
+ Space space = this.spacesList.get(this.firstSpaceUUID);
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces")
+ .path(this.firstSpaceUUID).request().accept(MediaType.APPLICATION_JSON)
+ .get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode jsonNode = mapper.readTree(respString);
+
+ Assert.assertTrue("the space must have a title",
+ jsonNode.hasNonNull("title"));
+ String title = jsonNode.get("title").asText();
+ Assert.assertEquals(
+ "space title must be equals to " + space.getTitle(),
+ space.getTitle(), title);
+ }
+
+ @Test
+ public void testSingleDescription() throws JsonProcessingException,
+ IOException {
+
+ Space space = this.spacesList.get(this.firstSpaceUUID);
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces")
+ .path(this.firstSpaceUUID).request().accept(MediaType.APPLICATION_JSON)
+ .get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode jsonNode = mapper.readTree(respString);
- }
-
- @Test
- public void testSingleTitle() throws JsonProcessingException, IOException {
-
- Space space = this.spacesList.get(this.firstSpaceUUID);
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").path(this.firstSpaceUUID).accept(MediaType.APPLICATION_JSON).get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode jsonNode = mapper.readTree(respString);
-
- Assert.assertTrue("the space must have a title", jsonNode.hasNonNull("title"));
- String title = jsonNode.get("title").asText();
- Assert.assertEquals("space title must be equals to " + space.getTitle(), space.getTitle(), title);
- }
+ Assert.assertTrue("the space must have a description",
+ jsonNode.hasNonNull("description"));
+ String description = jsonNode.get("description").asText();
+ Assert.assertEquals(
+ "space description must be equals to " + space.getDescription(),
+ space.getDescription(), description);
+ }
+
+ @Test
+ public void testSingleUri() throws JsonProcessingException, IOException {
+
+ Space space = this.spacesList.get(this.firstSpaceUUID);
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces")
+ .path(this.firstSpaceUUID).request().accept(MediaType.APPLICATION_JSON)
+ .get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode jsonNode = mapper.readTree(respString);
+
+ Assert.assertTrue("the space must have a uri",
+ jsonNode.hasNonNull("uri"));
+ String uri = jsonNode.get("uri").asText();
+ Assert.assertEquals("space uri must be equals to " + space.getUri(),
+ space.getUri(), uri);
+ }
+
+ @Test
+ public void testSingleColor() throws JsonProcessingException, IOException {
- @Test
- public void testSingleDescription() throws JsonProcessingException, IOException {
-
- Space space = this.spacesList.get(this.firstSpaceUUID);
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").path(this.firstSpaceUUID).accept(MediaType.APPLICATION_JSON).get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode jsonNode = mapper.readTree(respString);
-
- Assert.assertTrue("the space must have a description", jsonNode.hasNonNull("description"));
- String description = jsonNode.get("description").asText();
- Assert.assertEquals("space description must be equals to " + space.getDescription(), space.getDescription(), description);
- }
+ Space space = this.spacesList.get(this.firstSpaceUUID);
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces")
+ .path(this.firstSpaceUUID).request().accept(MediaType.APPLICATION_JSON)
+ .get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode jsonNode = mapper.readTree(respString);
- @Test
- public void testSingleUri() throws JsonProcessingException, IOException {
-
- Space space = this.spacesList.get(this.firstSpaceUUID);
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").path(this.firstSpaceUUID).accept(MediaType.APPLICATION_JSON).get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode jsonNode = mapper.readTree(respString);
-
- Assert.assertTrue("the space must have a uri", jsonNode.hasNonNull("uri"));
- String uri = jsonNode.get("uri").asText();
- Assert.assertEquals("space uri must be equals to " + space.getUri(), space.getUri(), uri);
- }
+ Assert.assertTrue("the space must have a color",
+ jsonNode.hasNonNull("color"));
+ String color = jsonNode.get("color").asText();
+ Assert.assertEquals(
+ "space color must be equals to " + space.getColor(),
+ space.getColor(), color);
+ }
- @Test
- public void testSingleColor() throws JsonProcessingException, IOException {
-
- Space space = this.spacesList.get(this.firstSpaceUUID);
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").path(this.firstSpaceUUID).accept(MediaType.APPLICATION_JSON).get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode jsonNode = mapper.readTree(respString);
-
- Assert.assertTrue("the space must have a color", jsonNode.hasNonNull("color"));
- String color = jsonNode.get("color").asText();
- Assert.assertEquals("space color must be equals to " + space.getColor(), space.getColor(), color);
- }
+ @Test
+ public void testSingleBinConfig() throws JsonProcessingException,
+ IOException {
+
+ Space space = this.spacesList.get(this.firstSpaceUUID);
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces")
+ .path(this.firstSpaceUUID).request().accept(MediaType.APPLICATION_JSON)
+ .get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode jsonNode = mapper.readTree(respString);
-
-
- @Test
- public void testSingleBinConfig() throws JsonProcessingException, IOException {
-
- Space space = this.spacesList.get(this.firstSpaceUUID);
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").path(this.firstSpaceUUID).accept(MediaType.APPLICATION_JSON).get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode jsonNode = mapper.readTree(respString);
-
- Assert.assertTrue("the space must have a bin_config", jsonNode.hasNonNull("bin_config"));
- String binConfig = jsonNode.get("bin_config").asText();
- Assert.assertEquals("space bin_config must be equals to " + space.getBinConfig(), space.getBinConfig(), binConfig);
- }
-
- @Test
- public void testSingleCreatedBy() throws JsonProcessingException, IOException {
-
- Space space = this.spacesList.get(this.firstSpaceUUID);
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").path(this.firstSpaceUUID).accept(MediaType.APPLICATION_JSON).get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode jsonNode = mapper.readTree(respString);
-
- Assert.assertTrue("the space must have a created_by", jsonNode.hasNonNull("created_by"));
- String createdBy = jsonNode.get("created_by").asText();
- Assert.assertEquals("space created_by must be equals to " + space.getCreatedBy(), space.getCreatedBy(), createdBy);
- }
-
-
- @Test
- public void testSingleImage() throws JsonProcessingException, IOException {
-
- Space space = this.spacesList.get(this.firstSpaceUUID);
- WebResource webResource = this.resource();
- String respString = webResource.path("spaces").path(this.firstSpaceUUID).accept(MediaType.APPLICATION_JSON).get(String.class);
- logger.debug("RESPONSE : " + respString);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode jsonNode = mapper.readTree(respString);
-
- Assert.assertTrue("the space must have a image", jsonNode.hasNonNull("image"));
- String image = jsonNode.get("image").asText();
- Assert.assertEquals("space image must be equals to " + space.getImage(), space.getImage(), image);
- }
-
-
- @Test
- public void testPost() throws JsonProcessingException, ClientHandlerException, UniformInterfaceException, IOException {
-
- String title = "test_post";
- String description = "test space post";
- String uri = "http://ldt.iri.centrepompidou.fr/test_post";
- String color = "#bcbcbc";
- String image = "http://ldt.iri.centrepompidou.fr/test_post/image";
- String created = "2013-01-01T01:01:01.001+0000";
- String bin_config = "{name: 'test_post_config'}";
- String created_by = "test_user_post";
-
- String spaceJson = String.format("{" +
- "\"title\":\"%s\"," +
- "\"description\":\"%s\"," +
- "\"uri\":\"%s\"," +
- "\"color\":\"%s\"," +
- "\"image\":\"%s\"," +
- "\"created\":\"%s\"," +
- "\"bin_config\":\"%s\"," +
- "\"created_by\":\"%s\"" +
- "}",
- title,
- description,
- uri,
- color,
- image,
- created,
- bin_config,
- created_by);
-
- WebResource webResource = this.resource();
- ClientResponse resp = webResource.path("spaces").type(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).entity(spaceJson).post(ClientResponse.class);
-
- String respStr = resp.getEntity(String.class);
-
- Assert.assertEquals("Resp status = created : " + respStr, Status.CREATED.getStatusCode(), resp.getStatus());
- Assert.assertTrue("Resp must be application/json", resp.getType().isCompatible(MediaType.APPLICATION_JSON_TYPE));
-
- ObjectMapper mapper = new ObjectMapper();
- JsonNode objNode = mapper.readTree(respStr);
+ Assert.assertTrue("the space must have a bin_config",
+ jsonNode.hasNonNull("bin_config"));
+ String binConfig = jsonNode.get("bin_config").asText();
+ Assert.assertEquals(
+ "space bin_config must be equals to " + space.getBinConfig(),
+ space.getBinConfig(), binConfig);
+ }
+
+ @Test
+ public void testSingleCreatedBy() throws JsonProcessingException,
+ IOException {
+
+ Space space = this.spacesList.get(this.firstSpaceUUID);
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces")
+ .path(this.firstSpaceUUID).request().accept(MediaType.APPLICATION_JSON)
+ .get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode jsonNode = mapper.readTree(respString);
+
+ Assert.assertTrue("the space must have a created_by",
+ jsonNode.hasNonNull("created_by"));
+ String createdBy = jsonNode.get("created_by").asText();
+ Assert.assertEquals(
+ "space created_by must be equals to " + space.getCreatedBy(),
+ space.getCreatedBy(), createdBy);
+ }
+
+ @Test
+ public void testSingleImage() throws JsonProcessingException, IOException {
+
+ Space space = this.spacesList.get(this.firstSpaceUUID);
+ WebTarget WebTarget = this.target();
+ String respString = WebTarget.path("spaces")
+ .path(this.firstSpaceUUID).request().accept(MediaType.APPLICATION_JSON)
+ .get(String.class);
+ logger.debug("RESPONSE : " + respString);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode jsonNode = mapper.readTree(respString);
+
+ Assert.assertTrue("the space must have a image",
+ jsonNode.hasNonNull("image"));
+ String image = jsonNode.get("image").asText();
+ Assert.assertEquals(
+ "space image must be equals to " + space.getImage(),
+ space.getImage(), image);
+ }
+
+ @Test
+ public void testPost() throws JsonProcessingException, IOException {
+
+ String title = "test_post";
+ String description = "test space post";
+ String uri = "http://ldt.iri.centrepompidou.fr/test_post";
+ String color = "#bcbcbc";
+ String image = "http://ldt.iri.centrepompidou.fr/test_post/image";
+ String created = "2013-01-01T01:01:01.001+0000";
+ String bin_config = "{name: 'test_post_config'}";
+ String created_by = "test_user_post";
+
+ String spaceJson = String.format("{" + "\"title\":\"%s\","
+ + "\"description\":\"%s\"," + "\"uri\":\"%s\","
+ + "\"color\":\"%s\"," + "\"image\":\"%s\","
+ + "\"created\":\"%s\"," + "\"bin_config\":\"%s\","
+ + "\"created_by\":\"%s\"" + "}", title, description, uri,
+ color, image, created, bin_config, created_by);
+
+ WebTarget webTarget = this.target();
+ Response resp = webTarget.path("spaces").request()
+ .accept(MediaType.APPLICATION_JSON)
+ .post(Entity.entity(spaceJson, MediaType.APPLICATION_JSON));
+
+ String respStr = resp.readEntity(String.class);
+
+ Assert.assertEquals("Resp status = created : " + respStr,
+ Status.CREATED.getStatusCode(), resp.getStatus());
+ Assert.assertTrue("Resp must be application/json", resp.getMediaType()
+ .isCompatible(MediaType.APPLICATION_JSON_TYPE));
+
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode objNode = mapper.readTree(respStr);
+
+ Assert.assertTrue("the space must have an id", objNode.hasNonNull("id"));
+ String idStr = objNode.get("id").asText();
+ Assert.assertFalse("The id str must not be empty", idStr.length() == 0);
+
+ Assert.assertTrue("the space must have a title",
+ objNode.hasNonNull("title"));
+ String titleStr = objNode.get("title").asText();
+ Assert.assertEquals("space title must be equals to " + title, title,
+ titleStr);
+
+ Assert.assertTrue("the space must have a description",
+ objNode.hasNonNull("description"));
+ String descriptionStr = objNode.get("description").asText();
+ Assert.assertEquals("space description must be equals to "
+ + description, description, descriptionStr);
+
+ Assert.assertTrue("the space must have a uri",
+ objNode.hasNonNull("uri"));
+ String uriStr = objNode.get("uri").asText();
+ Assert.assertEquals("space uri must be equals to " + uri, uri, uriStr);
- Assert.assertTrue("the space must have an id", objNode.hasNonNull("id"));
- String idStr = objNode.get("id").asText();
- Assert.assertFalse("The id str must not be empty", idStr.length()==0);
-
- Assert.assertTrue("the space must have a title", objNode.hasNonNull("title"));
- String titleStr = objNode.get("title").asText();
- Assert.assertEquals("space title must be equals to " + title, title, titleStr);
+ Assert.assertTrue("the space must have a color",
+ objNode.hasNonNull("color"));
+ String colorStr = objNode.get("color").asText();
+ Assert.assertEquals("space color must be equals to " + color, color,
+ colorStr);
+
+ Assert.assertTrue("the space must have a bin_config",
+ objNode.hasNonNull("bin_config"));
+ String bin_configStr = objNode.get("bin_config").asText();
+ Assert.assertEquals("space bin_config must be equals to " + bin_config,
+ bin_config, bin_configStr);
- Assert.assertTrue("the space must have a description", objNode.hasNonNull("description"));
- String descriptionStr = objNode.get("description").asText();
- Assert.assertEquals("space description must be equals to " + description, description, descriptionStr);
+ Assert.assertTrue("the space must have a created_by",
+ objNode.hasNonNull("created_by"));
+ String created_byStr = objNode.get("created_by").asText();
+ Assert.assertEquals("space created_by must be equals to " + created_by,
+ created_by, created_byStr);
+
+ Assert.assertTrue("the space must have a created",
+ objNode.hasNonNull("created"));
+ String createdStr = objNode.get("created").asText();
+ Assert.assertEquals("space created must be equals to " + created,
+ created, createdStr);
- Assert.assertTrue("the space must have a uri", objNode.hasNonNull("uri"));
- String uriStr = objNode.get("uri").asText();
- Assert.assertEquals("space uri must be equals to " + uri, uri, uriStr);
+ // object must be created
+ Space sp = this.spacesRepository.findOne(idStr);
+
+ Assert.assertNotNull("Space object must be in rep", sp);
- Assert.assertTrue("the space must have a color", objNode.hasNonNull("color"));
- String colorStr = objNode.get("color").asText();
- Assert.assertEquals("space color must be equals to " + color, color, colorStr);
+ Assert.assertEquals("space title must be equals to " + title, title,
+ sp.getTitle());
+ Assert.assertEquals("space description must be equals to "
+ + description, description, sp.getDescription());
+ Assert.assertEquals("space uri must be equals to " + uri, uri,
+ sp.getUri());
+ Assert.assertEquals("space color must be equals to " + color, color,
+ sp.getColor());
+ Assert.assertEquals("space bin_config must be equals to " + bin_config,
+ bin_config, sp.getBinConfig());
+ Assert.assertEquals("space created_by must be equals to " + created_by,
+ created_by, sp.getCreatedBy());
+ DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
+ DateTime created_date = fmt.parseDateTime(created);
+ Assert.assertEquals("space created must be equals to " + created,
+ created_date.toDate(), sp.getCreated());
- Assert.assertTrue("the space must have a bin_config", objNode.hasNonNull("bin_config"));
- String bin_configStr = objNode.get("bin_config").asText();
- Assert.assertEquals("space bin_config must be equals to " + bin_config, bin_config, bin_configStr);
+ }
+
+ @Test
+ public void testPostWithId() {
- Assert.assertTrue("the space must have a created_by", objNode.hasNonNull("created_by"));
- String created_byStr = objNode.get("created_by").asText();
- Assert.assertEquals("space created_by must be equals to " + created_by, created_by, created_byStr);
-
- Assert.assertTrue("the space must have a created", objNode.hasNonNull("created"));
- String createdStr = objNode.get("created").asText();
- Assert.assertEquals("space created must be equals to " + created, created, createdStr);
-
- // object must be created
- Space sp = this.spacesRepository.findOne(idStr);
-
- Assert.assertNotNull("Space object must be in rep", sp);
-
- Assert.assertEquals("space title must be equals to " + title, title, sp.getTitle());
- Assert.assertEquals("space description must be equals to " + description, description, sp.getDescription());
- Assert.assertEquals("space uri must be equals to " + uri, uri, sp.getUri());
- Assert.assertEquals("space color must be equals to " + color, color, sp.getColor());
- Assert.assertEquals("space bin_config must be equals to " + bin_config, bin_config, sp.getBinConfig());
- Assert.assertEquals("space created_by must be equals to " + created_by, created_by, sp.getCreatedBy());
- DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
- DateTime created_date = fmt.parseDateTime(created);
- Assert.assertEquals("space created must be equals to " + created, created_date.toDate(), sp.getCreated());
-
- }
+ String id = UUID.randomUUID().toString();
+ String title = "test_post";
+ String description = "test space post";
+ String uri = "http://ldt.iri.centrepompidou.fr/test_post";
+ String color = "#bcbcbc";
+ String image = "http://ldt.iri.centrepompidou.fr/test_post/image";
+ String created = "2013-01-01T01:01:01.001+0000";
+ String bin_config = "{name: 'test_post_config'}";
+ String created_by = "test_user_post";
+
+ String spaceJson = String.format("{" + "\"id\":\"%s\","
+ + "\"title\":\"%s\"," + "\"description\":\"%s\","
+ + "\"uri\":\"%s\"," + "\"color\":\"%s\"," + "\"image\":\"%s\","
+ + "\"created\":\"%s\"," + "\"bin_config\":\"%s\","
+ + "\"created_by\":\"%s\"" + "}", id, title, description, uri,
+ color, image, created, bin_config, created_by);
+
+ WebTarget WebTarget = this.target();
+ Response resp = WebTarget.path("spaces").request()
+ .accept(MediaType.APPLICATION_JSON)
+ .post(Entity.entity(spaceJson, MediaType.APPLICATION_JSON));
+
+ String respStr = resp.readEntity(String.class);
+
+ Assert.assertEquals("Resp status = Bad Request : " + respStr,
+ Status.BAD_REQUEST.getStatusCode(), resp.getStatus());
+ Assert.assertEquals("Error message", "Id in JSON must be null", respStr);
+
+ }
+
+ @Test
+ public void testPut() throws JsonProcessingException, IOException {
+
+ String id = this.firstSpaceUUID;
+ String title = "test_post";
+ String description = "test space put";
+ String uri = "http://ldt.iri.centrepompidou.fr/test_put";
+ String color = "#bcbcbc";
+ String image = "http://ldt.iri.centrepompidou.fr/test_put/image";
+ String created = "2013-01-01T01:01:01.001+0000";
+ String bin_config = "{name: 'test_put_config'}";
+ String created_by = "test_user_put";
+
+ String spaceJson = String.format("{" + "\"id\":\"%s\","
+ + "\"title\":\"%s\"," + "\"description\":\"%s\","
+ + "\"uri\":\"%s\"," + "\"color\":\"%s\"," + "\"image\":\"%s\","
+ + "\"created\":\"%s\"," + "\"bin_config\":\"%s\","
+ + "\"created_by\":\"%s\"" + "}", id, title, description, uri,
+ color, image, created, bin_config, created_by);
+
+ WebTarget WebTarget = this.target();
+ Response resp = WebTarget.path("spaces")
+ .path(this.firstSpaceUUID).request()//type(MediaType.APPLICATION_JSON)
+ .accept(MediaType.APPLICATION_JSON)//.entity(spaceJson)
+ .put(Entity.entity(spaceJson, MediaType.APPLICATION_JSON));
-
- @Test
- public void testPostWithId() {
-
- String id = UUID.randomUUID().toString();
- String title = "test_post";
- String description = "test space post";
- String uri = "http://ldt.iri.centrepompidou.fr/test_post";
- String color = "#bcbcbc";
- String image = "http://ldt.iri.centrepompidou.fr/test_post/image";
- String created = "2013-01-01T01:01:01.001+0000";
- String bin_config = "{name: 'test_post_config'}";
- String created_by = "test_user_post";
-
- String spaceJson = String.format("{" +
- "\"id\":\"%s\"," +
- "\"title\":\"%s\"," +
- "\"description\":\"%s\"," +
- "\"uri\":\"%s\"," +
- "\"color\":\"%s\"," +
- "\"image\":\"%s\"," +
- "\"created\":\"%s\"," +
- "\"bin_config\":\"%s\"," +
- "\"created_by\":\"%s\"" +
- "}",
- id,
- title,
- description,
- uri,
- color,
- image,
- created,
- bin_config,
- created_by);
-
- WebResource webResource = this.resource();
- ClientResponse resp = webResource.path("spaces").type(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).entity(spaceJson).post(ClientResponse.class);
-
- String respStr = resp.getEntity(String.class);
-
- Assert.assertEquals("Resp status = Bad Request : " + respStr, Status.BAD_REQUEST.getStatusCode(), resp.getStatus());
- Assert.assertEquals("Error message", "Id in JSON must be null", respStr);
-
- }
-
- @Test
- public void testPut() throws JsonProcessingException, IOException {
-
- String id = this.firstSpaceUUID;
- String title = "test_post";
- String description = "test space put";
- String uri = "http://ldt.iri.centrepompidou.fr/test_put";
- String color = "#bcbcbc";
- String image = "http://ldt.iri.centrepompidou.fr/test_put/image";
- String created = "2013-01-01T01:01:01.001+0000";
- String bin_config = "{name: 'test_put_config'}";
- String created_by = "test_user_put";
-
- String spaceJson = String.format("{" +
- "\"id\":\"%s\"," +
- "\"title\":\"%s\"," +
- "\"description\":\"%s\"," +
- "\"uri\":\"%s\"," +
- "\"color\":\"%s\"," +
- "\"image\":\"%s\"," +
- "\"created\":\"%s\"," +
- "\"bin_config\":\"%s\"," +
- "\"created_by\":\"%s\"" +
- "}",
- id,
- title,
- description,
- uri,
- color,
- image,
- created,
- bin_config,
- created_by);
-
- WebResource webResource = this.resource();
- ClientResponse resp = webResource.path("spaces").path(this.firstSpaceUUID).type(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).entity(spaceJson).put(ClientResponse.class);
-
- String respStr = "";
-
- if(resp.getStatus() != 204) {
- respStr = resp.getEntity(String.class);
- }
-
- Assert.assertEquals("Resp status = created : " + respStr, Status.NO_CONTENT.getStatusCode(), resp.getStatus());
- Assert.assertNull("Resp type must be null", resp.getType());
+ String respStr = "";
+
+ if (resp.getStatus() != 204) {
+ respStr = resp.readEntity(String.class);
+ }
+
+ Assert.assertEquals("Resp status = created : " + respStr,
+ Status.NO_CONTENT.getStatusCode(), resp.getStatus());
+ Assert.assertNull("Resp type must be null", resp.getMediaType());
+
+ // object must be updated
+ Space sp = this.spacesRepository.findOne(id);
+
+ Assert.assertNotNull("Space object must be in rep", sp);
+
+ Assert.assertEquals("space title must be equals to " + title, title,
+ sp.getTitle());
+ Assert.assertEquals("space description must be equals to "
+ + description, description, sp.getDescription());
+ Assert.assertEquals("space uri must be equals to " + uri, uri,
+ sp.getUri());
+ Assert.assertEquals("space color must be equals to " + color, color,
+ sp.getColor());
+ Assert.assertEquals("space bin_config must be equals to " + bin_config,
+ bin_config, sp.getBinConfig());
+ Assert.assertEquals("space created_by must be equals to " + created_by,
+ created_by, sp.getCreatedBy());
+ DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
+ DateTime created_date = fmt.parseDateTime(created);
+ Assert.assertEquals("space created must be equals to " + created,
+ created_date.toDate(), sp.getCreated());
+
+ }
+
+ @Test
+ public void testPutWithoutId() {
+
+ String title = "test_put";
+ String description = "test space put";
+ String uri = "http://ldt.iri.centrepompidou.fr/test_put";
+ String color = "#bcbcbc";
+ String image = "http://ldt.iri.centrepompidou.fr/test_put/image";
+ String created = "2013-01-01T01:01:01.001+0000";
+ String bin_config = "{name: 'test_put_config'}";
+ String created_by = "test_user_put";
-
- // object must be updated
- Space sp = this.spacesRepository.findOne(id);
-
- Assert.assertNotNull("Space object must be in rep", sp);
-
- Assert.assertEquals("space title must be equals to " + title, title, sp.getTitle());
- Assert.assertEquals("space description must be equals to " + description, description, sp.getDescription());
- Assert.assertEquals("space uri must be equals to " + uri, uri, sp.getUri());
- Assert.assertEquals("space color must be equals to " + color, color, sp.getColor());
- Assert.assertEquals("space bin_config must be equals to " + bin_config, bin_config, sp.getBinConfig());
- Assert.assertEquals("space created_by must be equals to " + created_by, created_by, sp.getCreatedBy());
- DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
- DateTime created_date = fmt.parseDateTime(created);
- Assert.assertEquals("space created must be equals to " + created, created_date.toDate(), sp.getCreated());
+ String spaceJson = String.format("{" + "\"title\":\"%s\","
+ + "\"description\":\"%s\"," + "\"uri\":\"%s\","
+ + "\"color\":\"%s\"," + "\"image\":\"%s\","
+ + "\"created\":\"%s\"," + "\"bin_config\":\"%s\","
+ + "\"created_by\":\"%s\"" + "}", title, description, uri,
+ color, image, created, bin_config, created_by);
+
+ WebTarget WebTarget = this.target();
+ Response resp = WebTarget.path("spaces")
+ .path(this.firstSpaceUUID).request()
+ .accept(MediaType.APPLICATION_JSON)
+ .put(Entity.entity(spaceJson, MediaType.APPLICATION_JSON));
+
+ String respStr = resp.readEntity(String.class);
+
+ Assert.assertEquals("Resp status = Bad Request : " + respStr,
+ Status.BAD_REQUEST.getStatusCode(), resp.getStatus());
+ Assert.assertEquals("Error message",
+ "Id parameter and id in JSON do not match", respStr);
+ }
+
+ @Test
+ public void testPutBadId() {
- }
-
- @Test
- public void testPutWithoutId() {
+ String id = UUID.randomUUID().toString();
+ String title = "test_post";
+ String description = "test space put";
+ String uri = "http://ldt.iri.centrepompidou.fr/test_put";
+ String color = "#bcbcbc";
+ String image = "http://ldt.iri.centrepompidou.fr/test_put/image";
+ String created = "2013-01-01T01:01:01.001+0000";
+ String bin_config = "{name: 'test_put_config'}";
+ String created_by = "test_user_put";
+
+ String spaceJson = String.format("{" + "\"id\":\"%s\","
+ + "\"title\":\"%s\"," + "\"description\":\"%s\","
+ + "\"uri\":\"%s\"," + "\"color\":\"%s\"," + "\"image\":\"%s\","
+ + "\"created\":\"%s\"," + "\"bin_config\":\"%s\","
+ + "\"created_by\":\"%s\"" + "}", id, title, description, uri,
+ color, image, created, bin_config, created_by);
+
+ WebTarget WebTarget = this.target();
+ Response resp = WebTarget.path("spaces").path(id)
+ .request(MediaType.APPLICATION_JSON)
+ .accept(MediaType.APPLICATION_JSON)
+ .put(Entity.entity(spaceJson, MediaType.APPLICATION_JSON));
+
+ String respStr = resp.readEntity(String.class);
+
+ Assert.assertEquals("Resp status = Bad Request : " + respStr,
+ Status.NOT_FOUND.getStatusCode(), resp.getStatus());
+
+ }
+
+ @Test
+ public void testDelete() {
- String title = "test_put";
- String description = "test space put";
- String uri = "http://ldt.iri.centrepompidou.fr/test_put";
- String color = "#bcbcbc";
- String image = "http://ldt.iri.centrepompidou.fr/test_put/image";
- String created = "2013-01-01T01:01:01.001+0000";
- String bin_config = "{name: 'test_put_config'}";
- String created_by = "test_user_put";
-
- String spaceJson = String.format("{" +
- "\"title\":\"%s\"," +
- "\"description\":\"%s\"," +
- "\"uri\":\"%s\"," +
- "\"color\":\"%s\"," +
- "\"image\":\"%s\"," +
- "\"created\":\"%s\"," +
- "\"bin_config\":\"%s\"," +
- "\"created_by\":\"%s\"" +
- "}",
- title,
- description,
- uri,
- color,
- image,
- created,
- bin_config,
- created_by);
-
- WebResource webResource = this.resource();
- ClientResponse resp = webResource.path("spaces").path(this.firstSpaceUUID).type(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).entity(spaceJson).put(ClientResponse.class);
-
- String respStr = resp.getEntity(String.class);
-
- Assert.assertEquals("Resp status = Bad Request : " + respStr, Status.BAD_REQUEST.getStatusCode(), resp.getStatus());
- Assert.assertEquals("Error message", "Id parameter and id in JSON do not match", respStr);
- }
-
- @Test
- public void testPutBadId() {
-
- String id = UUID.randomUUID().toString();
- String title = "test_post";
- String description = "test space put";
- String uri = "http://ldt.iri.centrepompidou.fr/test_put";
- String color = "#bcbcbc";
- String image = "http://ldt.iri.centrepompidou.fr/test_put/image";
- String created = "2013-01-01T01:01:01.001+0000";
- String bin_config = "{name: 'test_put_config'}";
- String created_by = "test_user_put";
-
- String spaceJson = String.format("{" +
- "\"id\":\"%s\"," +
- "\"title\":\"%s\"," +
- "\"description\":\"%s\"," +
- "\"uri\":\"%s\"," +
- "\"color\":\"%s\"," +
- "\"image\":\"%s\"," +
- "\"created\":\"%s\"," +
- "\"bin_config\":\"%s\"," +
- "\"created_by\":\"%s\"" +
- "}",
- id,
- title,
- description,
- uri,
- color,
- image,
- created,
- bin_config,
- created_by);
-
- WebResource webResource = this.resource();
- ClientResponse resp = webResource.path("spaces").path(id).type(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).entity(spaceJson).put(ClientResponse.class);
-
- String respStr = resp.getEntity(String.class);
-
- Assert.assertEquals("Resp status = Bad Request : " + respStr, Status.NOT_FOUND.getStatusCode(), resp.getStatus());
-
- }
-
- @Test
- public void testDelete() {
+ WebTarget WebTarget = this.target();
+ Response resp = WebTarget.path("spaces")
+ .path(this.firstSpaceUUID).request().accept(MediaType.TEXT_PLAIN)
+ .delete();
+
+ String respStr = resp.readEntity(String.class);
+ URI reqUri = WebTarget.getUriBuilder().path("spaces")
+ .path(this.firstSpaceUUID).build();
+
+ Assert.assertEquals("Status must be deleted : " + respStr,
+ Status.OK.getStatusCode(), resp.getStatus());
+ Assert.assertEquals(
+ String.format("Message must be \"%s deleted\"", reqUri),
+ String.format("%s deleted", reqUri), respStr);
+
+ // object must be updated
+ Space sp = this.spacesRepository.findOne(this.firstSpaceUUID);
+
+ Assert.assertNull("Space object must be in rep", sp);
+
+ }
+
+ @Test
+ public void testSingleGetJsonp() throws JsonProcessingException,
+ IOException {
+ WebTarget WebTarget = this.target();
+ Response resp = WebTarget.path("spaces")
+ .path(this.firstSpaceUUID)
+ .queryParam("callback", "callback_func").request()
+ .accept("application/javascript").get();
+ Assert.assertEquals("return type must be application/javascript",
+ "application/javascript", resp.getMediaType().toString());
+
+ String respStr = resp.readEntity(String.class);
+
+ Assert.assertTrue("resp must start with callback call",
+ respStr.startsWith("callback_func("));
+ Assert.assertTrue("resp must start with callback call",
+ respStr.endsWith(")"));
+
+ String jsonStr = respStr.substring("callback_func(".length(),
+ respStr.length() - 1);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode jsonNode = mapper.readTree(jsonStr);
+
+ Space space = this.spacesList.get(this.firstSpaceUUID);
+
+ String id = jsonNode.get("id").asText();
+ Assert.assertEquals("id must be equals", space.getId(), id);
+
+ Assert.assertTrue("the space must have a created",
+ jsonNode.hasNonNull("created"));
+
+ String dateStr = jsonNode.get("created").asText();
- WebResource webResource = this.resource();
- ClientResponse resp = webResource.path("spaces").path(this.firstSpaceUUID).accept(MediaType.TEXT_PLAIN).delete(ClientResponse.class);
-
- String respStr = resp.getEntity(String.class);
- URI reqUri = webResource.getUriBuilder().path("spaces").path(this.firstSpaceUUID).build();
+ DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
+ DateTime date = fmt.parseDateTime(dateStr);
+
+ Assert.assertEquals("Created date must be the same",
+ space.getCreated(), date.toDate());
+
+ Assert.assertEquals("title must be the same", space.getTitle(),
+ jsonNode.get("title").asText());
+
+ }
- Assert.assertEquals("Status must be deleted : " + respStr, Status.OK.getStatusCode(), resp.getStatus());
- Assert.assertEquals(String.format("Message must be \"%s deleted\"", reqUri), String.format("%s deleted",reqUri) , respStr);
-
- // object must be updated
- Space sp = this.spacesRepository.findOne(this.firstSpaceUUID);
-
- Assert.assertNull("Space object must be in rep", sp);
+ @Test
+ public void testSingleGetJsonpAcceptAll() throws JsonProcessingException,
+ IOException {
+ WebTarget WebTarget = this.target();
+ Response resp = WebTarget.path("spaces")
+ .path(this.firstSpaceUUID)
+ .queryParam("callback", "callback_func").request().accept("*/*")
+ .get();
+ Assert.assertEquals("return type must be application/javascript",
+ "application/javascript", resp.getMediaType().toString());
- }
-
- @Test
- public void testSingleGetJsonp() throws JsonProcessingException, IOException {
- WebResource webResource = this.resource();
- ClientResponse resp = webResource.path("spaces").path(this.firstSpaceUUID).queryParam("callback", "callback_func").accept("application/javascript").get(ClientResponse.class);
- Assert.assertEquals("return type must be application/javascript","application/javascript", resp.getType().toString());
+ String respStr = resp.readEntity(String.class);
- String respStr = resp.getEntity(String.class);
-
- Assert.assertTrue("resp must start with callback call", respStr.startsWith("callback_func("));
- Assert.assertTrue("resp must start with callback call", respStr.endsWith(")"));
-
- String jsonStr = respStr.substring("callback_func(".length(), respStr.length()-1);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode jsonNode = mapper.readTree(jsonStr);
-
- Space space = this.spacesList.get(this.firstSpaceUUID);
-
- String id = jsonNode.get("id").asText();
- Assert.assertEquals("id must be equals", space.getId(), id);
-
- Assert.assertTrue("the space must have a created", jsonNode.hasNonNull("created"));
-
- String dateStr = jsonNode.get("created").asText();
-
- DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
- DateTime date = fmt.parseDateTime(dateStr);
-
- Assert.assertEquals("Created date must be the same", space.getCreated(), date.toDate());
-
- Assert.assertEquals("title must be the same", space.getTitle(), jsonNode.get("title").asText());
-
- }
-
- @Test
- public void testSingleGetJsonpAcceptAll() throws JsonProcessingException, IOException {
- WebResource webResource = this.resource();
- ClientResponse resp = webResource.path("spaces").path(this.firstSpaceUUID).queryParam("callback", "callback_func").accept("*/*").get(ClientResponse.class);
- Assert.assertEquals("return type must be application/javascript","application/javascript", resp.getType().toString());
+ Assert.assertTrue("resp must start with callback call",
+ respStr.startsWith("callback_func("));
+ Assert.assertTrue("resp must start with callback call",
+ respStr.endsWith(")"));
+
+ String jsonStr = respStr.substring("callback_func(".length(),
+ respStr.length() - 1);
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode jsonNode = mapper.readTree(jsonStr);
+
+ Space space = this.spacesList.get(this.firstSpaceUUID);
+
+ String id = jsonNode.get("id").asText();
+ Assert.assertEquals("id must be equals", space.getId(), id);
- String respStr = resp.getEntity(String.class);
-
- Assert.assertTrue("resp must start with callback call", respStr.startsWith("callback_func("));
- Assert.assertTrue("resp must start with callback call", respStr.endsWith(")"));
-
- String jsonStr = respStr.substring("callback_func(".length(), respStr.length()-1);
- ObjectMapper mapper = new ObjectMapper();
- JsonNode jsonNode = mapper.readTree(jsonStr);
-
- Space space = this.spacesList.get(this.firstSpaceUUID);
-
- String id = jsonNode.get("id").asText();
- Assert.assertEquals("id must be equals", space.getId(), id);
-
- Assert.assertTrue("the space must have a created", jsonNode.hasNonNull("created"));
-
- String dateStr = jsonNode.get("created").asText();
-
- DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
- DateTime date = fmt.parseDateTime(dateStr);
-
- Assert.assertEquals("Created date must be the same", space.getCreated(), date.toDate());
-
- Assert.assertEquals("title must be the same", space.getTitle(), jsonNode.get("title").asText());
-
- }
+ Assert.assertTrue("the space must have a created",
+ jsonNode.hasNonNull("created"));
+
+ String dateStr = jsonNode.get("created").asText();
+
+ DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
+ DateTime date = fmt.parseDateTime(dateStr);
+
+ Assert.assertEquals("Created date must be the same",
+ space.getCreated(), date.toDate());
+
+ Assert.assertEquals("title must be the same", space.getTitle(),
+ jsonNode.get("title").asText());
+
+ }
}