>
<!-- 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>
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();
public HelloworldNuxeoApplication() {
singletons.add(new CollectionObjectResource());
singletons.add(new DomainIdentifierResource());
- singletons.add(new IdentifierResource());
- singletons.add(new PersonNuxeoResource());
- singletons.add(new MultipartResource());
}
@Override
-<?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 > 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 > 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
<?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
<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>
--- /dev/null
+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
+
--- /dev/null
+<?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>
--- /dev/null
+<?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>
+
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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>
+
--- /dev/null
+#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
--- /dev/null
+<?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
--- /dev/null
+<?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
--- /dev/null
+<?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
--- /dev/null
+<?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>
+
+
+
+
--- /dev/null
+<!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>
--- /dev/null
+<?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
--- /dev/null
+<?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>
--- /dev/null
+/**\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
--- /dev/null
+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
--- /dev/null
+<?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>
+
--- /dev/null
+<?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
--- /dev/null
+<?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
--- /dev/null
+<?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
--- /dev/null
+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
--- /dev/null
+<?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>
+
+
+
+
--- /dev/null
+<!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>
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+<?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
--- /dev/null
+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
--- /dev/null
+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;
+ }
+}
--- /dev/null
+/*
+ * 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;
+ }
+
+}
--- /dev/null
+/*
+ * 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");
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * 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();
+ }
+ }
+}
--- /dev/null
+/*
+ * 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);
+ }
+}
--- /dev/null
+/*
+ * (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;
+ }
+}
--- /dev/null
+/*
+ * (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;
+ }
+
+}
--- /dev/null
+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
--- /dev/null
+org.nuxeo.runtime.server.enabled=false
+org.nuxeo.runtime.streaming.isServer=false
--- /dev/null
+<?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
--- /dev/null
+<?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>
--- /dev/null
+<?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
--- /dev/null
+<?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
<?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
<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
--- /dev/null
+<?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 > 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