]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
DRYD-944: Create insurance/indemnity procedure
authorMichael Ritter <emericaskate15@gmail.com>
Wed, 24 Feb 2021 19:05:31 +0000 (12:05 -0700)
committerMichael Ritter <emericaskate15@gmail.com>
Mon, 22 Mar 2021 18:10:58 +0000 (12:10 -0600)
24 files changed:
services/JaxRsServiceProvider/pom.xml
services/JaxRsServiceProvider/src/main/java/org/collectionspace/services/jaxrs/CollectionSpaceJaxRsApplication.java
services/common/src/main/resources/db/postgresql/load_id_generators.sql
services/insurance/3rdparty/build.xml [new file with mode: 0644]
services/insurance/3rdparty/nuxeo-platform-cs-insurance/build.xml [new file with mode: 0644]
services/insurance/3rdparty/nuxeo-platform-cs-insurance/pom.xml [new file with mode: 0644]
services/insurance/3rdparty/nuxeo-platform-cs-insurance/src/main/resources/OSGI-INF/README.txt [new file with mode: 0644]
services/insurance/3rdparty/nuxeo-platform-cs-insurance/src/main/resources/schemas/README.txt [new file with mode: 0644]
services/insurance/3rdparty/pom.xml [new file with mode: 0644]
services/insurance/build.xml [new file with mode: 0644]
services/insurance/client/pom.xml [new file with mode: 0644]
services/insurance/client/src/main/java/org/collectionspace/services/client/InsuranceClient.java [new file with mode: 0644]
services/insurance/client/src/main/java/org/collectionspace/services/client/InsuranceProxy.java [new file with mode: 0644]
services/insurance/jaxb/pom.xml [new file with mode: 0644]
services/insurance/jaxb/src/main/java/org/collectionspace/services/InsuranceJAXBSchema.java [new file with mode: 0644]
services/insurance/jaxb/src/main/java/org/collectionspace/services/InsuranceListItemJAXBSchema.java [new file with mode: 0644]
services/insurance/jaxb/src/main/resources/insurances_common.xsd [new file with mode: 0644]
services/insurance/pom.xml [new file with mode: 0644]
services/insurance/service/pom.xml [new file with mode: 0644]
services/insurance/service/src/main/java/org/collectionspace/services/insurance/InsuranceResource.java [new file with mode: 0644]
services/insurance/service/src/main/java/org/collectionspace/services/insurance/nuxeo/InsuranceConstants.java [new file with mode: 0644]
services/insurance/service/src/main/java/org/collectionspace/services/insurance/nuxeo/InsuranceDocumentModelHandler.java [new file with mode: 0644]
services/insurance/service/src/main/java/org/collectionspace/services/insurance/nuxeo/InsuranceValidatorHandler.java [new file with mode: 0644]
services/pom.xml

index 5347caf72c3f24baa088278577324fca7c5a7efd..ff435a65ee3b726fbce0050982401810ae3c3ea3 100644 (file)
             <artifactId>org.collectionspace.services.id.service</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+          <groupId>org.collectionspace.services</groupId>
+          <artifactId>org.collectionspace.services.insurance.service</artifactId>
+          <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.intake.service</artifactId>
index 414eab9e8e4d6da4c55aaca2daa4b964166b8221..a67670a6ba7fbdd45002418f74f1bcd15d3e0526 100644 (file)
@@ -27,6 +27,7 @@ import org.collectionspace.services.account.TenantResource;
 import org.collectionspace.services.blob.BlobResource;
 import org.collectionspace.services.collectionobject.CollectionObjectResource;
 import org.collectionspace.services.id.IDResource;
+import org.collectionspace.services.insurance.InsuranceResource;
 import org.collectionspace.services.media.MediaResource;
 import org.collectionspace.services.group.GroupResource;
 import org.collectionspace.services.intake.IntakeResource;
@@ -132,6 +133,7 @@ public class CollectionSpaceJaxRsApplication extends Application
         addResourceToMapAndSingletons(new ContactResource());
         addResourceToMapAndSingletons(new CollectionObjectResource());
         addResourceToMapAndSingletons(new GroupResource());
+        addResourceToMapAndSingletons(new InsuranceResource());
         addResourceToMapAndSingletons(new IntakeResource());
         addResourceToMapAndSingletons(new DimensionResource());
         addResourceToMapAndSingletons(new RelationResource());
