]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-80, non-Helloworld 0.1v services, clients, tests and doc types are moved to...
authorSanjay Dalal <sanjay.dalal@berkeley.edu>
Fri, 17 Apr 2009 21:35:46 +0000 (21:35 +0000)
committerSanjay Dalal <sanjay.dalal@berkeley.edu>
Fri, 17 Apr 2009 21:35:46 +0000 (21:35 +0000)
85 files changed:
HelloWorld/HelloWorldJaxb/src/main/resources/hello.xsd
HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/CollectionObjectResource.java
HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/HelloworldNuxeoApplication.java
HelloWorld/pom.xml
nbproject/private/private.xml
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/build.properties [moved from 3rdparty/nuxeo/nuxeo-platform-cs/build.properties with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/build.xml [moved from 3rdparty/nuxeo/nuxeo-platform-cs/build.xml with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/pom.xml [moved from 3rdparty/nuxeo/nuxeo-platform-cs/pom.xml with 89% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/src/main/resources/META-INF/MANIFEST.MF [moved from 3rdparty/nuxeo/nuxeo-platform-cs/src/main/resources/META-INF/MANIFEST.MF with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/src/main/resources/OSGI-INF/core-types-contrib.xml [moved from 3rdparty/nuxeo/nuxeo-platform-cs/src/main/resources/OSGI-INF/core-types-contrib.xml with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/src/main/resources/OSGI-INF/deployment-fragment.xml [moved from 3rdparty/nuxeo/nuxeo-platform-cs/src/main/resources/OSGI-INF/deployment-fragment.xml with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/src/main/resources/OSGI-INF/ecm-types-contrib.xml [moved from 3rdparty/nuxeo/nuxeo-platform-cs/src/main/resources/OSGI-INF/ecm-types-contrib.xml with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/src/main/resources/OSGI-INF/layouts-contrib.xml [moved from 3rdparty/nuxeo/nuxeo-platform-cs/src/main/resources/OSGI-INF/layouts-contrib.xml with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/src/main/resources/schemas/hello.xsd [moved from 3rdparty/nuxeo/nuxeo-platform-cs/src/main/resources/schemas/hello.xsd with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/META-INF/MANIFEST.MF [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/OSGI-INF/core-types-contrib.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/OSGI-INF/deployment-fragment.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/OSGI-INF/ecm-types-contrib.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/OSGI-INF/layouts-contrib.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/schemas/hello.xsd [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/maven-archiver/pom.properties [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/nuxeo-platform-cs-5.2-SNAPSHOT-sources.jar [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/nuxeo-platform-cs-5.2-SNAPSHOT.jar [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/nb-configuration.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/nbactions.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/pom.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/src/main/java/org/collectionspace/hello/client/IdentifierClient.java [moved from HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/IdentifierClient.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/src/main/java/org/collectionspace/hello/client/IdentifierProxy.java [moved from HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/IdentifierProxy.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/src/main/java/org/collectionspace/hello/client/PersonClient.java [moved from HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonClient.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/src/main/java/org/collectionspace/hello/client/PersonProxy.java [moved from HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonProxy.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/src/test/java/org/collectionspace/hello/client/test/IdentifierServiceTest.java [moved from HelloWorld/HelloWorldClient/src/test/java/org/collectionspace/hello/client/test/IdentifierServiceTest.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/src/test/java/org/collectionspace/hello/client/test/PersonServiceTest.java [moved from HelloWorld/HelloWorldClient/src/test/java/org/collectionspace/hello/client/test/PersonServiceTest.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/src/test/resources/log4j.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/temp-testng-customsuite.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/nb-configuration.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/pom.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/src/main/java/org/collectionspace/hello/services/CollectionObjectJAXBSchema.java [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/src/main/java/org/collectionspace/hello/services/CollectionObjectListItemJAXBSchema.java [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/src/main/resources/hello.xsd [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/src/main/resources/world.xsd [moved from HelloWorld/HelloWorldJaxb/src/main/resources/world.xsd with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/nb-configuration.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/nbactions.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/pom.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/src/main/java/org/collectionspace/hello/client/CollectionSpaceClient.java [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/src/main/java/org/collectionspace/hello/client/MultipartClient.java [moved from HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/MultipartClient.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/src/main/java/org/collectionspace/hello/client/MultipartProxy.java [moved from HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/MultipartProxy.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/src/main/java/org/collectionspace/hello/client/PersonNuxeoClient.java [moved from HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonNuxeoClient.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/src/main/java/org/collectionspace/hello/client/PersonNuxeoProxy.java [moved from HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonNuxeoProxy.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/src/test/java/org/collectionspace/hello/client/test/MultipartServiceTest.java [moved from HelloWorld/HelloWorldClient/src/test/java/org/collectionspace/hello/client/test/MultipartServiceTest.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/src/test/java/org/collectionspace/hello/client/test/PersonNuxeoServiceTest.java [moved from HelloWorld/HelloWorldClient/src/test/java/org/collectionspace/hello/client/test/PersonNuxeoServiceTest.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/src/test/resources/log4j.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/temp-testng-customsuite.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/README.txt [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/build.properties [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/build.xml [moved from HelloWorld/HelloWorldService/build.xml with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/nb-configuration.xml [moved from HelloWorld/HelloWorldService/nb-configuration.xml with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/nbactions.xml [moved from HelloWorld/HelloWorldService/nbactions.xml with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/pom.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/CollectionSpaceResource.java [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/HelloworldNuxeoApplication.java [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/IdentifierResource.java [moved from HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/IdentifierResource.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/MultipartResource.java [moved from HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/MultipartResource.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/PersonNuxeoResource.java [moved from HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/PersonNuxeoResource.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoCallback.java [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoCallbackHandler.java [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoLoginConfiguration.java [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoLoginContextFactory.java [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoRESTClient.java [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/PortalSSOAuthenticationProvider.java [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/resources/jndi.properties [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/resources/nuxeo.properties [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/webapp/WEB-INF/web.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/README.txt [moved from HelloWorld/HelloWorldService/README.txt with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/build.properties [moved from HelloWorld/HelloWorldService/build.properties with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/build.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/nb-configuration.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/nbactions.xml [new file with mode: 0644]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/pom.xml [moved from HelloWorld/HelloWorldService/pom.xml with 94% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/src/main/java/org/collectionspace/hello/services/HelloworldApplication.java [moved from HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services/HelloworldApplication.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/src/main/java/org/collectionspace/hello/services/IdentifierResource.java [moved from HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services/IdentifierResource.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/src/main/java/org/collectionspace/hello/services/PersonResource.java [moved from HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services/PersonResource.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/src/main/webapp/WEB-INF/web.xml [moved from HelloWorld/HelloWorldService/src/main/webapp/WEB-INF/web.xml with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/src/test/java/org/collectionspace/hello/test/IdentifierServiceRawXmlTest.java [moved from HelloWorld/HelloWorldService/src/test/java/org/collectionspace/hello/test/IdentifierServiceRawXmlTest.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/src/test/java/org/collectionspace/hello/test/PersonServiceRawXmlTest.java [moved from HelloWorld/HelloWorldService/src/test/java/org/collectionspace/hello/test/PersonServiceRawXmlTest.java with 100% similarity]
sandbox/sanjay/prototypes/jaxrs-prototype/pom.xml [new file with mode: 0644]

index 221a00bbaaa4ae7649db00047f4ee578eeb9914f..1593ed41c473f0f3a0e7ef6dfb4601d29bc2cf29 100644 (file)
@@ -8,114 +8,7 @@
 >
 
 <!-- avoid XmlRootElement nightnmare, see http://weblogs.java.net/blog/kohsuke/archive/2006/03/why_does_jaxb_p.html-->
-    <xs:element name="person">
-        <xs:complexType>
-
-            <xs:sequence>
-                <xs:element name="firstName" type="xs:string"
-                                               minOccurs="1" />
-                <xs:element name="lastName" type="xs:string"
-                                               minOccurs="1" />
-                <xs:element name="street" type="xs:string"
-                                               minOccurs="1" />
-                <xs:element name="city" type="xs:string"
-                                               minOccurs="1" />
-                <xs:element name="state" type="xs:string"
-                                               minOccurs="1" />
-                <xs:element name="zip" type="xs:string"
-                                               minOccurs="1" />
-                <xs:element name="country" type="xs:string"
-                                               minOccurs="1" />
-            </xs:sequence>
-            <xs:attribute name="id" type="xs:long" />
-            <xs:attribute name="version" type="xs:int" />
-
-        </xs:complexType>
-    </xs:element>
-
-    
-    <!-- person short is returned by getPersons method -->
-    <xs:element name="persons">
-        <xs:complexType>
-            <xs:sequence>
-
-                <!-- person list item is returned by getPersons method -->
-                <xs:element name="person-list-item" maxOccurs="unbounded">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="firstName" type="xs:string"
-                                               minOccurs="1" />
-                            <xs:element name="lastName" type="xs:string"
-                                               minOccurs="1" />
-                            <!-- uri to retrive person details -->
-                            <xs:element name="uri" type="xs:anyURI"
-                                               minOccurs="1" />
-                            <xs:element name="id" type="xs:long"
-                                               minOccurs="1" />
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-<!-- person-nuxeo uses both id and version as string -->
-    <xs:element name="person-nuxeo">
-        <xs:complexType>
-
-            <xs:sequence>
-                <xs:element name="id" type="xs:string" minOccurs="1" />
-                <xs:element name="version" type="xs:string" minOccurs="1" />
-                <xs:element name="firstName" type="xs:string" minOccurs="1" />
-                <xs:element name="lastName" type="xs:string" minOccurs="1" />
-                <xs:element name="street" type="xs:string" minOccurs="1" />
-                <xs:element name="city" type="xs:string" minOccurs="1" />
-                <xs:element name="state" type="xs:string" minOccurs="1" />
-                <xs:element name="zip" type="xs:string" minOccurs="1" />
-                <xs:element name="country" type="xs:string" minOccurs="1" />
-            </xs:sequence>
 
-        </xs:complexType>
-    </xs:element>
-
-
-    <!-- people as in nuxeo repository -->
-    <xs:element name="people">
-        <xs:complexType>
-            <xs:sequence>
-
-                <xs:element name="people-item" maxOccurs="unbounded">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="title" type="xs:string"
-                                               minOccurs="1" />
-                            <!-- uri to retrive person details -->
-                            <xs:element name="uri" type="xs:anyURI"
-                                               minOccurs="1" />
-                            <xs:element name="id" type="xs:string"
-                                               minOccurs="1" />
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="identifier">
-        <xs:complexType>
-
-            <xs:sequence>
-                <xs:element name="namespace" type="xs:string"
-                                               minOccurs="1" />
-                <xs:element name="value" type="xs:string"
-                                               minOccurs="0" />
-            </xs:sequence>
-            <xs:attribute name="id" type="xs:long" />
-            <xs:attribute name="version" type="xs:int" />
-
-        </xs:complexType>
-    </xs:element>
-    
     <!-- domain-identifier  -->
     <xs:element name="domain-identifier">
         <xs:complexType>
index 5cdc48f98fde5f776e8eb25aa140d4205c170b1f..479d5888a10899f647da7d5ec9c3aff865fe9ef1 100644 (file)
@@ -147,7 +147,7 @@ public class CollectionObjectResource extends CollectionSpaceResource {
 
         
         verbose("createCollectionObject: ", co);
-        UriBuilder path = UriBuilder.fromResource(PersonNuxeoResource.class);
+        UriBuilder path = UriBuilder.fromResource(CollectionObjectResource.class);
         path.path("" + csid);
         Response response = Response.created(path.build()).build();
         
index bb6bfa2d9777b897a61ad711d315a1926cfbfda8..6545a2ee45e35ea764f811e462db50707bfb4bfd 100644 (file)
@@ -12,9 +12,6 @@ public class HelloworldNuxeoApplication extends Application {
     public HelloworldNuxeoApplication() {
         singletons.add(new CollectionObjectResource());
         singletons.add(new DomainIdentifierResource());
-        singletons.add(new IdentifierResource());
-        singletons.add(new PersonNuxeoResource());
-        singletons.add(new MultipartResource());
     }
 
     @Override
index a90c2fd7b999db36537f8ee188dbb2bf74f680fc..4020e517c177cf4c19f4108d0d57862ea9c587f7 100644 (file)
-<?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">
-
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.collectionspace.hello.services</groupId>
-    <version>0.1</version>
-    <artifactId>helloworld</artifactId>
-    <packaging>pom</packaging>
-    <name>HelloWorld</name>
-    <modules>
-        <module>HelloWorldJaxb</module>
-        <module>HelloWorldClient</module>
-        <module>HelloWorldService</module>
-<!--        <module>HelloWorldNuxeoService</module> -->
-    </modules>
-    <repositories>
-        <repository>
-            <id>jboss</id>
-            <url>http://repository.jboss.org/maven2</url>
-        </repository>
-        <repository>
-            <id>sun</id>
-            <url>http://download.java.net/maven/2</url>
-        </repository>
-        <repository>
-            <id>java.net</id>
-            <name>java.net Maven Repository</name>
-            <url>
-            https://maven-repository.dev.java.net/nonav/repository
-            </url>
-            <layout>legacy</layout>
-        </repository>
-        <repository>
-            <id>maven2-repository.dev.java.net</id>
-            <name>Java.net Maven 2 Repository</name>
-            <url>http://download.java.net/maven/2</url>
-        </repository>
-    </repositories>
-    <pluginRepositories>
-
-        <pluginRepository>
-            <id>java.net</id>
-            <name>java.net Maven Repository</name>
-            <url>
-            https://maven-repository.dev.java.net/nonav/repository
-            </url>
-            <layout>legacy</layout>
-        </pluginRepository>
-        <pluginRepository>
-            <id>maven2-repository.dev.java.net</id>
-            <name>Java.net Maven 2 Repository</name>
-            <url>http://download.java.net/maven/2</url>
-        </pluginRepository>
-    </pluginRepositories>
-
-    <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <configuration>
-                        <source>1.5</source>
-                        <target>1.5</target>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-site-plugin</artifactId>
-                    <configuration>
-                        <unzipCommand>
-                     /usr/bin/unzip -o &gt; err.txt
-                        </unzipCommand>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-war-plugin</artifactId>
-                    <version>2.0.1</version>
-                    <configuration>
-
-                        <warSourceExcludes>
-                     WEB-INF/lib/*.jar
-                        </warSourceExcludes>
-                        <archive>
-                            <manifest>
-                                <addClasspath>true</addClasspath>
-
-                            </manifest>
-                        </archive>
-                    </configuration>
-                </plugin>
-
-            </plugins>
-        </pluginManagement>
-    </build>
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>net.java.dev.jaxb2-commons</groupId>
-                <artifactId>jaxb-fluent-api</artifactId>
-                <version>2.0.1</version>
-            </dependency>
-            <dependency>
-                <groupId>org.testng</groupId>
-                <artifactId>testng</artifactId>
-                <version>5.6</version>
-                <scope>test</scope>
-                <classifier>jdk15</classifier>
-            </dependency>
-            <dependency>
-                <groupId>org.jboss.resteasy</groupId>
-                <artifactId>jaxrs-api</artifactId>
-                <version>1.0.2.GA</version>
-            </dependency>
-            <dependency>
-                <groupId>net.java.dev.jaxb2-commons</groupId>
-                <artifactId>jaxb-fluent-api</artifactId>
-                <version>2.0.1</version>
-            </dependency>
-            <dependency>
-                <groupId>org.jvnet.jaxb2-commons</groupId>
-                <artifactId>property-listener-injector</artifactId>
-                <version>1.0</version>
-            </dependency>
-            <dependency>
-                <groupId>org.jvnet.jaxb2_commons</groupId>
-                <artifactId>runtime</artifactId>
-                <version>0.4.1</version>
-            </dependency>
-            <dependency>
-                <groupId>org.jboss.resteasy</groupId>
-                <artifactId>resteasy-jaxrs</artifactId>
-                <version>1.0.2.GA</version>
-            </dependency>
-            <dependency>
-                <groupId>commons-httpclient</groupId>
-                <artifactId>commons-httpclient</artifactId>
-                <version>3.1</version>
-            </dependency>
-            <dependency>
-                <groupId>com.sun.xml.bind</groupId>
-                <artifactId>jaxb-impl</artifactId>
-                <version>2.1.7</version>
-            </dependency>
-            <dependency>
-                <groupId>org.testng</groupId>
-                <artifactId>testng</artifactId>
-                <version>5.6</version>
-                <scope>test</scope>
-                <classifier>jdk15</classifier>
-            </dependency>
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-api</artifactId>
-                <version>1.5.2</version>
-            </dependency>
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-log4j12</artifactId>
-                <version>1.5.2</version>
-            </dependency>
-            <dependency>
-                <groupId>mysql</groupId>
-                <artifactId>mysql-connector-java</artifactId>
-                <version>5.1.5</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>com.jgoodies</groupId>
-                <artifactId>binding</artifactId>
-                <version>2.0.2</version>
-            </dependency>
-            <dependency>
-                <groupId>com.jgoodies</groupId>
-                <artifactId>forms</artifactId>
-                <version>1.2.0</version>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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">\r
+\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <groupId>org.collectionspace.hello.services</groupId>\r
+    <version>0.1</version>\r
+    <artifactId>helloworld</artifactId>\r
+    <packaging>pom</packaging>\r
+    <name>HelloWorld</name>\r
+    <modules>\r
+        <module>HelloWorldJaxb</module>\r
+        <module>HelloWorldClient</module>\r
+        <module>HelloWorldNuxeoService</module>\r
+        \r
+</modules>\r
+    <repositories>\r
+        <repository>\r
+            <id>jboss</id>\r
+            <url>http://repository.jboss.org/maven2</url>\r
+        </repository>\r
+        <repository>\r
+            <id>sun</id>\r
+            <url>http://download.java.net/maven/2</url>\r
+        </repository>\r
+        <repository>\r
+            <id>java.net</id>\r
+            <name>java.net Maven Repository</name>\r
+            <url>https://maven-repository.dev.java.net/nonav/repository</url>\r
+            <layout>legacy</layout>\r
+        </repository>\r
+        <repository>\r
+            <id>maven2-repository.dev.java.net</id>\r
+            <name>Java.net Maven 2 Repository</name>\r
+            <url>http://download.java.net/maven/2</url>\r
+        </repository>\r
+    </repositories>\r
+    <pluginRepositories>\r
+\r
+        <pluginRepository>\r
+            <id>java.net</id>\r
+            <name>java.net Maven Repository</name>\r
+            <url>https://maven-repository.dev.java.net/nonav/repository</url>\r
+            <layout>legacy</layout>\r
+        </pluginRepository>\r
+        <pluginRepository>\r
+            <id>maven2-repository.dev.java.net</id>\r
+            <name>Java.net Maven 2 Repository</name>\r
+            <url>http://download.java.net/maven/2</url>\r
+        </pluginRepository>\r
+    </pluginRepositories>\r
+\r
+    <build>\r
+        <pluginManagement>\r
+            <plugins>\r
+                <plugin>\r
+                    <groupId>org.apache.maven.plugins</groupId>\r
+                    <artifactId>maven-compiler-plugin</artifactId>\r
+                    <configuration>\r
+                        <source>1.5</source>\r
+                        <target>1.5</target>\r
+                    </configuration>\r
+                </plugin>\r
+                <plugin>\r
+                    <groupId>org.apache.maven.plugins</groupId>\r
+                    <artifactId>maven-site-plugin</artifactId>\r
+                    <configuration>\r
+                        <unzipCommand>/usr/bin/unzip -o &gt; err.txt</unzipCommand>\r
+                    </configuration>\r
+                </plugin>\r
+                <plugin>\r
+                    <groupId>org.apache.maven.plugins</groupId>\r
+                    <artifactId>maven-war-plugin</artifactId>\r
+                    <version>2.0.1</version>\r
+                    <configuration>\r
+\r
+                        <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>\r
+                        <archive>\r
+                            <manifest>\r
+                                <addClasspath>true</addClasspath>\r
+\r
+                            </manifest>\r
+                        </archive>\r
+                    </configuration>\r
+                </plugin>\r
+\r
+            </plugins>\r
+        </pluginManagement>\r
+    </build>\r
+    <dependencyManagement>\r
+        <dependencies>\r
+            <dependency>\r
+                <groupId>net.java.dev.jaxb2-commons</groupId>\r
+                <artifactId>jaxb-fluent-api</artifactId>\r
+                <version>2.0.1</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.testng</groupId>\r
+                <artifactId>testng</artifactId>\r
+                <version>5.6</version>\r
+                <scope>test</scope>\r
+                <classifier>jdk15</classifier>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.jboss.resteasy</groupId>\r
+                <artifactId>jaxrs-api</artifactId>\r
+                <version>1.0.2.GA</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>net.java.dev.jaxb2-commons</groupId>\r
+                <artifactId>jaxb-fluent-api</artifactId>\r
+                <version>2.0.1</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.jvnet.jaxb2-commons</groupId>\r
+                <artifactId>property-listener-injector</artifactId>\r
+                <version>1.0</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.jvnet.jaxb2_commons</groupId>\r
+                <artifactId>runtime</artifactId>\r
+                <version>0.4.1</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.jboss.resteasy</groupId>\r
+                <artifactId>resteasy-jaxrs</artifactId>\r
+                <version>1.0.2.GA</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>commons-httpclient</groupId>\r
+                <artifactId>commons-httpclient</artifactId>\r
+                <version>3.1</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>com.sun.xml.bind</groupId>\r
+                <artifactId>jaxb-impl</artifactId>\r
+                <version>2.1.7</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.testng</groupId>\r
+                <artifactId>testng</artifactId>\r
+                <version>5.6</version>\r
+                <scope>test</scope>\r
+                <classifier>jdk15</classifier>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.slf4j</groupId>\r
+                <artifactId>slf4j-api</artifactId>\r
+                <version>1.5.2</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.slf4j</groupId>\r
+                <artifactId>slf4j-log4j12</artifactId>\r
+                <version>1.5.2</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>mysql</groupId>\r
+                <artifactId>mysql-connector-java</artifactId>\r
+                <version>5.1.5</version>\r
+                <scope>test</scope>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>com.jgoodies</groupId>\r
+                <artifactId>binding</artifactId>\r
+                <version>2.0.2</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>com.jgoodies</groupId>\r
+                <artifactId>forms</artifactId>\r
+                <version>1.2.0</version>\r
+            </dependency>\r
+        </dependencies>\r
+    </dependencyManagement>\r
+</project>\r
index b9b6e81853ba4c4deee68a7dacf8ae53566f0713..cc2c0e57c4f9286a6ee78a9b3557c26caca57415 100644 (file)
@@ -1,7 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <project-private xmlns="http://www.netbeans.org/ns/project-private/1">\r
     <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>\r
-    <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">\r
-        <file>file:/C:/dev/src/cs/src/services/trunk/build.xml</file>\r
-    </open-files>\r
 </project-private>\r
similarity index 89%
rename from 3rdparty/nuxeo/nuxeo-platform-cs/pom.xml
rename to sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/pom.xml
index c6ca3618bf493151aa7dc915f10eaf71f38e02bd..2c25c0bac256fa653f9a79d88d50b4bb113b070e 100644 (file)
@@ -11,9 +11,9 @@
 
   <artifactId>nuxeo-platform-cs</artifactId>
   <packaging>jar</packaging>
-  <name>Nuxeo CS extensions</name>
+  <name>jaxrs-nuxeo extensions</name>
   <description>
-    Nuxeo Enterprise Platform: CS extensions
+    Nuxeo Enterprise Platform: jaxrs-nuxeo extensions
   </description>
 
   <dependencies>
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/META-INF/MANIFEST.MF b/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..ab71dc5
--- /dev/null
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0 
+Bundle-ManifestVersion: 1 
+Bundle-Name: NuxeoCS
+Bundle-SymbolicName: org.collectionspace.hello;singleton:=true 
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Bundle-Vendor: Nuxeo 
+Require-Bundle: org.nuxeo.runtime, 
+ org.nuxeo.ecm.core.api, 
+ org.nuxeo.ecm.core,
+ org.nuxeo.ecm.core.api,
+ org.nuxeo.ecm.platform.types.api,
+ org.nuxeo.ecm.platform.versioning.api,
+ org.nuxeo.ecm.platform.ui,
+ org.nuxeo.ecm.platform.forms.layout.client,
+ org.nuxeo.ecm.platform.publishing.api,
+ org.nuxeo.ecm.platform.ws 
+Provide-Package: org.collectionspace.hello
+Nuxeo-Component: OSGI-INF/core-types-contrib.xml,
+ OSGI-INF/ecm-types-contrib.xml,
+ OSGI-INF/layouts-contrib.xml
+
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/OSGI-INF/core-types-contrib.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/OSGI-INF/core-types-contrib.xml
new file mode 100644 (file)
index 0000000..7be6add
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<component name="org.collectionspace.hello.coreTypes">
+  <extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
+    <schema name="hello" prefix="hello" src="schemas/hello.xsd"/>
+  </extension>
+  <extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
+    <doctype name="Hello" extends="Document">
+      <schema name="common"/>
+      <schema name="dublincore"/>
+      <schema name="hello"/>
+    </doctype>
+  </extension>
+</component>
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/OSGI-INF/deployment-fragment.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/OSGI-INF/deployment-fragment.xml
new file mode 100644 (file)
index 0000000..88b94ff
--- /dev/null
@@ -0,0 +1,408 @@
+<?xml version="1.0"?>
+<fragment>
+
+  <extension target="application#MODULE">
+    <module>
+      <ejb>${bundle.fileName}</ejb>
+    </module>
+
+    <module>
+      <web>
+        <web-uri>nuxeo.war</web-uri>
+        <context-root>/nuxeo</context-root>
+      </web>
+    </module>
+  </extension>
+
+  <!-- uncomment that to enable tomcat based auth
+    <extension target="web#LOGIN-CONFIG">
+    <login-config>
+    <auth-method>FORM</auth-method>
+    <realm-name>nuxeo.ecm</realm-name>
+    <form-login-config>
+    <form-login-page>/login.jsp</form-login-page>
+    <form-error-page>/login.jsp?loginFailed=true</form-error-page>
+    </form-login-config>
+    </login-config>
+    </extension>
+  -->
+
+  <extension target="web#FILTER-MAPPING">
+
+    <!-- Seam Context Filter is declared in org.nuxeo.ecm.platform.ui.web
+      deployment fragment -->
+
+    <filter-mapping>
+      <filter-name>Seam Context Filter</filter-name>
+      <url-pattern>/ws/FileManageWS</url-pattern>
+    </filter-mapping>
+
+    <filter-mapping>
+      <filter-name>Seam Context Filter</filter-name>
+      <url-pattern>/DocumentManagerWS</url-pattern>
+    </filter-mapping>
+  </extension>
+
+  <extension target="web#SERVLET">
+  </extension>
+
+  <extension target="web#SERVLET-MAPPING">
+  </extension>
+
+  <extension target="pages#PAGES">
+    <!-- This calls a method which load the Workspace logo -->
+    <page view-id="/showLogo.xhtml" action="#{logoHelper.getLogo}"/>
+
+    <!-- Bind URL to the Document URL resolver-->
+    <page view-id="/getDocument.xhtml"
+        action="#{navigationContext.navigateToURL}">
+    </page>
+
+    <page view-id="/nxliveedit.xhtml" action="#{liveEditHelper.getBootstrap()}"/>
+
+    <!-- Bind URL to the Parallele conversation Document URL resolver-->
+    <page view-id="/parallele.xhtml"
+        action="#{paralleleNavigationHelper.navigateToURL}">
+    </page>
+
+    <!-- Post login and 'home' view handler -->
+    <page view-id="/nxstartup.xhtml"
+        action="#{startupHelper.initDomainAndFindStartupPage('Default domain', 'view')}"/>
+
+    <!-- To redirect to the user dashboard instead, use instead:
+
+      <page view-id="/nxstartup.xhtml"
+      action="#{startupHelper.initDomainAndFindStartupPage('Default domain', 'user_dashboard')}" />
+    -->
+
+    <!--  config for workspace management
+      = give a description for each viewId
+    -->
+
+    <page view-id="/view_domains.xhtml">
+      #{currentServerLocation.name}/#{currentTabAction.label}
+    </page>
+
+    <page view-id="/select_document_type.faces.xhtml">
+      Create new document in #{currentDocument.name}
+    </page>
+
+    <page view-id="/create_document.faces.xhtml">
+      Create new document in #{currentDocument.name}
+    </page>
+
+    <page view-id="/user_dashboard.xhtml">
+      breadcrumb=command.user_dashboard
+    </page>
+
+    <page view-id="/view_users.xhtml">
+      breadcrumb=command.manageMembers
+    </page>
+
+    <page view-id="/view_many_users.xhtml">
+      breadcrumb=command.manageMembers
+    </page>
+
+    <page view-id="/view_vocabularies.xhtml">
+      breadcrumb=title.vocabularies
+    </page>
+
+    <page view-id="/search/search_form.xhtml">
+      breadcrumb=command.advancedSearch
+    </page>
+  </extension>
+
+  <extension target="faces-config#APPLICATION">
+    <locale-config>
+      <default-locale>en</default-locale>
+      <supported-locale>en_GB</supported-locale>
+      <supported-locale>en_US</supported-locale>
+      <supported-locale>fr</supported-locale>
+      <supported-locale>de</supported-locale>
+      <supported-locale>es</supported-locale>
+      <supported-locale>it</supported-locale>
+      <supported-locale>ar</supported-locale>
+      <supported-locale>ru</supported-locale>
+      <supported-locale>ja</supported-locale>
+      <supported-locale>vn</supported-locale>
+    </locale-config>
+
+    <message-bundle>messages</message-bundle>
+  </extension>
+
+  <extension target="components#PAGEFLOW">
+    <value>config/addWorkspace.jpdl.xml</value>
+  </extension>
+
+  <extension target="faces-config#NAVIGATION">
+    <!-- generic pages -->
+    <navigation-case>
+      <from-outcome>generic_error_page</from-outcome>
+      <to-view-id>/generic_error_page.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>generic_message_page</from-outcome>
+      <to-view-id>/generic_message_page.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>home</from-outcome>
+      <to-view-id>/nxstartup.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>user_login</from-outcome>
+      <to-view-id>/login.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>user_logout</from-outcome>
+      <to-view-id>/logout.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>view_servers</from-outcome>
+      <to-view-id>/view_servers.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <!-- pages for document actions -->
+
+    <navigation-case>
+      <from-outcome>view_domains</from-outcome>
+      <to-view-id>/view_domains.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>select_document_type</from-outcome>
+      <to-view-id>/select_document_type.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>create_document</from-outcome>
+      <to-view-id>/create_document.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>edit_document</from-outcome>
+      <to-view-id>/edit_document.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>view_documents</from-outcome>
+      <to-view-id>/view_documents.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>create_file</from-outcome>
+      <to-view-id>/create_file.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>create_workspace_wizard</from-outcome>
+      <to-view-id>/createWorkspaceWizard.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>send_email</from-outcome>
+      <to-view-id>/document_email.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <!-- AT: BBB, use view_documents instead -->
+    <navigation-case>
+      <from-outcome>view_workspaces</from-outcome>
+      <to-view-id>/view_workspaces.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <!-- AT: BBB, use create_document instead -->
+    <navigation-case>
+      <from-outcome>create_domain</from-outcome>
+      <to-view-id>/create_domain.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <!-- AT: BBB, use edit_document instead -->
+    <navigation-case>
+      <from-outcome>edit_domain</from-outcome>
+      <to-view-id>/edit_domain.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <!-- AT: BBB, use create_document instead -->
+    <navigation-case>
+      <from-outcome>create_workspace</from-outcome>
+      <to-view-id>/create_workspace.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <!-- AT: BBB, use edit_document instead -->
+    <navigation-case>
+      <from-outcome>edit_workspace</from-outcome>
+      <to-view-id>/edit_workspace.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <!-- users ang groups -->
+
+    <navigation-case>
+      <from-outcome>members_management</from-outcome>
+      <to-view-id>/members_management.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>view_users</from-outcome>
+      <to-view-id>/view_users.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>view_many_users</from-outcome>
+      <to-view-id>/view_many_users.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>edit_user</from-outcome>
+      <to-view-id>/edit_user.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>edit_user_password</from-outcome>
+      <to-view-id>/edit_user_password.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>view_user</from-outcome>
+      <to-view-id>/view_user.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>create_user</from-outcome>
+      <to-view-id>/create_user.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>view_groups</from-outcome>
+      <to-view-id>/view_groups.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>view_group</from-outcome>
+      <to-view-id>/view_group.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>edit_group</from-outcome>
+      <to-view-id>/edit_group.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>create_group</from-outcome>
+      <to-view-id>/create_group.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>view_vocabularies</from-outcome>
+      <to-view-id>/view_vocabularies.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>view_vocabulary</from-outcome>
+      <to-view-id>/view_vocabulary.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <!-- search -->
+
+    <navigation-case>
+      <from-outcome>search_form</from-outcome>
+      <to-view-id>/search/search_form.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>search_results_nxql</from-outcome>
+      <to-view-id>/search/search_results_nxql.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>search_results_advanced</from-outcome>
+      <to-view-id>
+        /search/search_results_advanced.xhtml
+      </to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>search_results_simple</from-outcome>
+      <to-view-id>/search/search_results_simple.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <!-- miscellaneaous -->
+
+    <navigation-case>
+      <from-outcome>clipboard</from-outcome>
+      <to-view-id>/incl/clipboard.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>user_dashboard</from-outcome>
+      <to-view-id>/user_dashboard.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>select_workspace_template</from-outcome>
+      <to-view-id>/select_workspace_template.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>pdf_generation_error</from-outcome>
+      <to-view-id>/pdf_generation_error.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>mass_edit</from-outcome>
+      <to-view-id>/massedit_documents.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+
+    <navigation-case>
+      <from-outcome>mass_edit_confirm</from-outcome>
+      <to-view-id>/massedit_documents_preview.xhtml</to-view-id>
+      <redirect/>
+    </navigation-case>
+  </extension>
+
+</fragment>
+
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/OSGI-INF/ecm-types-contrib.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/OSGI-INF/ecm-types-contrib.xml
new file mode 100644 (file)
index 0000000..0234795
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<component name="org.collectionspace.hello.ecm.types">
+  <extension target="org.nuxeo.ecm.platform.types.TypeService" point="types">
+    <type id="Hello" coretype="Hello">
+      <label>org.collectionspace.hello</label>
+      <!--icon>/icons/file.gif</icon-->
+      <default-view>view_documents</default-view>
+
+      <layouts mode="any">
+        <layout>heading</layout>
+        <layout>hello</layout>
+      </layouts>
+      <!--layout>
+        <widget jsfcomponent="h:inputText"
+          schemaname="dublincore" fieldname="title"
+          required="true" />
+        <widget jsfcomponent="h:inputTextarea"
+          schemaname="dublincore" fieldname="description" />
+        <widget jsfcomponent="h:inputText"
+          schemaname="Hello" fieldname="person:firstName" />
+        <widget jsfcomponent="h:inputText"
+          schemaname="Hello" fieldname="person:lastName" />
+      </layout-->
+    </type>
+    <type id="Folder" coretype="Folder">
+      <subtypes>
+        <type>Hello</type>
+      </subtypes>
+    </type>
+    <type id="Workspace" coretype="Workspace">
+      <subtypes>
+        <type>Hello</type>
+      </subtypes>
+    </type>
+
+  </extension>
+</component>
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/OSGI-INF/layouts-contrib.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/OSGI-INF/layouts-contrib.xml
new file mode 100644 (file)
index 0000000..3cf9ff7
--- /dev/null
@@ -0,0 +1,155 @@
+<?xml version="1.0"?>
+
+<component name="org.collectionspace.hello.layouts.webapp">
+
+  <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
+    point="layouts">
+
+    <layout name="hello">
+      <templates>
+        <template mode="any">/layouts/layout_default_template.xhtml</template>
+      </templates>
+      <rows>
+        <row><widget>cid</widget></row>
+        <row><widget>cversion</widget></row>
+        <row><widget>firstname</widget></row>
+        <row><widget>lastname</widget></row>
+        <row><widget>street</widget></row>
+        <row><widget>city</widget></row>
+        <row><widget>state</widget></row>
+        <row><widget>zip</widget></row>
+        <row><widget>country</widget></row>
+      </rows>
+      <widget name="cid" type="text">
+        <labels>
+          <label mode="any">cid</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field schema="hello">cid</field>
+        </fields>
+        <widgetModes>
+          <!-- not shown in create mode -->
+          <mode value="create">hidden</mode>
+        </widgetModes>
+        <properties widgetMode="edit">
+          <!-- required in widget mode edit -->
+          <property name="required">true</property>
+        </properties>
+        <properties mode="view">
+          <!-- property applying in view mode -->
+          <property name="styleClass">cssClass</property>
+        </properties>
+      </widget>
+      <widget name="cversion" type="text">
+        <labels>
+          <label mode="any">cversion</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field schema="hello">cversion</field>
+        </fields>
+        <properties widgetMode="edit">
+          <property name="styleClass">dataInputText</property>
+        </properties>
+
+      </widget>
+
+      <widget name="firstname" type="text">
+        <labels>
+          <label mode="any">firstName</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field schema="hello">firstName</field>
+        </fields>
+        <properties widgetMode="edit">
+          <property name="styleClass">dataInputText</property>
+        </properties>
+
+      </widget>
+      <widget name="lastname" type="text">
+        <labels>
+          <label mode="any">lastName</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field schema="hello">lastName</field>
+        </fields>
+        <properties widgetMode="edit">
+          <property name="styleClass">dataInputText</property>
+        </properties>
+
+      </widget>
+      <widget name="street" type="text">
+        <labels>
+          <label mode="any">street</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field schema="hello">street</field>
+        </fields>
+        <properties widgetMode="edit">
+          <property name="styleClass">dataInputText</property>
+        </properties>
+
+      </widget>
+      <widget name="city" type="text">
+        <labels>
+          <label mode="any">city</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field schema="hello">city</field>
+        </fields>
+        <properties widgetMode="edit">
+          <property name="styleClass">dataInputText</property>
+        </properties>
+
+      </widget>
+      <widget name="state" type="text">
+        <labels>
+          <label mode="any">state</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field schema="hello">state</field>
+        </fields>
+        <properties widgetMode="edit">
+          <property name="styleClass">dataInputText</property>
+        </properties>
+
+      </widget>
+      <widget name="zip" type="text">
+        <labels>
+          <label mode="any">zip</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field schema="hello">zip</field>
+        </fields>
+        <properties widgetMode="edit">
+          <property name="styleClass">dataInputText</property>
+        </properties>
+
+      </widget>
+      <widget name="country" type="text">
+        <labels>
+          <label mode="any">country</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field schema="hello">country</field>
+        </fields>
+        <properties widgetMode="edit">
+          <property name="styleClass">dataInputText</property>
+        </properties>
+
+      </widget>
+
+    </layout>
+
+
+  </extension>
+
+</component>
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/schemas/hello.xsd b/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/classes/schemas/hello.xsd
new file mode 100644 (file)
index 0000000..df2ec99
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema 
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:ns="http://collectionspace.org/hello/"
+  xmlns="http://collectionspace.org/hello/"
+  targetNamespace="http://collectionspace.org/hello/"
+  version="0.1"
+>
+    <!--xs:element name="person">
+        <xs:complexType>
+
+            <xs:sequence-->
+    <xs:element name="firstName" type="xs:string"
+                                               minOccurs="1" />
+    <xs:element name="lastName" type="xs:string"
+                                               minOccurs="1" />
+    <xs:element name="street" type="xs:string"
+                                               minOccurs="1" />
+    <xs:element name="city" type="xs:string"
+                                               minOccurs="1" />
+    <xs:element name="state" type="xs:string"
+                                               minOccurs="1" />
+    <xs:element name="zip" type="xs:string"
+                                               minOccurs="1" />
+    <xs:element name="country" type="xs:string"
+                                               minOccurs="1" />
+                        
+    <xs:element name="cid" type="xs:string"
+                                               minOccurs="1" />
+    <xs:element name="cversion" type="xs:string"
+                                               minOccurs="1" />
+            <!--/xs:sequence>
+            <xs:attribute name="cid" type="xs:long" />
+            <xs:attribute name="cversion" type="xs:int" />
+
+        </xs:complexType>
+    </xs:element-->
+
+
+</xs:schema>
+
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/maven-archiver/pom.properties b/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/maven-archiver/pom.properties
new file mode 100644 (file)
index 0000000..189aa7f
--- /dev/null
@@ -0,0 +1,5 @@
+#Generated by Maven\r
+#Fri Apr 17 14:17:59 PDT 2009\r
+version=5.2-SNAPSHOT\r
+groupId=org.nuxeo.ecm.platform\r
+artifactId=nuxeo-platform-cs\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/nuxeo-platform-cs-5.2-SNAPSHOT-sources.jar b/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/nuxeo-platform-cs-5.2-SNAPSHOT-sources.jar
new file mode 100644 (file)
index 0000000..4b59fac
Binary files /dev/null and b/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/nuxeo-platform-cs-5.2-SNAPSHOT-sources.jar differ
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/nuxeo-platform-cs-5.2-SNAPSHOT.jar b/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/nuxeo-platform-cs-5.2-SNAPSHOT.jar
new file mode 100644 (file)
index 0000000..b1249b1
Binary files /dev/null and b/sandbox/sanjay/prototypes/jaxrs-prototype/3rdparty/nuxeo/jaxrs-nuxeo-cs/target/nuxeo-platform-cs-5.2-SNAPSHOT.jar differ
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/nb-configuration.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/nb-configuration.xml
new file mode 100644 (file)
index 0000000..6c3fe60
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<project-shared-configuration>\r
+    <!--
+This file contains additional configuration written by modules in the NetBeans IDE.
+The configuration is intended to be shared among all the users of project and
+therefore it is assumed to be part of version control checkout.
+Without this configuration present, some functionality in the IDE may be limited or fail altogether.
+-->\r
+    <properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">\r
+        <!--
+Properties that influence various parts of the IDE, especially code formatting and the like. 
+You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
+That way multiple projects can share the same settings (useful for formatting rules for example).
+Any value defined here will override the pom.xml file value but is only applicable to the current project.
+-->\r
+        <org-netbeans-modules-editor-indent.CodeStyle.usedProfile>default</org-netbeans-modules-editor-indent.CodeStyle.usedProfile>\r
+        <org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>8</org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>\r
+        <org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>80</org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>\r
+    </properties>\r
+</project-shared-configuration>\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/nbactions.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/nbactions.xml
new file mode 100644 (file)
index 0000000..047c73d
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<actions>\r
+        <action>\r
+            <actionName>rebuild</actionName>\r
+            <packagings>\r
+                <packaging>*</packaging>\r
+            </packagings>\r
+            <goals>\r
+                <goal>clean</goal>\r
+                <goal>install</goal>\r
+            </goals>\r
+            <properties>\r
+                <maven.test.skip>true</maven.test.skip>\r
+            </properties>\r
+        </action>\r
+        \r
+    </actions>\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/pom.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/pom.xml
new file mode 100644 (file)
index 0000000..8001df0
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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">\r
+    <parent>\r
+        <artifactId>jaxrs-prototype</artifactId>\r
+        <groupId>org.collectionspace.hello.services</groupId>\r
+        <version>0.1</version>\r
+    </parent>\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <groupId>org.collectionspace.hello.services</groupId>\r
+    <artifactId>jaxrs-client</artifactId>\r
+    <packaging>jar</packaging>\r
+    <version>0.1</version>\r
+    <name>jaxrs-client</name>\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.collectionspace.hello.services</groupId>\r
+            <artifactId>jaxrs-jaxb</artifactId>\r
+            <version>0.1</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.testng</groupId>\r
+            <artifactId>testng</artifactId>\r
+            <version>5.6</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.slf4j</groupId>\r
+            <artifactId>slf4j-api</artifactId>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.slf4j</groupId>\r
+            <artifactId>slf4j-log4j12</artifactId>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.jboss.resteasy</groupId>\r
+            <artifactId>resteasy-jaxrs</artifactId>\r
+            <version>1.0.2.GA</version>\r
+            <!-- filter out unwanted jars -->\r
+            <exclusions>\r
+                <exclusion>\r
+                    <groupId>tjws</groupId>\r
+                    <artifactId>webserver</artifactId>\r
+                </exclusion>\r
+            </exclusions>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.jboss.resteasy</groupId>\r
+            <artifactId>resteasy-jaxb-provider</artifactId>\r
+            <version>1.0.2.GA</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.jboss.resteasy</groupId>\r
+            <artifactId>resteasy-multipart-provider</artifactId>\r
+            <version>1.0.2.GA</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>commons-httpclient</groupId>\r
+            <artifactId>commons-httpclient</artifactId>\r
+        </dependency>\r
+    </dependencies>\r
+    <build>\r
+        <plugins>\r
+            <plugin>\r
+                <artifactId>maven-compiler-plugin</artifactId>\r
+                <version>2.0.2</version>\r
+                <configuration>\r
+                    <source>1.5</source>\r
+                    <target>1.5</target>\r
+                </configuration>\r
+            </plugin>\r
+        </plugins>\r
+    </build>\r
+</project>\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/src/test/resources/log4j.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/src/test/resources/log4j.xml
new file mode 100644 (file)
index 0000000..52121cb
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+       <appender name="console" class="org.apache.log4j.ConsoleAppender">
+               <param name="Target" value="System.out" />
+               <layout class="org.apache.log4j.TTCCLayout">
+                       <param name="DateFormat" value="ISO8601" />
+               </layout>
+       </appender>
+
+
+       <appender name="unit-tests"
+               class="org.apache.log4j.RollingFileAppender">
+               <param name="File" value="./target/unit-tests.log" />
+               <param name="MaxFileSize" value="10240KB" />
+               <param name="MaxBackupIndex" value="6" />
+               <layout class="org.apache.log4j.TTCCLayout">
+                       <param name="DateFormat" value="ISO8601" />
+               </layout>
+       </appender>
+
+       <logger name="org.apache.commons.httpclient" additivity="false">
+               <level value="warn" />
+               <appender-ref ref="console" />
+               <appender-ref ref="unit-tests" />
+       </logger>
+
+       <logger name="httpclient.wire" additivity="false">
+               <level value="info" />
+               <appender-ref ref="console" />
+               <appender-ref ref="unit-tests" />
+       </logger>
+
+       <root>
+               <priority value="debug" />
+               <appender-ref ref="console" />
+               <appender-ref ref="unit-tests" />
+       </root>
+
+</log4j:configuration>
+
+
+
+
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/temp-testng-customsuite.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-client/temp-testng-customsuite.xml
new file mode 100644 (file)
index 0000000..9f24806
--- /dev/null
@@ -0,0 +1,8 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="javaee-addressbook-client">
+  <test verbose="2" name="org.jboss.resteasy.examples.addressbook.client.AddressBookTest" annotations="JDK">
+    <classes>
+      <class name="org.jboss.resteasy.examples.addressbook.client.AddressBookTest"/>
+    </classes>
+  </test>
+</suite>
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/nb-configuration.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/nb-configuration.xml
new file mode 100644 (file)
index 0000000..6c3fe60
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<project-shared-configuration>\r
+    <!--
+This file contains additional configuration written by modules in the NetBeans IDE.
+The configuration is intended to be shared among all the users of project and
+therefore it is assumed to be part of version control checkout.
+Without this configuration present, some functionality in the IDE may be limited or fail altogether.
+-->\r
+    <properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">\r
+        <!--
+Properties that influence various parts of the IDE, especially code formatting and the like. 
+You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
+That way multiple projects can share the same settings (useful for formatting rules for example).
+Any value defined here will override the pom.xml file value but is only applicable to the current project.
+-->\r
+        <org-netbeans-modules-editor-indent.CodeStyle.usedProfile>default</org-netbeans-modules-editor-indent.CodeStyle.usedProfile>\r
+        <org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>8</org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>\r
+        <org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>80</org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>\r
+    </properties>\r
+</project-shared-configuration>\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/pom.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/pom.xml
new file mode 100644 (file)
index 0000000..57d5c33
--- /dev/null
@@ -0,0 +1,97 @@
+<?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>
+        <artifactId>jaxrs-prototype</artifactId>
+        <groupId>org.collectionspace.hello.services</groupId>
+        <version>0.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.collectionspace.hello.services</groupId>
+    <artifactId>jaxrs-jaxb</artifactId>
+    <version>0.1</version>
+    <name>jaxrs-jaxb</name>
+    <dependencies>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+            <version>2.0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jvnet.jaxb2-commons</groupId>
+            <artifactId>property-listener-injector</artifactId>
+            <version>1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jvnet.jaxb2_commons</groupId>
+            <artifactId>runtime</artifactId>
+            <version>0.4.1.4</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <defaultGoal>install</defaultGoal>
+        <plugins>
+            <plugin>
+                <groupId>org.jvnet.jaxb2.maven2</groupId>
+                <artifactId>maven-jaxb2-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>javax.activation</groupId>
+                        <artifactId>activation</artifactId>
+                        <version>1.1</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.sun.xml.bind</groupId>
+                        <artifactId>jaxb-impl</artifactId>
+                        <version>2.1.2</version>
+                    </dependency>
+                </dependencies>
+                <configuration>
+                    <args>
+                        <arg>-XtoString</arg>
+                        <arg>-Xinject-listener-code</arg>
+                    </args>
+                    <includeSchemas>
+                        <includeSchema>**/*.xsd</includeSchema>
+                        <includeSchema>**/*.dtd</includeSchema>
+                    </includeSchemas>
+                    <plugins>
+                        <plugin>
+                            <groupId>
+                           org.jvnet.jaxb2_commons
+                            </groupId>
+                            <artifactId>basic</artifactId>
+                            <version>0.4.1</version>
+                        </plugin>
+                        <plugin>
+                            <groupId>
+                           org.jvnet.jaxb2-commons
+                            </groupId>
+                            <artifactId>
+                           property-listener-injector
+                            </artifactId>
+                            <version>1.0</version>
+                        </plugin>
+
+                    </plugins>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.0.2</version>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/src/main/java/org/collectionspace/hello/services/CollectionObjectJAXBSchema.java b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/src/main/java/org/collectionspace/hello/services/CollectionObjectJAXBSchema.java
new file mode 100644 (file)
index 0000000..8484bdb
--- /dev/null
@@ -0,0 +1,21 @@
+/**\r
+ * \r
+ */\r
+package org.collectionspace.hello.services;\r
+\r
+/**\r
+ * @author remillet\r
+ *\r
+ */\r
+public interface CollectionObjectJAXBSchema {\r
+       final static String OBJECT_NUMBER = "objectNumber";\r
+       final static String OTHER_NUMBER = "otherNumber";\r
+       final static String BRIEF_DESCRIPTION = "briefDescription";\r
+       final static String COMMENTS = "comments";\r
+       final static String DIST_FEATURES = "distFeatures";\r
+       final static String OBJECT_NAME = "objectName";\r
+       final static String RESPONSIBLE_DEPT = "responsibleDept";\r
+       final static String TITLE = "title";\r
+}\r
+\r
+\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/src/main/java/org/collectionspace/hello/services/CollectionObjectListItemJAXBSchema.java b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/src/main/java/org/collectionspace/hello/services/CollectionObjectListItemJAXBSchema.java
new file mode 100644 (file)
index 0000000..c3aa8a5
--- /dev/null
@@ -0,0 +1,7 @@
+package org.collectionspace.hello.services;\r
+\r
+public interface CollectionObjectListItemJAXBSchema {\r
+       final static String OBJECT_NUMBER = "objectNumber";\r
+       final static String CSID = "csid";\r
+       final static String URI = "url";\r
+}\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/src/main/resources/hello.xsd b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-jaxb/src/main/resources/hello.xsd
new file mode 100644 (file)
index 0000000..ae98d00
--- /dev/null
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema 
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:ns="http://collectionspace.org/hello"
+  xmlns="http://collectionspace.org/hello"
+  targetNamespace="http://collectionspace.org/hello"
+  version="0.1"
+>
+
+<!-- avoid XmlRootElement nightnmare, see http://weblogs.java.net/blog/kohsuke/archive/2006/03/why_does_jaxb_p.html-->
+    <xs:element name="person">
+        <xs:complexType>
+
+            <xs:sequence>
+                <xs:element name="firstName" type="xs:string"
+                                               minOccurs="1" />
+                <xs:element name="lastName" type="xs:string"
+                                               minOccurs="1" />
+                <xs:element name="street" type="xs:string"
+                                               minOccurs="1" />
+                <xs:element name="city" type="xs:string"
+                                               minOccurs="1" />
+                <xs:element name="state" type="xs:string"
+                                               minOccurs="1" />
+                <xs:element name="zip" type="xs:string"
+                                               minOccurs="1" />
+                <xs:element name="country" type="xs:string"
+                                               minOccurs="1" />
+            </xs:sequence>
+            <xs:attribute name="id" type="xs:long" />
+            <xs:attribute name="version" type="xs:int" />
+
+        </xs:complexType>
+    </xs:element>
+
+    
+    <!-- person short is returned by getPersons method -->
+    <xs:element name="persons">
+        <xs:complexType>
+            <xs:sequence>
+
+                <!-- person list item is returned by getPersons method -->
+                <xs:element name="person-list-item" maxOccurs="unbounded">
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="firstName" type="xs:string"
+                                               minOccurs="1" />
+                            <xs:element name="lastName" type="xs:string"
+                                               minOccurs="1" />
+                            <!-- uri to retrive person details -->
+                            <xs:element name="uri" type="xs:anyURI"
+                                               minOccurs="1" />
+                            <xs:element name="id" type="xs:long"
+                                               minOccurs="1" />
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+
+<!-- person-nuxeo uses both id and version as string -->
+    <xs:element name="person-nuxeo">
+        <xs:complexType>
+
+            <xs:sequence>
+                <xs:element name="id" type="xs:string" minOccurs="1" />
+                <xs:element name="version" type="xs:string" minOccurs="1" />
+                <xs:element name="firstName" type="xs:string" minOccurs="1" />
+                <xs:element name="lastName" type="xs:string" minOccurs="1" />
+                <xs:element name="street" type="xs:string" minOccurs="1" />
+                <xs:element name="city" type="xs:string" minOccurs="1" />
+                <xs:element name="state" type="xs:string" minOccurs="1" />
+                <xs:element name="zip" type="xs:string" minOccurs="1" />
+                <xs:element name="country" type="xs:string" minOccurs="1" />
+            </xs:sequence>
+
+        </xs:complexType>
+    </xs:element>
+
+
+    <!-- people as in nuxeo repository -->
+    <xs:element name="people">
+        <xs:complexType>
+            <xs:sequence>
+
+                <xs:element name="people-item" maxOccurs="unbounded">
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:element name="title" type="xs:string"
+                                               minOccurs="1" />
+                            <!-- uri to retrive person details -->
+                            <xs:element name="uri" type="xs:anyURI"
+                                               minOccurs="1" />
+                            <xs:element name="id" type="xs:string"
+                                               minOccurs="1" />
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="identifier">
+        <xs:complexType>
+
+            <xs:sequence>
+                <xs:element name="namespace" type="xs:string"
+                                               minOccurs="1" />
+                <xs:element name="value" type="xs:string"
+                                               minOccurs="0" />
+            </xs:sequence>
+            <xs:attribute name="id" type="xs:long" />
+            <xs:attribute name="version" type="xs:int" />
+
+        </xs:complexType>
+    </xs:element>
+
+    
+</xs:schema>
+
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/nb-configuration.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/nb-configuration.xml
new file mode 100644 (file)
index 0000000..6c3fe60
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<project-shared-configuration>\r
+    <!--
+This file contains additional configuration written by modules in the NetBeans IDE.
+The configuration is intended to be shared among all the users of project and
+therefore it is assumed to be part of version control checkout.
+Without this configuration present, some functionality in the IDE may be limited or fail altogether.
+-->\r
+    <properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">\r
+        <!--
+Properties that influence various parts of the IDE, especially code formatting and the like. 
+You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
+That way multiple projects can share the same settings (useful for formatting rules for example).
+Any value defined here will override the pom.xml file value but is only applicable to the current project.
+-->\r
+        <org-netbeans-modules-editor-indent.CodeStyle.usedProfile>default</org-netbeans-modules-editor-indent.CodeStyle.usedProfile>\r
+        <org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>8</org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>\r
+        <org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>80</org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>\r
+    </properties>\r
+</project-shared-configuration>\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/nbactions.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/nbactions.xml
new file mode 100644 (file)
index 0000000..047c73d
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<actions>\r
+        <action>\r
+            <actionName>rebuild</actionName>\r
+            <packagings>\r
+                <packaging>*</packaging>\r
+            </packagings>\r
+            <goals>\r
+                <goal>clean</goal>\r
+                <goal>install</goal>\r
+            </goals>\r
+            <properties>\r
+                <maven.test.skip>true</maven.test.skip>\r
+            </properties>\r
+        </action>\r
+        \r
+    </actions>\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/pom.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/pom.xml
new file mode 100644 (file)
index 0000000..52e29ad
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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">\r
+    <parent>\r
+        <artifactId>jaxrs-prototype</artifactId>\r
+        <groupId>org.collectionspace.hello.services</groupId>\r
+        <version>0.1</version>\r
+    </parent>\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <groupId>org.collectionspace.hello.services</groupId>\r
+    <artifactId>jaxrs-nuxeo-client</artifactId>\r
+    <packaging>jar</packaging>\r
+    <version>0.1</version>\r
+    <name>jaxrs-nuxeo-client</name>\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.collectionspace.hello.services</groupId>\r
+            <artifactId>jaxrs-jaxb</artifactId>\r
+            <version>0.1</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.testng</groupId>\r
+            <artifactId>testng</artifactId>\r
+            <version>5.6</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.slf4j</groupId>\r
+            <artifactId>slf4j-api</artifactId>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.slf4j</groupId>\r
+            <artifactId>slf4j-log4j12</artifactId>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.jboss.resteasy</groupId>\r
+            <artifactId>resteasy-jaxrs</artifactId>\r
+            <version>1.0.2.GA</version>\r
+            <!-- filter out unwanted jars -->\r
+            <exclusions>\r
+                <exclusion>\r
+                    <groupId>tjws</groupId>\r
+                    <artifactId>webserver</artifactId>\r
+                </exclusion>\r
+            </exclusions>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.jboss.resteasy</groupId>\r
+            <artifactId>resteasy-jaxb-provider</artifactId>\r
+            <version>1.0.2.GA</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.jboss.resteasy</groupId>\r
+            <artifactId>resteasy-multipart-provider</artifactId>\r
+            <version>1.0.2.GA</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>commons-httpclient</groupId>\r
+            <artifactId>commons-httpclient</artifactId>\r
+        </dependency>\r
+    </dependencies>\r
+    <build>\r
+        <plugins>\r
+            <plugin>\r
+                <artifactId>maven-compiler-plugin</artifactId>\r
+                <version>2.0.2</version>\r
+                <configuration>\r
+                    <source>1.5</source>\r
+                    <target>1.5</target>\r
+                </configuration>\r
+            </plugin>\r
+        </plugins>\r
+    </build>\r
+</project>\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/src/main/java/org/collectionspace/hello/client/CollectionSpaceClient.java b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/src/main/java/org/collectionspace/hello/client/CollectionSpaceClient.java
new file mode 100644 (file)
index 0000000..879800e
--- /dev/null
@@ -0,0 +1,34 @@
+package org.collectionspace.hello.client;\r
+\r
+import java.util.*;\r
+\r
+public abstract class CollectionSpaceClient {\r
+       static final String URL_PROPERTY = "org.collectionspace.url";\r
+       /*\r
+       static final String URL_PROPERTY_SCHEME = "org.collectionspace.url.schme";\r
+       static final String URL_PROPERTY_HOST = "org.collectionspace.url.host";\r
+       static final String URL_PROPERTY_PORT = "org.collectionspace.url.port";\r
+       static final String URL_PROPERTY_CONTEXT = "org.collectionspace.url.context";\r
+        */\r
+       \r
+       private static final String SCHEME = "http";\r
+       private static final String HOST = "localhost";\r
+       private static final String PORT = "8080";\r
+       private static final String URI = "/helloworld/cspace-nuxeo";\r
+       private static final String URL = SCHEME + "://" +\r
+               HOST + ":" +\r
+               PORT +\r
+               URI;\r
+       private String collectionSpaceURL = null;\r
+       \r
+       \r
+       String getURL() {\r
+               String result = collectionSpaceURL;\r
+               \r
+               if (collectionSpaceURL == null) {\r
+                       result = collectionSpaceURL = System.getProperty(URL_PROPERTY, URL);\r
+               }\r
+               \r
+               return result;\r
+       }\r
+}\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/src/test/resources/log4j.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/src/test/resources/log4j.xml
new file mode 100644 (file)
index 0000000..52121cb
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+       <appender name="console" class="org.apache.log4j.ConsoleAppender">
+               <param name="Target" value="System.out" />
+               <layout class="org.apache.log4j.TTCCLayout">
+                       <param name="DateFormat" value="ISO8601" />
+               </layout>
+       </appender>
+
+
+       <appender name="unit-tests"
+               class="org.apache.log4j.RollingFileAppender">
+               <param name="File" value="./target/unit-tests.log" />
+               <param name="MaxFileSize" value="10240KB" />
+               <param name="MaxBackupIndex" value="6" />
+               <layout class="org.apache.log4j.TTCCLayout">
+                       <param name="DateFormat" value="ISO8601" />
+               </layout>
+       </appender>
+
+       <logger name="org.apache.commons.httpclient" additivity="false">
+               <level value="warn" />
+               <appender-ref ref="console" />
+               <appender-ref ref="unit-tests" />
+       </logger>
+
+       <logger name="httpclient.wire" additivity="false">
+               <level value="info" />
+               <appender-ref ref="console" />
+               <appender-ref ref="unit-tests" />
+       </logger>
+
+       <root>
+               <priority value="debug" />
+               <appender-ref ref="console" />
+               <appender-ref ref="unit-tests" />
+       </root>
+
+</log4j:configuration>
+
+
+
+
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/temp-testng-customsuite.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-client/temp-testng-customsuite.xml
new file mode 100644 (file)
index 0000000..9f24806
--- /dev/null
@@ -0,0 +1,8 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="javaee-addressbook-client">
+  <test verbose="2" name="org.jboss.resteasy.examples.addressbook.client.AddressBookTest" annotations="JDK">
+    <classes>
+      <class name="org.jboss.resteasy.examples.addressbook.client.AddressBookTest"/>
+    </classes>
+  </test>
+</suite>
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/README.txt b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/README.txt
new file mode 100644 (file)
index 0000000..b1aa460
--- /dev/null
@@ -0,0 +1,14 @@
+Helloworld service interfacing with Nuxeo repository through Nuxeo
+REST apis.
+
+System Requirements:
+====================
+- Maven 2.0.9 or higher
+- Nuxeo CollectionSpace Extensions
+
+Building the project:
+====================
+In root directoy...
+1. customize build.properties for your environment
+2. mvn clean package
+3. ant
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/build.properties b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/build.properties
new file mode 100644 (file)
index 0000000..50c3738
--- /dev/null
@@ -0,0 +1,4 @@
+jboss.dir=C:/dev/jboss-4.2.3.GA\r
+nuxeo.dir=${jboss.dir}/server/default/deploy/nuxeo.ear/system\r
+nuxeo.local.repo.dir=file:///C:/dev/jboss-4.2.3.GA/server/default/deploy/nuxeo.ear/system\r
+nuxeo.local.repo.client.dir=file:///C:/dev/nuxeo/nuxeo-core/nuxeo-core-client/target\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/pom.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/pom.xml
new file mode 100644 (file)
index 0000000..5c8a077
--- /dev/null
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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">\r
+    <parent>\r
+        <artifactId>jaxrs-prototype</artifactId>\r
+        <groupId>org.collectionspace.hello.services</groupId>\r
+        <version>0.1</version>\r
+    </parent>\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <groupId>org.collectionspace.hello.services</groupId>\r
+    <artifactId>jaxrs-nuxeo-service</artifactId>\r
+    <packaging>war</packaging>\r
+    <version>0.1</version>\r
+    <name>jaxrs-nuxeo-service</name>\r
+\r
+    <repositories>\r
+        <repository>\r
+            <id>java.net</id>\r
+            <url>http://download.java.net/maven/1</url>\r
+            <layout>legacy</layout>\r
+        </repository>\r
+        <repository>\r
+            <id>maven repo</id>\r
+            <name>maven repo</name>\r
+            <url>http://repo1.maven.org/maven2/</url>\r
+        </repository>\r
+        <!-- For resteasy -->\r
+        <repository>\r
+            <id>jboss</id>\r
+            <name>jboss repo</name>\r
+            <url>http://repository.jboss.org/maven2</url>\r
+        </repository>\r
+        <repository>\r
+            <id>mojo</id>\r
+            <name>mojo repo</name>\r
+            <url>http://svn.codehaus.org/mojo/trunk/mojo/jboss-maven-plugin</url>\r
+        </repository>\r
+\r
+        <repository>\r
+            <id>maven-restlet</id>\r
+            <name>Public online Restlet repository</name>\r
+            <url>http://maven.restlet.org</url>\r
+        </repository>\r
+        \r
+        <repository>\r
+            <id>cspace.local.nuxeo</id>\r
+            <url>${nuxeo.local.repo.dir}</url>\r
+        </repository>\r
+        <repository>\r
+            <id>cspace.local.nuxeo.client</id>\r
+            <url>${nuxeo.local.repo.client.dir}</url>\r
+        </repository>\r
+        <repository>\r
+            <id>public</id>\r
+            <url>http://maven.nuxeo.org/public</url>\r
+            <releases>\r
+            </releases>\r
+            <snapshots>\r
+                <enabled>false</enabled>\r
+            </snapshots>\r
+        </repository>\r
+        <repository>\r
+            <id>public-snapshot</id>\r
+            <url>http://maven.nuxeo.org/public-snapshot</url>\r
+            <releases>\r
+                <enabled>false</enabled>\r
+            </releases>\r
+            <snapshots>\r
+            </snapshots>\r
+        </repository>\r
+\r
+\r
+    </repositories>\r
+\r
+    <pluginRepositories>\r
+        <pluginRepository>\r
+            <id>public</id>\r
+            <url>http://maven.nuxeo.org/public</url>\r
+            <name>Nuxeo virtual release repository</name>\r
+            <releases>\r
+            </releases>\r
+            <snapshots>\r
+                <enabled>false</enabled>\r
+            </snapshots>\r
+        </pluginRepository>\r
+        <pluginRepository>\r
+            <id>public-snapshot</id>\r
+            <url>http://maven.nuxeo.org/public-snapshot</url>\r
+            <name>Nuxeo virtual snapshot repository</name>\r
+            <releases>\r
+                <enabled>false</enabled>\r
+            </releases>\r
+            <snapshots>\r
+            </snapshots>\r
+        </pluginRepository>\r
+    </pluginRepositories>\r
+\r
+\r
+    <properties>\r
+        <jboss.version>4.2.3.GA</jboss.version>\r
+        <jboss.ejb.version>3.0</jboss.ejb.version>\r
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
+        <apacheds.version>1.5.1</apacheds.version>\r
+        <apachedshared.version>0.9.7</apachedshared.version>\r
+        <nuxeo.version.5.2>5.2-SNAPSHOT</nuxeo.version.5.2>\r
+        <nuxeo.version.1.5>1.5-SNAPSHOT</nuxeo.version.1.5>\r
+    </properties>\r
+\r
+\r
+    <dependencies>\r
+        <dependency>\r
+            <groupId>org.collectionspace.hello.services</groupId>\r
+            <artifactId>jaxrs-jaxb</artifactId>\r
+            <version>0.1</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.jboss.resteasy</groupId>\r
+            <artifactId>resteasy-jaxrs</artifactId>\r
+            <version>1.0.2.GA</version>\r
+            <exclusions>\r
+                <exclusion>\r
+                    <groupId>tjws</groupId>\r
+                    <artifactId>webserver</artifactId>\r
+                </exclusion>\r
+            </exclusions>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.jboss.resteasy</groupId>\r
+            <artifactId>resteasy-jaxb-provider</artifactId>\r
+            <version>1.0.2.GA</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>org.jboss.resteasy</groupId>\r
+            <artifactId>resteasy-multipart-provider</artifactId>\r
+            <version>1.0.2.GA</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>junit</groupId>\r
+            <artifactId>junit</artifactId>\r
+            <version>4.1</version>\r
+            <scope>test</scope>\r
+        </dependency>\r
+\r
+      <!-- javax -->\r
+\r
+\r
+        <dependency>\r
+            <groupId>javax.security</groupId>\r
+            <artifactId>jaas</artifactId>\r
+            <version>1.0.01</version>\r
+            <scope>provided</scope>\r
+        </dependency>\r
+\r
+        <dependency>\r
+            <groupId>dom4j</groupId>\r
+            <artifactId>dom4j</artifactId>\r
+            <version>1.6.1</version>\r
+            <scope>provided</scope>\r
+        </dependency>\r
+        \r
+        <!-- jboss -->\r
+\r
+        <!-- nuxeo -->\r
+\r
+        <dependency>\r
+            <groupId>org.nuxeo.ecm.core</groupId>\r
+            <artifactId>nuxeo-core-api</artifactId>\r
+            <version>${nuxeo.version.1.5}</version>\r
+            <exclusions>\r
+                <exclusion>\r
+                    <artifactId>jboss-remoting</artifactId>\r
+                    <groupId>jboss</groupId>\r
+                </exclusion>\r
+            </exclusions>\r
+        </dependency>\r
+\r
+<!--\r
+        <dependency>\r
+            <groupId>org.nuxeo.ecm.core</groupId>\r
+            <artifactId>nuxeo-core-client</artifactId>\r
+            <version>${nuxeo.version.1.5}</version>\r
+        </dependency>\r
+-->\r
+\r
+        <dependency>\r
+            <groupId>org.restlet</groupId>\r
+            <artifactId>org.restlet</artifactId>\r
+            <version>1.0.7</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>com.noelios.restlet</groupId>\r
+            <artifactId>com.noelios.restlet.ext.httpclient</artifactId>\r
+            <version>1.0.7</version>\r
+        </dependency>\r
+        <dependency>\r
+            <groupId>com.noelios.restlet</groupId>\r
+            <artifactId>com.noelios.restlet</artifactId>\r
+            <version>1.0.7</version>\r
+        </dependency>\r
+\r
+        <dependency>\r
+            <groupId>jaxen</groupId>\r
+            <artifactId>jaxen</artifactId>\r
+            <version>1.1.1</version>\r
+        </dependency>\r
+\r
+\r
+    </dependencies>\r
+    \r
+    <build>\r
+        <finalName>helloworld</finalName>\r
+        <plugins>\r
+            <plugin>\r
+                <groupId>org.codehaus.mojo</groupId>\r
+                <artifactId>jboss-maven-plugin</artifactId>\r
+                <configuration>\r
+                    <jbossHome>${jboss.dir}</jbossHome>\r
+                </configuration>\r
+                <executions>\r
+                    <execution>\r
+                        <id>jboss-undeploy</id>\r
+                        <phase>pre-integration-test</phase>\r
+                        <goals>\r
+                            <goal>undeploy</goal>\r
+                        </goals>\r
+                        <configuration>\r
+                            <fileName>${basedir}/target/helloworld.war</fileName>\r
+                        </configuration>\r
+                    </execution>\r
+                    <execution>\r
+                        <id>jboss-deploy</id>\r
+                        <phase>pre-integration-test</phase>\r
+                        <goals>\r
+                            <goal>deploy</goal>\r
+                        </goals>\r
+                        <configuration>\r
+                            <fileName>${basedir}/target/helloworld.war</fileName>\r
+                        </configuration>\r
+                    </execution>\r
+\r
+                </executions>\r
+            </plugin>\r
+\r
+            <plugin>\r
+                <groupId>org.apache.maven.plugins</groupId>\r
+                <artifactId>maven-surefire-plugin</artifactId>\r
+                <configuration></configuration>\r
+                <executions>\r
+                    <execution>\r
+                        <id>surefire-it</id>\r
+                        <phase>integration-test</phase>\r
+                        <goals>\r
+                            <goal>test</goal>\r
+                        </goals>\r
+                        <configuration>\r
+                            <skip>false</skip>\r
+                        </configuration>\r
+                    </execution>\r
+                </executions>\r
+            </plugin>\r
+            <plugin>\r
+                <groupId>org.apache.maven.plugins</groupId>\r
+                <artifactId>maven-war-plugin</artifactId>\r
+                <version>2.0</version>\r
+            </plugin>\r
+            <plugin>\r
+                <groupId>org.apache.maven.plugins</groupId>\r
+                <artifactId>maven-compiler-plugin</artifactId>\r
+                <configuration>\r
+                    <source>1.5</source>\r
+                    <target>1.5</target>\r
+                </configuration>\r
+            </plugin>\r
+        </plugins>\r
+    </build>\r
+</project>\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/CollectionSpaceResource.java b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/CollectionSpaceResource.java
new file mode 100644 (file)
index 0000000..b58739b
--- /dev/null
@@ -0,0 +1,24 @@
+package org.collectionspace.hello.services;\r
+\r
+import org.collectionspace.hello.services.nuxeo.NuxeoRESTClient;\r
+\r
+public abstract class CollectionSpaceResource {\r
+    //replace WORKSPACE_UID for resource workspace\r
+       static String CS_COLLECTIONOBJECT_WORKSPACE_UID = "5a37d40f-59c4-4d15-93ad-e0e6a0c33587";\r
+    //sanjay 6c7881fe-54c5-486e-b144-a025dee3a484\r
+    //demo eae0d7b6-580a-45a3-a0f3-e25e980e03bb\r
+       static String CS_PERSON_WORKSPACE_UID = "eae0d7b6-580a-45a3-a0f3-e25e980e03bb";\r
+       \r
+    //replace host if not running on localhost\r
+    //static String CS_NUXEO_HOST = "173.45.234.217";\r
+       static String CS_NUXEO_HOST = "localhost";\r
+    static String CS_NUXEO_URI = "http://" + CS_NUXEO_HOST + ":8080/nuxeo";\r
+    \r
+    NuxeoRESTClient getClient() {\r
+        NuxeoRESTClient nxClient = new NuxeoRESTClient(CS_NUXEO_URI);\r
+        nxClient.setAuthType(NuxeoRESTClient.AUTH_TYPE_BASIC);\r
+        nxClient.setBasicAuthentication("Administrator", "Administrator");\r
+        return nxClient;\r
+    }\r
+    \r
+}\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/HelloworldNuxeoApplication.java b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/HelloworldNuxeoApplication.java
new file mode 100644 (file)
index 0000000..98ae5b1
--- /dev/null
@@ -0,0 +1,27 @@
+package org.collectionspace.hello.services;
+
+import javax.ws.rs.core.Application;
+import java.util.HashSet;
+import java.util.Set;
+
+public class HelloworldNuxeoApplication extends Application {
+
+    private Set<Object> singletons = new HashSet<Object>();
+    private Set<Class<?>> empty = new HashSet<Class<?>>();
+
+    public HelloworldNuxeoApplication() {
+        singletons.add(new IdentifierResource());
+        singletons.add(new PersonNuxeoResource());
+        singletons.add(new MultipartResource());
+    }
+
+    @Override
+    public Set<Class<?>> getClasses() {
+        return empty;
+    }
+
+    @Override
+    public Set<Object> getSingletons() {
+        return singletons;
+    }
+}
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoCallback.java b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoCallback.java
new file mode 100644 (file)
index 0000000..8e78e00
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.collectionspace.hello.services.nuxeo;
+
+
+import javax.security.auth.callback.Callback;
+
+/**
+ * Copied from jbossx
+ *
+ * An implementation of Callback that simply obtains an Object to be used
+ * as the authentication credential. Interpretation of the Object is up to
+ * the LoginModules that validate the credential.
+ *
+ * @author  Scott.Stark@jboss.org
+ */
+public class NuxeoCallback implements Callback {
+
+    private final String prompt;
+
+    private Object credential;
+
+    public NuxeoCallback() {
+        this("");
+    }
+
+    public NuxeoCallback(String prompt) {
+        this.prompt = prompt;
+    }
+
+    public String getPrompt() {
+        return prompt;
+    }
+
+    public Object getCredential() {
+        return credential;
+    }
+
+    public void setCredential(Object credential) {
+        this.credential = credential;
+    }
+
+    public void clearCredential() {
+        credential = null;
+    }
+
+}
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoCallbackHandler.java b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoCallbackHandler.java
new file mode 100644 (file)
index 0000000..e8fff8c
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.collectionspace.hello.services.nuxeo;
+
+/**
+ *
+ * @author sanjaydalal
+ */
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+/**
+ * Copied from jbossx.
+ *
+ * @author Scott.Stark@jboss.org
+ */
+public class NuxeoCallbackHandler implements CallbackHandler {
+
+    private final String username;
+    private char[] password;
+    private final Object credential;
+
+    /**
+     * Initializes the UsernamePasswordHandler with the username and password to
+     * use.
+     *
+     * @param username the user name
+     * @param password the password for this user
+     */
+    public NuxeoCallbackHandler(String username, char[] password) {
+        this.username = username;
+        this.password = password;
+        credential = password;
+    }
+
+    public NuxeoCallbackHandler(String username, Object credential) {
+        this.username = username;
+        this.credential = credential;
+        if (credential instanceof char[]) {
+            password = (char[]) credential;
+        } else if (credential instanceof CharSequence) {
+            password = credential.toString().toCharArray();
+        }
+    }
+
+    /**
+     * Sets any NameCallback name property to the instance username, sets any
+     * PasswordCallback password property to the instance, and any password.
+     *
+     * @exception UnsupportedCallbackException,
+     *                thrown if any callback of type other than NameCallback or
+     *                PasswordCallback are seen.
+     */
+    public void handle(Callback[] callbacks)
+            throws UnsupportedCallbackException {
+        for (Callback c : callbacks) {
+            if (c instanceof NameCallback) {
+                NameCallback nc = (NameCallback) c;
+                nc.setName(username);
+            } else if (c instanceof PasswordCallback) {
+                PasswordCallback pc = (PasswordCallback) c;
+                if (password == null) {
+                    // We were given an opaque Object credential but a char[] is
+                    // requested?
+                    if (credential != null) {
+                        String tmp = credential.toString();
+                        password = tmp.toCharArray();
+                    }
+                }
+                pc.setPassword(password);
+            } else if (c instanceof NuxeoCallback) {
+                NuxeoCallback oc = (NuxeoCallback) c;
+                oc.setCredential(credential);
+            } else {
+                throw new UnsupportedCallbackException(c,
+                        "Unrecognized Callback");
+            }
+        }
+    }
+}
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoLoginConfiguration.java b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoLoginConfiguration.java
new file mode 100644 (file)
index 0000000..81cedc3
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.collectionspace.hello.services.nuxeo;
+
+/**
+ *
+ * @author sanjaydalal
+ */
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.security.auth.login.AppConfigurationEntry;
+import javax.security.auth.login.Configuration;
+import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
+
+public class NuxeoLoginConfiguration extends Configuration {
+
+    private final Configuration parent;
+    public static final String LOGIN_DOMAIN = "nuxeo-client-login";
+
+    public NuxeoLoginConfiguration(Configuration parent) {
+        this.parent = parent;
+    }
+
+    @Override
+    public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
+
+        if (LOGIN_DOMAIN.equals(name)) {
+            AppConfigurationEntry[] entries = new AppConfigurationEntry[1];
+
+            Map<String, Object> options = new HashMap<String, Object>();
+
+            options.put("restore-login-identity", "True");
+            options.put("multi-threaded", "True");
+
+            entries[0] = new AppConfigurationEntry("org.jboss.security.ClientLoginModule", LoginModuleControlFlag.REQUIRED, options);
+
+
+            return entries;
+        } else {
+            return parent.getAppConfigurationEntry(name);
+        }
+    }
+
+    @Override
+    public void refresh() {
+        if (parent != null) {
+            parent.refresh();
+        }
+    }
+}
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoLoginContextFactory.java b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoLoginContextFactory.java
new file mode 100644 (file)
index 0000000..d1d23f7
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.collectionspace.hello.services.nuxeo;
+
+/**
+ *
+ * @author sanjaydalal
+ */
+
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.login.Configuration;
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
+
+public class NuxeoLoginContextFactory {
+
+
+    private static boolean initDone=false;
+
+    private static void initLoginConfig()
+    {
+        if (initDone)
+            return;
+
+        Configuration parentConfig = null;
+        try {
+            parentConfig = Configuration.getConfiguration();
+        } catch (Exception e) {
+            // do nothing - this can happen if default configuration provider is not correctly configured
+            // for examnple FileConfig fails if no config file was defined
+        }
+        Configuration config = new NuxeoLoginConfiguration(parentConfig);
+        Configuration.setConfiguration(config);
+
+        initDone=true;
+
+    }
+
+
+    public static LoginContext getLoginContext(CallbackHandler handler) throws LoginException
+    {
+        initLoginConfig();
+        return  new LoginContext(NuxeoLoginConfiguration.LOGIN_DOMAIN, handler);
+    }
+}
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoRESTClient.java b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/NuxeoRESTClient.java
new file mode 100644 (file)
index 0000000..9f76f7b
--- /dev/null
@@ -0,0 +1,313 @@
+/*
+ * (C) Copyright 2006-2007 Nuxeo SAS (http://nuxeo.com/) and contributors.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Lesser General Public License
+ * (LGPL) version 2.1 which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * Contributors:
+ *     Nuxeo - initial API and implementation
+ *
+ * $Id: JOOoConvertPluginImpl.java 18651 2007-05-13 20:28:53Z sfermigier $
+ */
+package org.collectionspace.hello.services.nuxeo;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.List;
+import java.util.Map;
+
+
+import org.restlet.Client;
+import org.restlet.data.ChallengeResponse;
+import org.restlet.data.ChallengeScheme;
+import org.restlet.data.Cookie;
+import org.restlet.data.Form;
+import org.restlet.data.MediaType;
+import org.restlet.data.Method;
+import org.restlet.data.Parameter;
+import org.restlet.data.Protocol;
+import org.restlet.data.Request;
+import org.restlet.resource.OutputRepresentation;
+import org.restlet.resource.Representation;
+import org.restlet.util.Series;
+
+public class NuxeoRESTClient {
+
+    public static final int AUTH_TYPE_NONE = 0;
+    public static final int AUTH_TYPE_BASIC = 1;
+    public static final int AUTH_TYPE_SECRET = 2;
+    protected String baseURL = "http://127.0.0.1:8080/nuxeo";
+    protected String restPrefix = "restAPI";
+    protected String davPrefix = "dav";
+    protected List<Cookie> cookies;
+    protected int authType = AUTH_TYPE_NONE;
+    protected String userName;
+    protected String password;
+    protected String secretToken;
+    protected Client restClient;
+
+    public NuxeoRESTClient(String baseURL) {
+        this.baseURL = baseURL;
+    }
+
+    public NuxeoRESTClient(String protocol, String serverIP, String serverPort) {
+        this(protocol, serverIP, serverPort, "nuxeo");
+    }
+
+    public NuxeoRESTClient(String protocol, String serverIP, String serverPort,
+            String servletPath) {
+        StringBuffer sb = new StringBuffer();
+        sb.append(protocol);
+        sb.append("://");
+        sb.append(serverIP);
+        if (serverPort != null && !serverIP.equals("80")) {
+            sb.append(':');
+            sb.append(serverPort);
+        }
+        sb.append(servletPath);
+        sb.append('/');
+        baseURL = sb.toString();
+    }
+
+    public void setBasicAuthentication(String userName, String password) {
+        authType = AUTH_TYPE_BASIC;
+        this.userName = userName;
+        this.password = password;
+    }
+
+    public void setSharedSecretAuthentication(String userName,
+            String secretToken) {
+        authType = AUTH_TYPE_SECRET;
+        this.userName = userName;
+        this.secretToken = secretToken;
+    }
+
+    public void setCookies(List<Cookie> cookies) {
+        this.cookies = cookies;
+    }
+
+    public Representation post(List<String> pathParams,
+            Map<String, String> queryParams, InputStream istream) {
+        String path = "";
+        StringBuffer pathBuffer = new StringBuffer();
+
+        if (pathParams != null) {
+            for (String p : pathParams) {
+                pathBuffer.append(p);
+                pathBuffer.append('/');
+            }
+            path = pathBuffer.toString();
+        }
+
+        return post(path, queryParams, istream);
+    }
+
+    public Representation post(String subPath,
+            Map<String, String> queryParams, InputStream istream) {
+        StringBuffer urlBuffer = new StringBuffer();
+
+        if (subPath.startsWith("/")) {
+            subPath = subPath.substring(1);
+        }
+        if (subPath.endsWith("/")) {
+            subPath = subPath.substring(0, subPath.length() - 1);
+        }
+
+        urlBuffer.append(baseURL);
+        urlBuffer.append('/');
+        urlBuffer.append(restPrefix);
+        urlBuffer.append('/');
+        urlBuffer.append(subPath);
+
+        if (queryParams != null) {
+            urlBuffer.append('?');
+            
+            String qpValue = null;
+            for (String qpName : queryParams.keySet()) {
+                urlBuffer.append(qpName);
+                urlBuffer.append('=');
+                qpValue = queryParams.get(qpName);
+                if (qpValue != null) {
+                       urlBuffer.append(qpValue.replaceAll(" ", "%20"));
+                }
+                urlBuffer.append('&');
+            }
+        }
+
+        String completeURL = urlBuffer.toString();
+        System.out.println("\nNuxeoRESTClient: calling " + completeURL);
+        Request request = new Request(Method.POST, completeURL);
+
+        setupAuth(request);
+        setupCookies(request);
+        final InputStream in = istream;
+        request.setEntity(new OutputRepresentation(
+                MediaType.MULTIPART_FORM_DATA) {
+
+            @Override
+            public void write(OutputStream outputStream) throws IOException {
+                byte[] buffer = new byte[1024 * 64];
+                int read;
+                while ((read = in.read(buffer)) != -1) {
+                    outputStream.write(buffer, 0, read);
+                }
+
+            }
+        });
+
+        return getRestClient().handle(request).getEntity();
+    }
+
+    public Representation get(List<String> pathParams,
+            Map<String, String> queryParams) {
+        String path = "";
+        StringBuffer pathBuffer = new StringBuffer();
+
+        if (pathParams != null) {
+            for (String p : pathParams) {
+                pathBuffer.append(p);
+                pathBuffer.append('/');
+            }
+            path = pathBuffer.toString();
+        }
+
+        return get(path, queryParams);
+    }
+
+    public Representation get(String subPath,
+            Map<String, String> queryParams) {
+        StringBuffer urlBuffer = new StringBuffer();
+
+        if (subPath.startsWith("/")) {
+            subPath = subPath.substring(1);
+        }
+        if (subPath.endsWith("/")) {
+            subPath = subPath.substring(0, subPath.length() - 1);
+        }
+
+        urlBuffer.append(baseURL);
+        urlBuffer.append('/');
+        urlBuffer.append(restPrefix);
+        urlBuffer.append('/');
+        urlBuffer.append(subPath);
+
+        if (queryParams != null) {
+            urlBuffer.append('?');
+            for (String qpName : queryParams.keySet()) {
+                urlBuffer.append(qpName);
+                urlBuffer.append('=');
+                urlBuffer.append(queryParams.get(qpName).replaceAll(" ", "%20"));
+                urlBuffer.append('&');
+            }
+        }
+
+        String completeURL = urlBuffer.toString();
+        System.out.println("\nNuxeoRESTClient: calling " + completeURL);
+        Request request = new Request(Method.GET, completeURL);
+        setupAuth(request);
+        setupCookies(request);
+
+        return getRestClient().handle(request).getEntity();
+    }
+
+    protected void setupAuth(Request request) {
+
+        if (authType == AUTH_TYPE_BASIC) {
+            ChallengeScheme scheme = ChallengeScheme.HTTP_BASIC;
+            ChallengeResponse authentication = new ChallengeResponse(scheme,
+                    userName, password);
+            request.setChallengeResponse(authentication);
+
+        } else if (authType == AUTH_TYPE_SECRET) {
+            Series<Parameter> additionnalHeaders = new Form();
+
+            Map<String, String> securityHeaders = PortalSSOAuthenticationProvider.getHeaders(
+                    secretToken, userName);
+
+            for (String hn : securityHeaders.keySet()) {
+                additionnalHeaders.add(hn, securityHeaders.get(hn));
+            }
+
+            request.getAttributes().put("org.restlet.http.headers",
+                    additionnalHeaders);
+        }
+    }
+
+    protected void setupCookies(Request request) {
+        if (cookies != null) {
+            request.getCookies().clear();
+            for (Cookie cookie : cookies) {
+                request.getCookies().add(cookie);
+            }
+        }
+
+    }
+
+    protected Client getRestClient() {
+        if (restClient == null) {
+            if (baseURL.startsWith("https")) {
+                restClient = new Client(Protocol.HTTPS);
+            } else {
+                restClient = new Client(Protocol.HTTP);
+            }
+        }
+
+        return restClient;
+    }
+
+    public int getAuthType() {
+        return authType;
+    }
+
+    public void setAuthType(int authType) {
+        this.authType = authType;
+    }
+
+    public String getDavPrefix() {
+        return davPrefix;
+    }
+
+    public void setDavPrefix(String davPrefix) {
+        this.davPrefix = davPrefix;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getRestPrefix() {
+        return restPrefix;
+    }
+
+    public void setRestPrefix(String restPrefix) {
+        this.restPrefix = restPrefix;
+    }
+
+    public String getSecretToken() {
+        return secretToken;
+    }
+
+    public void setSecretToken(String secretToken) {
+        this.secretToken = secretToken;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+}
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/PortalSSOAuthenticationProvider.java b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/java/org/collectionspace/hello/services/nuxeo/PortalSSOAuthenticationProvider.java
new file mode 100644 (file)
index 0000000..ef1a61a
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * (C) Copyright 2006-2007 Nuxeo SAS (http://nuxeo.com/) and contributors.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Lesser General Public License
+ * (LGPL) version 2.1 which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * Contributors:
+ *     Nuxeo - initial API and implementation
+ *
+ * $Id: JOOoConvertPluginImpl.java 18651 2007-05-13 20:28:53Z sfermigier $
+ */
+
+package org.collectionspace.hello.services.nuxeo;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
+
+import com.noelios.restlet.util.Base64;
+
+public class PortalSSOAuthenticationProvider {
+
+    private static final String TOKEN_SEP = ":";
+
+    private static final String TS_HEADER = "NX_TS";
+
+    private static final String RANDOM_HEADER = "NX_RD";
+
+    private static final String TOKEN_HEADER = "NX_TOKEN";
+
+    private static final String USER_HEADER = "NX_USER";
+
+    public static Map<String, String> getHeaders(String secretKey,
+            String userName) {
+
+        Map<String, String> headers = new HashMap<String, String>();
+
+        Date timestamp = new Date();
+        int randomData = new Random(timestamp.getTime()).nextInt();
+
+        String clearToken = timestamp.getTime() + TOKEN_SEP + randomData
+                + TOKEN_SEP + secretKey + TOKEN_SEP + userName;
+
+        byte[] hashedToken;
+
+        try {
+            hashedToken = MessageDigest.getInstance("MD5").digest(
+                    clearToken.getBytes());
+        } catch (NoSuchAlgorithmException e) {
+            return null;
+        }
+
+        String base64HashedToken = Base64.encodeBytes(hashedToken);
+
+        headers.put(TS_HEADER, String.valueOf(timestamp.getTime()));
+        headers.put(RANDOM_HEADER, String.valueOf(randomData));
+        headers.put(TOKEN_HEADER, base64HashedToken);
+        headers.put(USER_HEADER, userName);
+
+        return headers;
+    }
+
+}
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/resources/jndi.properties b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/resources/jndi.properties
new file mode 100644 (file)
index 0000000..a3aa407
--- /dev/null
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=jnp://localhost:1099
\ No newline at end of file
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/resources/nuxeo.properties b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/resources/nuxeo.properties
new file mode 100644 (file)
index 0000000..3c9d5af
--- /dev/null
@@ -0,0 +1,2 @@
+org.nuxeo.runtime.server.enabled=false
+org.nuxeo.runtime.streaming.isServer=false
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/webapp/WEB-INF/web.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-nuxeo-service/src/main/webapp/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..0c188a4
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">\r
+<web-app>\r
+    <display-name>HelloworldNuxeo</display-name>\r
+\r
+    <context-param>\r
+        <param-name>javax.ws.rs.Application</param-name>\r
+        <param-value>org.collectionspace.hello.services.HelloworldNuxeoApplication</param-value>\r
+    </context-param>\r
+\r
+    <context-param>\r
+        <param-name>resteasy.servlet.mapping.prefix</param-name>\r
+        <param-value>/cspace-nuxeo</param-value>\r
+    </context-param>\r
+\r
+    <listener>\r
+        <listener-class>\r
+            org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap\r
+        </listener-class>\r
+    </listener>\r
+\r
+    <servlet>\r
+        <servlet-name>Resteasy</servlet-name>\r
+        <servlet-class>\r
+            org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher\r
+        </servlet-class>\r
+    </servlet>\r
+\r
+    <servlet-mapping>\r
+        <servlet-name>Resteasy</servlet-name>\r
+        <url-pattern>/cspace-nuxeo/*</url-pattern>\r
+    </servlet-mapping>\r
+\r
+</web-app>\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/build.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/build.xml
new file mode 100644 (file)
index 0000000..cdba863
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<project name="helloworld" default="deploy" basedir=".">
+
+  <property file="build.properties" />
+
+
+  <target name="deploy" description="Deploy">
+    <copy todir="${jboss.dir}/server/default/deploy">
+      <fileset file="${basedir}/target/helloworld.war" />
+    </copy>
+  </target>
+
+</project>
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/nb-configuration.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/nb-configuration.xml
new file mode 100644 (file)
index 0000000..3e5cd98
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<project-shared-configuration>\r
+    <!--
+This file contains additional configuration written by modules in the NetBeans IDE.
+The configuration is intended to be shared among all the users of project and
+therefore it is assumed to be part of version control checkout.
+Without this configuration present, some functionality in the IDE may be limited or fail altogether.
+-->\r
+    <properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">\r
+        <!--
+Properties that influence various parts of the IDE, especially code formatting and the like. 
+You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
+That way multiple projects can share the same settings (useful for formatting rules for example).
+Any value defined here will override the pom.xml file value but is only applicable to the current project.
+-->\r
+        <org-netbeans-modules-editor-indent.CodeStyle.usedProfile>default</org-netbeans-modules-editor-indent.CodeStyle.usedProfile>\r
+        <org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>8</org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>\r
+        <org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>80</org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>\r
+        <netbeans.hint.useExternalMaven>false</netbeans.hint.useExternalMaven>\r
+    </properties>\r
+</project-shared-configuration>\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/nbactions.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/nbactions.xml
new file mode 100644 (file)
index 0000000..9d30c23
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<actions>\r
+        <action>\r
+            <actionName>test</actionName>\r
+            <packagings>\r
+                <packaging>*</packaging>\r
+            </packagings>\r
+            <goals>\r
+                <goal>test</goal>\r
+            </goals>\r
+        </action>\r
+        <action>\r
+            <actionName>build</actionName>\r
+            <packagings>\r
+                <packaging>*</packaging>\r
+            </packagings>\r
+            <goals>\r
+                <goal>install</goal>\r
+            </goals>\r
+        </action>\r
+        <action>\r
+            <actionName>clean</actionName>\r
+            <packagings>\r
+                <packaging>*</packaging>\r
+            </packagings>\r
+            <goals>\r
+                <goal>clean</goal>\r
+            </goals>\r
+        </action>\r
+        <action>\r
+            <actionName>rebuild</actionName>\r
+            <packagings>\r
+                <packaging>*</packaging>\r
+            </packagings>\r
+            <goals>\r
+                <goal>clean</goal>\r
+                <goal>install</goal>\r
+            </goals>\r
+            <properties>\r
+                <maven.test.skip>true</maven.test.skip>\r
+            </properties>\r
+        </action>\r
+        <action>\r
+            <actionName>run</actionName>\r
+            <packagings>\r
+                <packaging>war</packaging>\r
+                <packaging>ear</packaging>\r
+                <packaging>ejb</packaging>\r
+            </packagings>\r
+            <goals>\r
+                <goal>package</goal>\r
+            </goals>\r
+            <properties>\r
+                \r
+                <netbeans.deploy>true</netbeans.deploy>\r
+            </properties>\r
+        </action>\r
+        <action>\r
+            <actionName>debug</actionName>\r
+            <packagings>\r
+                <packaging>war</packaging>\r
+                <packaging>ear</packaging>\r
+                <packaging>ejb</packaging>\r
+            </packagings>\r
+            <goals>\r
+                <goal>package</goal>\r
+            </goals>\r
+            <properties>\r
+                \r
+                <netbeans.deploy>true</netbeans.deploy>\r
+                <netbeans.deploy.debugmode>true</netbeans.deploy.debugmode>\r
+            </properties>\r
+        </action>\r
+    </actions>\r
similarity index 94%
rename from HelloWorld/HelloWorldService/pom.xml
rename to sandbox/sanjay/prototypes/jaxrs-prototype/jaxrs-service/pom.xml
index b9e0b3da43a819ded81be9d2e2b0e7c4ad37ee4d..891e055d9a8c01a0d0825aa0d92afbdb6df0ec88 100644 (file)
@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <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">\r
     <parent>\r
-        <artifactId>helloworld</artifactId>\r
+        <artifactId>jaxrs-prototype</artifactId>\r
         <groupId>org.collectionspace.hello.services</groupId>\r
         <version>0.1</version>\r
     </parent>\r
     <modelVersion>4.0.0</modelVersion>\r
     <groupId>org.collectionspace.hello.services</groupId>\r
-    <artifactId>helloworld-service</artifactId>\r
+    <artifactId>jaxrs-service</artifactId>\r
     <packaging>war</packaging>\r
     <version>0.1</version>\r
-    <name>Helloworld Service</name>\r
+    <name>jaxrs-service</name>\r
 \r
     <repositories>\r
         <repository>\r
@@ -39,7 +39,7 @@
     <dependencies>\r
         <dependency>\r
             <groupId>org.collectionspace.hello.services</groupId>\r
-            <artifactId>helloworld-jaxb</artifactId>\r
+            <artifactId>jaxrs-jaxb</artifactId>\r
             <version>0.1</version>\r
         </dependency>\r
         <dependency>\r
diff --git a/sandbox/sanjay/prototypes/jaxrs-prototype/pom.xml b/sandbox/sanjay/prototypes/jaxrs-prototype/pom.xml
new file mode 100644 (file)
index 0000000..28508a1
--- /dev/null
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<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">\r
+\r
+    <modelVersion>4.0.0</modelVersion>\r
+    <groupId>org.collectionspace.hello.services</groupId>\r
+    <version>0.1</version>\r
+    <artifactId>jaxrs-prototype</artifactId>\r
+    <packaging>pom</packaging>\r
+    <name>jaxrs-prototype</name>\r
+    <modules>\r
+        <module>jaxrs-jaxb</module>\r
+        <module>jaxrs-service</module>\r
+        <module>jaxrs-client</module>\r
+        <module>jaxrs-nuxeo-service</module>\r
+        <module>jaxrs-nuxeo-client</module>\r
+    </modules>\r
+    <repositories>\r
+        <repository>\r
+            <id>jboss</id>\r
+            <url>http://repository.jboss.org/maven2</url>\r
+        </repository>\r
+        <repository>\r
+            <id>sun</id>\r
+            <url>http://download.java.net/maven/2</url>\r
+        </repository>\r
+        <repository>\r
+            <id>java.net</id>\r
+            <name>java.net Maven Repository</name>\r
+            <url>https://maven-repository.dev.java.net/nonav/repository</url>\r
+            <layout>legacy</layout>\r
+        </repository>\r
+        <repository>\r
+            <id>maven2-repository.dev.java.net</id>\r
+            <name>Java.net Maven 2 Repository</name>\r
+            <url>http://download.java.net/maven/2</url>\r
+        </repository>\r
+    </repositories>\r
+    <pluginRepositories>\r
+\r
+        <pluginRepository>\r
+            <id>java.net</id>\r
+            <name>java.net Maven Repository</name>\r
+            <url>https://maven-repository.dev.java.net/nonav/repository</url>\r
+            <layout>legacy</layout>\r
+        </pluginRepository>\r
+        <pluginRepository>\r
+            <id>maven2-repository.dev.java.net</id>\r
+            <name>Java.net Maven 2 Repository</name>\r
+            <url>http://download.java.net/maven/2</url>\r
+        </pluginRepository>\r
+    </pluginRepositories>\r
+\r
+    <build>\r
+        <pluginManagement>\r
+            <plugins>\r
+                <plugin>\r
+                    <groupId>org.apache.maven.plugins</groupId>\r
+                    <artifactId>maven-compiler-plugin</artifactId>\r
+                    <configuration>\r
+                        <source>1.5</source>\r
+                        <target>1.5</target>\r
+                    </configuration>\r
+                </plugin>\r
+                <plugin>\r
+                    <groupId>org.apache.maven.plugins</groupId>\r
+                    <artifactId>maven-site-plugin</artifactId>\r
+                    <configuration>\r
+                        <unzipCommand>/usr/bin/unzip -o &gt; err.txt</unzipCommand>\r
+                    </configuration>\r
+                </plugin>\r
+                <plugin>\r
+                    <groupId>org.apache.maven.plugins</groupId>\r
+                    <artifactId>maven-war-plugin</artifactId>\r
+                    <version>2.0.1</version>\r
+                    <configuration>\r
+\r
+                        <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>\r
+                        <archive>\r
+                            <manifest>\r
+                                <addClasspath>true</addClasspath>\r
+\r
+                            </manifest>\r
+                        </archive>\r
+                    </configuration>\r
+                </plugin>\r
+\r
+            </plugins>\r
+        </pluginManagement>\r
+    </build>\r
+    <dependencyManagement>\r
+        <dependencies>\r
+            <dependency>\r
+                <groupId>net.java.dev.jaxb2-commons</groupId>\r
+                <artifactId>jaxb-fluent-api</artifactId>\r
+                <version>2.0.1</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.testng</groupId>\r
+                <artifactId>testng</artifactId>\r
+                <version>5.6</version>\r
+                <scope>test</scope>\r
+                <classifier>jdk15</classifier>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.jboss.resteasy</groupId>\r
+                <artifactId>jaxrs-api</artifactId>\r
+                <version>1.0.2.GA</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>net.java.dev.jaxb2-commons</groupId>\r
+                <artifactId>jaxb-fluent-api</artifactId>\r
+                <version>2.0.1</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.jvnet.jaxb2-commons</groupId>\r
+                <artifactId>property-listener-injector</artifactId>\r
+                <version>1.0</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.jvnet.jaxb2_commons</groupId>\r
+                <artifactId>runtime</artifactId>\r
+                <version>0.4.1</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.jboss.resteasy</groupId>\r
+                <artifactId>resteasy-jaxrs</artifactId>\r
+                <version>1.0.2.GA</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>commons-httpclient</groupId>\r
+                <artifactId>commons-httpclient</artifactId>\r
+                <version>3.1</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>com.sun.xml.bind</groupId>\r
+                <artifactId>jaxb-impl</artifactId>\r
+                <version>2.1.7</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.testng</groupId>\r
+                <artifactId>testng</artifactId>\r
+                <version>5.6</version>\r
+                <scope>test</scope>\r
+                <classifier>jdk15</classifier>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.slf4j</groupId>\r
+                <artifactId>slf4j-api</artifactId>\r
+                <version>1.5.2</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>org.slf4j</groupId>\r
+                <artifactId>slf4j-log4j12</artifactId>\r
+                <version>1.5.2</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>mysql</groupId>\r
+                <artifactId>mysql-connector-java</artifactId>\r
+                <version>5.1.5</version>\r
+                <scope>test</scope>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>com.jgoodies</groupId>\r
+                <artifactId>binding</artifactId>\r
+                <version>2.0.2</version>\r
+            </dependency>\r
+            <dependency>\r
+                <groupId>com.jgoodies</groupId>\r
+                <artifactId>forms</artifactId>\r
+                <version>1.2.0</version>\r
+            </dependency>\r
+        </dependencies>\r
+    </dependencyManagement>\r
+</project>\r