index 22bc96f559ee83c6b8d6943c4b6b9c57c0cd7393..22a36a18d9b860ecd4dc1b84b2016f4add222123 100644 (file)
@@ -982,4 +982,75 @@ INSERT INTO id_generators
         (
         SELECT  csid
         FROM    id_generators
-        );
\ No newline at end of file
+        );
+-- INSURANCE_REFERENCE_NUMBER
+
+INSERT INTO id_generators
+    (csid, displayname, description, priority, last_generated_id, id_generator_state)
+  SELECT
+     'e6f52346-0d2c-4b68-8a35-0a27dad2f3f4',
+     'Insurance Reference Number',
+     'Identifies an insurance.',
+     '9',
+     '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+  <parts>
+    <org.collectionspace.services.id.StringIDGeneratorPart>
+      <initialValue>INS</initialValue>
+      <currentValue>INS</currentValue>
+    </org.collectionspace.services.id.StringIDGeneratorPart>
+    <org.collectionspace.services.id.YearIDGeneratorPart>
+      <currentValue></currentValue>
+    </org.collectionspace.services.id.YearIDGeneratorPart>
+    <org.collectionspace.services.id.StringIDGeneratorPart>
+      <initialValue>.</initialValue>
+      <currentValue>.</currentValue>
+    </org.collectionspace.services.id.StringIDGeneratorPart>
+    <org.collectionspace.services.id.NumericIDGeneratorPart>
+      <maxLength>6</maxLength>
+      <initialValue>1</initialValue>
+      <currentValue>-1</currentValue>
+    </org.collectionspace.services.id.NumericIDGeneratorPart>
+  </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+  WHERE 'e6f52346-0d2c-4b68-8a35-0a27dad2f3f4' NOT IN
+        (
+        SELECT  csid
+        FROM    id_generators
+        );
+
+-- INDEMNITY_REFERENCE_NUMBER
+
+INSERT INTO id_generators
+    (csid, displayname, description, priority, last_generated_id, id_generator_state)
+  SELECT
+     '26583488-7cb4-42b5-a8e2-4db005c8f5ef',
+     'Indemnity Reference Number',
+     'Identifies an indemnity.',
+     '9',
+     '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+  <parts>
+    <org.collectionspace.services.id.StringIDGeneratorPart>
+      <initialValue>IND</initialValue>
+      <currentValue>IND</currentValue>
+    </org.collectionspace.services.id.StringIDGeneratorPart>
+    <org.collectionspace.services.id.YearIDGeneratorPart>
+      <currentValue></currentValue>
+    </org.collectionspace.services.id.YearIDGeneratorPart>
+    <org.collectionspace.services.id.StringIDGeneratorPart>
+      <initialValue>.</initialValue>
+      <currentValue>.</currentValue>
+    </org.collectionspace.services.id.StringIDGeneratorPart>
+    <org.collectionspace.services.id.NumericIDGeneratorPart>
+      <maxLength>6</maxLength>
+      <initialValue>1</initialValue>
+      <currentValue>-1</currentValue>
+    </org.collectionspace.services.id.NumericIDGeneratorPart>
+  </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+  WHERE '26583488-7cb4-42b5-a8e2-4db005c8f5ef' NOT IN
+        (
+        SELECT  csid
+        FROM    id_generators
+        );
diff --git a/services/insurance/3rdparty/build.xml b/services/insurance/3rdparty/build.xml
new file mode 100644 (file)
index 0000000..3ce9e7b
--- /dev/null
@@ -0,0 +1,130 @@
+<project name="insurance.3rdparty" default="package" basedir=".">
+    <description>
+        insurance service 3rdparty
+    </description>
+  <!-- set global properties for this build -->
+    <property name="services.trunk" value="../../.."/>
+    <!-- environment should be declared before reading build.properties -->
+    <property environment="env" />
+    <property file="${services.trunk}/build.properties" />
+    <property name="mvn.opts" value="-V" />
+    <property name="src" location="src"/>
+
+    <condition property="osfamily-unix">
+        <os family="unix" />
+    </condition>
+    <condition property="osfamily-windows">
+        <os family="windows" />
+    </condition>
+
+    <target name="init" >
+    <!-- Create the time stamp -->
+        <tstamp/>
+    </target>
+
+    <target name="package" depends="package-unix,package-windows"
+  description="Package CollectionSpace Services" />
+    <target name="package-unix" if="osfamily-unix">
+        <exec executable="mvn" failonerror="true">
+            <arg value="package" />
+            <arg value="-Dmaven.test.skip=true" />
+            <arg value="-f" />
+            <arg value="${basedir}/pom.xml" />
+            <arg value="-N" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+    <target name="package-windows" if="osfamily-windows">
+        <exec executable="cmd" failonerror="true">
+            <arg value="/c" />
+            <arg value="mvn" />
+            <arg value="package" />
+            <arg value="-Dmaven.test.skip=true" />
+            <arg value="-f" />
+            <arg value="${basedir}/pom.xml" />
+            <arg value="-N" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+
+    <target name="install" depends="install-unix,install-windows"
+  description="Install" />
+    <target name="install-unix" if="osfamily-unix">
+        <exec executable="mvn" failonerror="true">
+            <arg value="install" />
+            <arg value="-Dmaven.test.skip=true" />
+            <arg value="-f" />
+            <arg value="${basedir}/pom.xml" />
+            <arg value="-N" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+    <target name="install-windows" if="osfamily-windows">
+        <exec executable="cmd" failonerror="true">
+            <arg value="/c" />
+            <arg value="mvn" />
+            <arg value="install" />
+            <arg value="-Dmaven.test.skip=true" />
+            <arg value="-f" />
+            <arg value="${basedir}/pom.xml" />
+            <arg value="-N" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+    
+    <target name="clean" depends="clean-unix,clean-windows"
+  description="Delete target directories" >
+        <delete dir="${build}"/>
+    </target>
+    <target name="clean-unix" if="osfamily-unix">
+        <exec executable="mvn" failonerror="true">
+            <arg value="clean" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+    <target name="clean-windows" if="osfamily-windows">
+        <exec executable="cmd" failonerror="true">
+            <arg value="/c" />
+            <arg value="mvn" />
+            <arg value="clean" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+
+    <target name="test" depends="test-unix,test-windows" description="Run tests" />
+    <target name="test-unix" if="osfamily-unix">
+        <exec executable="mvn" failonerror="true">
+            <arg value="test" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+    <target name="test-windows" if="osfamily-windows">
+        <exec executable="cmd" failonerror="true">
+            <arg value="/c" />
+            <arg value="mvn" />
+            <arg value="test" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+
+    <target name="deploy" depends="install"
+    description="deploy insurance in ${jee.server.nuxeo}">
+       <!-- This module is obsolete.  The Nuxeo artifacts are now created and deployed using the "csmake" tool
+            <ant antfile="nuxeo-platform-cs-insurance/build.xml" target="deploy" inheritall="false"/>
+        -->
+    </target>
+
+    <target name="undeploy"
+    description="undeploy insurance from ${jee.server.nuxeo}">
+       <!-- This target is obsolete.  The Nuxeo artifacts are now created and deployed using the "csmake" tool
+       leaving this only for backwards compatibility reasons. -->
+        <ant antfile="nuxeo-platform-cs-insurance/build.xml" target="undeploy" inheritall="false"/>
+    </target>
+
+    <target name="dist"
+    description="generate distribution for insurance" depends="package">
+        <ant antfile="nuxeo-platform-cs-insurance/build.xml" target="dist" inheritall="false"/>
+    </target>
+
+
+</project>
diff --git a/services/insurance/3rdparty/nuxeo-platform-cs-insurance/build.xml b/services/insurance/3rdparty/nuxeo-platform-cs-insurance/build.xml
new file mode 100644 (file)
index 0000000..96e7249
--- /dev/null
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="nuxeo-platform-cs-insurance" default="package" basedir=".">
+    <description>
+        insurance nuxeo document type
+    </description>
+    <!-- set global properties for this build -->
+    <property name="services.trunk" value="../../../.."/>
+    <!-- environment should be declared before reading build.properties -->
+    <property environment="env" />
+    <property file="${services.trunk}/build.properties" />
+    <property name="mvn.opts" value="-V" />
+    <property name="src" location="src"/>
+    <!-- JAR files used by CollectionSpace 4.0 and later -->
+    <property name="nuxeo.insurance.doctype.jars.all"
+        value="collectionspace.insurance.doctype.*.jar"/>
+    <property name="nuxeo.insurance.schema.jars.all"
+        value="collectionspace.insurance.schema.*.jar"/>
+    <!-- Legacy JAR files used by CollectionSpace 3.3 and earlier --> 
+    <property name="nuxeo.insurance.legacy.jars.all"
+        value="org.collectionspace.services.insurance.3rdparty.nuxeo-*.jar"/>
+    <property name="nuxeo.insurance.legacy.jar"
+        value="org.collectionspace.services.insurance.3rdparty.nuxeo-${cspace.release}.jar"/>
+
+    <condition property="osfamily-unix">
+        <os family="unix" />
+    </condition>
+    <condition property="osfamily-windows">
+        <os family="windows" />
+    </condition>
+
+    <target name="init" >
+        <!-- Create the time stamp -->
+        <tstamp/>
+    </target>
+
+    <target name="package" depends="package-unix,package-windows"
+        description="Package CollectionSpace Services" />
+    <target name="package-unix" if="osfamily-unix">
+        <exec executable="mvn" failonerror="true">
+            <arg value="package" />
+            <arg value="-Dmaven.test.skip=true" />
+            <arg value="-f" />
+            <arg value="${basedir}/pom.xml" />
+            <arg value="-N" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+    <target name="package-windows" if="osfamily-windows">
+        <exec executable="cmd" failonerror="true">
+            <arg value="/c" />
+            <arg value="mvn" />
+            <arg value="package" />
+            <arg value="-Dmaven.test.skip=true" />
+            <arg value="-f" />
+            <arg value="${basedir}/pom.xml" />
+            <arg value="-N" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+
+    <target name="install" depends="install-unix,install-windows"
+        description="Install" />
+    <target name="install-unix" if="osfamily-unix">
+        <exec executable="mvn" failonerror="true">
+            <arg value="install" />
+            <arg value="-Dmaven.test.skip=true" />
+            <arg value="-f" />
+            <arg value="${basedir}/pom.xml" />
+            <arg value="-N" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+    <target name="install-windows" if="osfamily-windows">
+        <exec executable="cmd" failonerror="true">
+            <arg value="/c" />
+            <arg value="mvn" />
+            <arg value="install" />
+            <arg value="-Dmaven.test.skip=true" />
+            <arg value="-f" />
+            <arg value="${basedir}/pom.xml" />
+            <arg value="-N" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+
+    <target name="clean" depends="clean-unix,clean-windows"
+        description="Delete target directories" >
+        <delete dir="${build}"/>
+    </target>
+    <target name="clean-unix" if="osfamily-unix">
+        <exec executable="mvn" failonerror="true">
+            <arg value="clean" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+    <target name="clean-windows" if="osfamily-windows">
+        <exec executable="cmd" failonerror="true">
+            <arg value="/c" />
+            <arg value="mvn" />
+            <arg value="clean" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+
+    <target name="test" depends="test-unix,test-windows" description="Run tests" />
+    <target name="test-unix" if="osfamily-unix">
+        <exec executable="mvn" failonerror="true">
+            <arg value="test" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+    <target name="test-windows" if="osfamily-windows">
+        <exec executable="cmd" failonerror="true">
+            <arg value="/c" />
+            <arg value="mvn" />
+            <arg value="test" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+
+    <target name="deploy" depends="install"
+        description="deploy insurance doctype in ${jee.server.nuxeo}">
+        <!-- This target is obsolete.  The Nuxeo artifacts are now created and deployed using the "csmake" tool
+        leaving this only for backwards compatibility reasons. --> 
+        <copy file="${basedir}/target/${nuxeo.insurance.legacy.jar}"
+            todir="${jee.deploy.nuxeo.plugins}"/>
+    </target>
+
+    <target name="undeploy"
+        description="undeploy insurance doctype from ${jee.server.nuxeo}">
+        <delete>
+            <!-- Undeploy doctype and schema artifacts -->
+            <fileset dir="${jee.deploy.nuxeo.plugins}">
+                <include name="${nuxeo.insurance.doctype.jars.all}"/>
+            </fileset>
+            <fileset dir="${jee.deploy.nuxeo.plugins}">
+                <include name="${nuxeo.insurance.schema.jars.all}"/>
+            </fileset>
+            <!-- Undeploy legacy artifacts -->
+            <fileset dir="${jee.deploy.nuxeo.plugins}">
+                <include name="${nuxeo.insurance.legacy.jars.all}"/>
+            </fileset>
+        </delete>
+        <!-- Undeploy legacy artifacts from old deployment location through release 0.6 -->
+        <delete quiet="true">
+            <fileset dir="${jee.deploy.nuxeo.system}">
+                <include name="${nuxeo.insurance.legacy.jars.all}"/>
+            </fileset>
+        </delete>
+    </target>
+
+
+    <target name="dist"
+        description="generate distribution for insurance doctype" depends="package">
+        <copy todir="${services.trunk}/${dist.deploy.nuxeo.plugins}">
+            <fileset file="${basedir}/target/${nuxeo.insurance.legacy.jar}"/>
+        </copy>
+    </target>
+
+</project>
+
diff --git a/services/insurance/3rdparty/nuxeo-platform-cs-insurance/pom.xml b/services/insurance/3rdparty/nuxeo-platform-cs-insurance/pom.xml
new file mode 100644 (file)
index 0000000..6b27572
--- /dev/null
@@ -0,0 +1,54 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <groupId>org.collectionspace.services</groupId>
+        <artifactId>org.collectionspace.services.insurance.3rdparty</artifactId>
+        <version>${revision}</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.collectionspace.services.insurance.3rdparty.nuxeo</artifactId>
+    <name>services.insurance.3rdparty.nuxeo</name>
+    <packaging>jar</packaging>
+    <description>
+        Insurance Nuxeo Document Type
+    </description>
+
+    <properties>
+        <ServiceName>insurance</ServiceName>
+        <NuxeoDocTypeName>Insurance</NuxeoDocTypeName>
+        <CommonSchemaName>insurances_common</CommonSchemaName>
+        <Lifecycle>cs_default</Lifecycle>
+    </properties>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+            <resource>
+                <directory>../../../../3rdparty/nuxeo/nuxeo-doctype/src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifestFile>target/classes/META-INF/MANIFEST.MF</manifestFile>
+                        <manifestEntries>
+                            <Bundle-Version>${eclipseVersion}</Bundle-Version>
+                            <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/services/insurance/3rdparty/nuxeo-platform-cs-insurance/src/main/resources/OSGI-INF/README.txt b/services/insurance/3rdparty/nuxeo-platform-cs-insurance/src/main/resources/OSGI-INF/README.txt
new file mode 100644 (file)
index 0000000..5f304de
--- /dev/null
@@ -0,0 +1,16 @@
+Files formerly located in this directory are no longer needed
+-------------------------------------------------------------
+
+In CollectionSpace versions 4.0 and higher, changes were introduced
+which streamline and simplify the process through which you configure
+fields in CollectionSpace's main record types.
+
+In most cases now, you will typically change the behavior of existing fields,
+or create extension schemas to add new fields specific to your museum and/or
+community of practice, merely by editing simpler XML-based configuration
+files within CollectionSpace's Application layer.
+
+Services layer files that were formerly located in this directory and
+other, similar directories - which you previously needed to manually
+create or edit - are now generated automatically from your configuration
+in the Application layer.
diff --git a/services/insurance/3rdparty/nuxeo-platform-cs-insurance/src/main/resources/schemas/README.txt b/services/insurance/3rdparty/nuxeo-platform-cs-insurance/src/main/resources/schemas/README.txt
new file mode 100644 (file)
index 0000000..5f304de
--- /dev/null
@@ -0,0 +1,16 @@
+Files formerly located in this directory are no longer needed
+-------------------------------------------------------------
+
+In CollectionSpace versions 4.0 and higher, changes were introduced
+which streamline and simplify the process through which you configure
+fields in CollectionSpace's main record types.
+
+In most cases now, you will typically change the behavior of existing fields,
+or create extension schemas to add new fields specific to your museum and/or
+community of practice, merely by editing simpler XML-based configuration
+files within CollectionSpace's Application layer.
+
+Services layer files that were formerly located in this directory and
+other, similar directories - which you previously needed to manually
+create or edit - are now generated automatically from your configuration
+in the Application layer.
diff --git a/services/insurance/3rdparty/pom.xml b/services/insurance/3rdparty/pom.xml
new file mode 100644 (file)
index 0000000..6eb281f
--- /dev/null
@@ -0,0 +1,24 @@
+<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>org.collectionspace.services.insurance</artifactId>
+        <groupId>org.collectionspace.services</groupId>
+        <version>${revision}</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.collectionspace.services.insurance.3rdparty</artifactId>
+    <name>services.insurance.3rdparty</name>
+    <packaging>pom</packaging>
+
+    <description>
+        3rd party build for insurance service
+    </description>
+
+    <modules>
+    <!-- This module is obsolete.  The Nuxeo artifacts are now created and deployed using the "csmake" tool
+        <module>nuxeo-platform-cs-insurance</module>
+        -->
+    </modules>
+</project>
diff --git a/services/insurance/build.xml b/services/insurance/build.xml
new file mode 100644 (file)
index 0000000..46356d7
--- /dev/null
@@ -0,0 +1,124 @@
+
+<project name="insurance" default="package" basedir=".">
+    <description>
+      insurance service
+    </description>
+  <!-- set global properties for this build -->
+    <property name="services.trunk" value="../.."/>
+    <!-- environment should be declared before reading build.properties -->
+    <property environment="env" />
+    <property file="${services.trunk}/build.properties" />
+    <property name="mvn.opts" value="-V" />
+    <property name="src" location="src"/>
+
+    <condition property="osfamily-unix">
+        <os family="unix" />
+    </condition>
+    <condition property="osfamily-windows">
+        <os family="windows" />
+    </condition>
+
+    <target name="package" depends="package-unix,package-windows"
+  description="Package CollectionSpace Services" />
+  
+    <target name="package-unix" if="osfamily-unix">
+        <exec executable="mvn" failonerror="true">
+            <arg value="package" />
+            <arg value="-Dmaven.test.skip=true" />
+            <arg value="-f" />
+            <arg value="${basedir}/pom.xml" />
+            <arg value="-N" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+    
+    <target name="package-windows" if="osfamily-windows">
+        <exec executable="cmd" failonerror="true">
+            <arg value="/c" />
+            <arg value="mvn" />
+            <arg value="package" />
+            <arg value="-Dmaven.test.skip=true" />
+            <arg value="-f" />
+            <arg value="${basedir}/pom.xml" />
+            <arg value="-N" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+
+
+    <target name="install" depends="install-unix,install-windows"
+  description="Install" />
+    <target name="install-unix" if="osfamily-unix">
+        <exec executable="mvn" failonerror="true">
+            <arg value="install" />
+            <arg value="-Dmaven.test.skip=true" />
+            <arg value="-f" />
+            <arg value="${basedir}/pom.xml" />
+            <arg value="-N" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+    <target name="install-windows" if="osfamily-windows">
+        <exec executable="cmd" failonerror="true">
+            <arg value="/c" />
+            <arg value="mvn" />
+            <arg value="install" />
+            <arg value="-Dmaven.test.skip=true" />
+            <arg value="-f" />
+            <arg value="${basedir}/pom.xml" />
+            <arg value="-N" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+
+    <target name="clean" depends="clean-unix,clean-windows"
+  description="Delete target directories" >
+        <delete dir="${build}"/>
+    </target>
+    <target name="clean-unix" if="osfamily-unix">
+        <exec executable="mvn" failonerror="true">
+            <arg value="clean" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+    <target name="clean-windows" if="osfamily-windows">
+        <exec executable="cmd" failonerror="true">
+            <arg value="/c" />
+            <arg value="mvn" />
+            <arg value="clean" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+
+    <target name="test" depends="test-unix,test-windows" description="Run tests" />
+    <target name="test-unix" if="osfamily-unix">
+        <exec executable="mvn" failonerror="true">
+            <arg value="test" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+    <target name="test-windows" if="osfamily-windows">
+        <exec executable="cmd" failonerror="true">
+            <arg value="/c" />
+            <arg value="mvn" />
+            <arg value="test" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+
+    <target name="deploy" depends="install"
+    description="deploy insurance service">
+        <ant antfile="3rdparty/build.xml" target="deploy" inheritall="false"/>
+    </target>
+
+    <target name="undeploy"
+    description="undeploy insurance service">
+        <ant antfile="3rdparty/build.xml" target="undeploy" inheritall="false"/>
+    </target>
+
+    <target name="dist" depends="package"
+    description="distribute insurance service">
+        <ant antfile="3rdparty/build.xml" target="dist" inheritall="false"/>
+    </target>
+
+</project>
diff --git a/services/insurance/client/pom.xml b/services/insurance/client/pom.xml
new file mode 100644 (file)
index 0000000..180b9d4
--- /dev/null
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <groupId>org.collectionspace.services</groupId>
+        <artifactId>org.collectionspace.services.insurance</artifactId>
+        <version>${revision}</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.collectionspace.services.insurance.client</artifactId>
+    <name>services.insurance.client</name>
+
+    <dependencies>
+<!-- CollectionSpace dependencies -->
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.authority.jaxb</artifactId>
+            <optional>true</optional>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.jaxb</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.common</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.client</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+         <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.insurance.jaxb</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.person.client</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+<!-- External dependencies -->
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxrs</artifactId>
+            <!-- filter out unwanted jars -->
+            <exclusions>
+                <exclusion>
+                    <groupId>tjws</groupId>
+                    <artifactId>webserver</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxb-provider</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-multipart-provider</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>collectionspace-services-insurance-client</finalName>
+    </build>
+</project>
diff --git a/services/insurance/client/src/main/java/org/collectionspace/services/client/InsuranceClient.java b/services/insurance/client/src/main/java/org/collectionspace/services/client/InsuranceClient.java
new file mode 100644 (file)
index 0000000..e8a2385
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+ *
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+package org.collectionspace.services.client;
+
+import org.collectionspace.services.insurance.InsurancesCommon;
+
+/**
+ * InsuranceClient.java
+ */
+public class InsuranceClient extends AbstractCommonListPoxServiceClientImpl<InsuranceProxy, InsurancesCommon> {
+
+    public static final String SERVICE_NAME = "insurances";
+    public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME;
+    public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT;
+    public static final String SERVICE_PATH_PROXY = SERVICE_PATH + "/";
+    public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME;
+
+    public InsuranceClient() throws Exception {
+        super();
+    }
+
+    public InsuranceClient(String clientPropertiesFilename) throws Exception {
+        super(clientPropertiesFilename);
+    }
+
+    @Override
+    public String getServicePathComponent() {
+        return SERVICE_PATH_COMPONENT;
+    }
+
+    @Override
+    public String getServiceName() {
+        return SERVICE_NAME;
+    }
+
+    @Override
+    public Class<InsuranceProxy> getProxyClass() {
+        return InsuranceProxy.class;
+    }
+
+}
diff --git a/services/insurance/client/src/main/java/org/collectionspace/services/client/InsuranceProxy.java b/services/insurance/client/src/main/java/org/collectionspace/services/client/InsuranceProxy.java
new file mode 100644 (file)
index 0000000..16157ae
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+ *
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+package org.collectionspace.services.client;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+
+/**
+ * InsuranceProxy.java
+ */
+@Path(InsuranceClient.SERVICE_PATH_PROXY)
+@Produces({"application/xml"})
+@Consumes({"application/xml"})
+public interface InsuranceProxy extends CollectionSpaceCommonListPoxProxy {
+}
diff --git a/services/insurance/jaxb/pom.xml b/services/insurance/jaxb/pom.xml
new file mode 100644 (file)
index 0000000..b28112b
--- /dev/null
@@ -0,0 +1,33 @@
+<?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>org.collectionspace.services.insurance</artifactId>
+        <groupId>org.collectionspace.services</groupId>
+        <version>${revision}</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.collectionspace.services.insurance.jaxb</artifactId>
+    <name>services.insurance.jaxb</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.jaxb</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>collectionspace-services-insurance-jaxb</finalName>
+        <defaultGoal>install</defaultGoal>
+        <plugins>
+            <plugin>
+                <groupId>org.jvnet.jaxb2.maven2</groupId>
+                <artifactId>maven-jaxb2-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/services/insurance/jaxb/src/main/java/org/collectionspace/services/InsuranceJAXBSchema.java b/services/insurance/jaxb/src/main/java/org/collectionspace/services/InsuranceJAXBSchema.java
new file mode 100644 (file)
index 0000000..d316841
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+ *
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+package org.collectionspace.services;
+
+public interface InsuranceJAXBSchema {
+    String INSURANCE_REFERENCE_NUMBER = "insuranceIndemnityReferenceNumber";
+}
diff --git a/services/insurance/jaxb/src/main/java/org/collectionspace/services/InsuranceListItemJAXBSchema.java b/services/insurance/jaxb/src/main/java/org/collectionspace/services/InsuranceListItemJAXBSchema.java
new file mode 100644 (file)
index 0000000..758d041
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+ *
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+package org.collectionspace.services;
+
+public interface InsuranceListItemJAXBSchema {
+    String INSURANCE_REFERENCE_NUMBER = "insuranceIndemnityReferenceNumber";
+    String CSID = "csid";
+    String URI = "url";
+}
\ No newline at end of file
diff --git a/services/insurance/jaxb/src/main/resources/insurances_common.xsd b/services/insurance/jaxb/src/main/resources/insurances_common.xsd
new file mode 100644 (file)
index 0000000..fc43a34
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<!--
+    Insurance schema (XSD)
+
+    Entity  : Insurance
+    Part    : Common
+    Used for: JAXB binding between XML and Java objects
+-->
+
+<xs:schema
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+  jaxb:version="1.0" elementFormDefault="unqualified"
+  xmlns:ns="http://collectionspace.org/services/insurance"
+  xmlns="http://collectionspace.org/services/insurance"
+  targetNamespace="http://collectionspace.org/services/insurance"
+  version="0.1"
+>
+
+<!--
+    Avoid XmlRootElement nightmare:
+    See http://weblogs.java.net/blog/kohsuke/archive/2006/03/why_does_jaxb_p.html
+-->
+
+    <!--  Insurance Information Group -->
+    <xs:element name="insurances_common">
+        <xs:complexType>
+            <xs:sequence>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+</xs:schema>
diff --git a/services/insurance/pom.xml b/services/insurance/pom.xml
new file mode 100644 (file)
index 0000000..543dcb0
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <groupId>org.collectionspace.services</groupId>
+        <artifactId>org.collectionspace.services.main</artifactId>
+        <version>${revision}</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.collectionspace.services.insurance</artifactId>
+    <name>services.insurance</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>jaxb</module>
+        <module>service</module>
+        <module>3rdparty</module>
+        <module>client</module>
+    </modules>
+
+</project>
diff --git a/services/insurance/service/pom.xml b/services/insurance/service/pom.xml
new file mode 100644 (file)
index 0000000..e8d4299
--- /dev/null
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <groupId>org.collectionspace.services</groupId>
+        <artifactId>org.collectionspace.services.insurance</artifactId>
+        <version>${revision}</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.collectionspace.services.insurance.service</artifactId>
+    <name>services.insurance.service</name>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.insurance.jaxb</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.insurance.client</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.collectionobject.jaxb</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <!-- External dependencies -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+        </dependency>
+
+      <!-- javax -->
+
+        <dependency>
+            <groupId>javax.security</groupId>
+            <artifactId>jaas</artifactId>
+            <version>1.0.01</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- jboss -->
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxrs</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>tjws</groupId>
+                    <artifactId>webserver</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxb-provider</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-multipart-provider</artifactId>
+        </dependency>
+
+        <!-- nuxeo -->
+
+        <dependency>
+            <groupId>org.nuxeo.ecm.core</groupId>
+            <artifactId>nuxeo-core-api</artifactId>
+            <exclusions>
+                <exclusion>
+                    <artifactId>jboss-remoting</artifactId>
+                    <groupId>jboss</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <finalName>collectionspace-services-insurance</finalName>
+    </build>
+</project>
diff --git a/services/insurance/service/src/main/java/org/collectionspace/services/insurance/InsuranceResource.java b/services/insurance/service/src/main/java/org/collectionspace/services/insurance/InsuranceResource.java
new file mode 100644 (file)
index 0000000..2061813
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+ *
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+package org.collectionspace.services.insurance;
+
+import org.collectionspace.services.client.InsuranceClient;
+import org.collectionspace.services.common.NuxeoBasedResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+
+@Path(InsuranceClient.SERVICE_PATH)
+@Consumes("application/xml")
+@Produces("application/xml")
+public class InsuranceResource extends NuxeoBasedResource {
+
+    final Logger logger = LoggerFactory.getLogger(InsuranceResource.class);
+
+    @Override
+    protected String getVersionString() {
+        final String lastChangeRevision = "$LastChangedRevision$";
+        return lastChangeRevision;
+    }
+
+    @Override
+    public String getServiceName() {
+        return InsuranceClient.SERVICE_NAME;
+    }
+
+    @Override
+    public Class<InsurancesCommon> getCommonPartClass() {
+        return InsurancesCommon.class;
+    }
+
+}
+
diff --git a/services/insurance/service/src/main/java/org/collectionspace/services/insurance/nuxeo/InsuranceConstants.java b/services/insurance/service/src/main/java/org/collectionspace/services/insurance/nuxeo/InsuranceConstants.java
new file mode 100644 (file)
index 0000000..c204693
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+ *
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+package org.collectionspace.services.insurance.nuxeo;
+
+/**
+ * InsuranceConstants specifies constants for the Insurance service
+ *
+ */
+public class InsuranceConstants {
+
+    public final static String NUXEO_DOCTYPE = "Insurance";
+    public final static String NUXEO_SCHEMA_NAME = "insurance";
+    public final static String NUXEO_DC_TITLE = "CollectionSpace-Insurance";
+
+}
diff --git a/services/insurance/service/src/main/java/org/collectionspace/services/insurance/nuxeo/InsuranceDocumentModelHandler.java b/services/insurance/service/src/main/java/org/collectionspace/services/insurance/nuxeo/InsuranceDocumentModelHandler.java
new file mode 100644 (file)
index 0000000..cd29d22
--- /dev/null
@@ -0,0 +1,24 @@
+/**
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+ *
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+package org.collectionspace.services.insurance.nuxeo;
+
+import org.collectionspace.services.insurance.InsurancesCommon;
+import org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler;
+
+/**
+ * InsuranceDocumentModelHandler
+ */
+public class InsuranceDocumentModelHandler extends NuxeoDocumentModelHandler<InsurancesCommon> {
+}
diff --git a/services/insurance/service/src/main/java/org/collectionspace/services/insurance/nuxeo/InsuranceValidatorHandler.java b/services/insurance/service/src/main/java/org/collectionspace/services/insurance/nuxeo/InsuranceValidatorHandler.java
new file mode 100644 (file)
index 0000000..a6fa04f
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+ *
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+package org.collectionspace.services.insurance.nuxeo;
+
+import org.collectionspace.services.common.context.ServiceContext;
+import org.collectionspace.services.common.document.InvalidDocumentException;
+import org.collectionspace.services.common.document.ValidatorHandler;
+import org.collectionspace.services.common.document.DocumentHandler.Action;
+
+public class InsuranceValidatorHandler implements ValidatorHandler {
+
+    @Override
+    public void validate(Action action, ServiceContext ctx) throws InvalidDocumentException {
+        // TODO Auto-generated method stub
+        System.out.println("InsuranceValidatorHandler executed.");
+    }
+
+}
index 01fb2e2f4c3c77f4ba4d7a0860b0089cf8ed42bd..3f1d517c2bc63126552fe51758dad7ae90b63097 100644 (file)
@@ -63,6 +63,7 @@
                <module>collectionobject</module>
                <module>servicegroup</module>
                <module>group</module>
+               <module>insurance</module>
                <module>intake</module>
                <module>loanin</module>
                <module>loanout</module>