]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
Changed Permission CSIDs from opaque UUID to something more refname-like.
authorRichard Millet <remillet@berkeley.edu>
Mon, 9 Apr 2012 06:51:44 +0000 (23:51 -0700)
committerRichard Millet <remillet@berkeley.edu>
Mon, 9 Apr 2012 06:51:44 +0000 (23:51 -0700)
92 files changed:
pom.xml
services/IntegrationTests/src/main/java/org/collectionspace/services/IntegrationTests/xmlreplay/XmlReplay.java
services/JaxRsServiceProvider/src/main/resources/log4j.properties
services/authority/service/pom.xml
services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityResource.java
services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityDocumentModelHandler.java
services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java
services/authorization-common/build.xml [new file with mode: 0644]
services/authorization-common/pom.xml [new file with mode: 0644]
services/authorization-mgt/client/pom.xml
services/authorization-mgt/import/pom.xml
services/authorization-mgt/import/src/main/java/org/collectionspace/services/authorization/driver/AuthorizationSeedDriver.java
services/authorization-mgt/import/src/main/java/org/collectionspace/services/authorization/importer/AuthorizationGen.java
services/authorization-mgt/import/src/main/java/org/collectionspace/services/authorization/importer/AuthorizationSeed.java
services/authorization-mgt/pom.xml
services/authorization-mgt/service/pom.xml
services/authorization-mgt/service/src/main/java/org/collectionspace/services/authorization/storage/AuthorizationDelegate.java
services/authorization-mgt/service/src/main/java/org/collectionspace/services/authorization/storage/PermissionRoleDocumentHandler.java
services/authorization/service/pom.xml
services/authorization/service/src/main/java/org/collectionspace/services/authorization/AuthZ.java
services/authorization/service/src/main/java/org/collectionspace/services/authorization/CSpaceResourceImpl.java
services/authorization/service/src/main/java/org/collectionspace/services/authorization/PermissionActionUtil.java
services/authorization/service/src/main/java/org/collectionspace/services/authorization/PermissionException.java
services/authorization/service/src/main/java/org/collectionspace/services/authorization/PermissionNotFoundException.java
services/authorization/service/src/main/java/org/collectionspace/services/authorization/URIResourceImpl.java
services/blob/service/pom.xml
services/blob/service/src/main/java/org/collectionspace/services/blob/nuxeo/BlobDocumentModelHandler.java
services/common/pom.xml
services/common/src/main/cspace/config/services/service-config.xml
services/common/src/main/cspace/config/services/tenants/core/tenant-bindings.delta.xml
services/common/src/main/cspace/config/services/tenants/lifesci/tenant-bindings.delta.xml
services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml
services/common/src/main/java/org/collectionspace/services/common/ResourceBase.java
services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java
services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationCommon.java
services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationRoleRel.java
services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationStore.java
services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/PermissionRoleUtil.java [moved from services/authorization-mgt/service/src/main/java/org/collectionspace/services/authorization/storage/PermissionRoleUtil.java with 77% similarity]
services/common/src/main/java/org/collectionspace/services/common/config/ServiceConfigUtils.java
services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java
services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingUtils.java
services/common/src/main/java/org/collectionspace/services/common/context/AbstractServiceContextImpl.java
services/common/src/main/java/org/collectionspace/services/common/context/ServiceBindingUtils.java
services/common/src/main/java/org/collectionspace/services/common/context/ServiceContext.java
services/common/src/main/java/org/collectionspace/services/common/datetime/DateTimeFormatUtils.java
services/common/src/main/java/org/collectionspace/services/common/document/DocumentUtils.java
services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoImageUtils.java
services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java
services/common/src/main/java/org/collectionspace/services/common/init/IInitHandler.java
services/common/src/main/java/org/collectionspace/services/common/init/InitHandler.java
services/common/src/main/java/org/collectionspace/services/common/init/ModifyFieldDatatypes.java
services/common/src/main/java/org/collectionspace/services/common/repository/RepositoryClientFactory.java
services/common/src/main/java/org/collectionspace/services/common/security/SecurityInterceptor.java
services/common/src/main/java/org/collectionspace/services/common/security/SecurityUtils.java
services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JpaStorageUtils.java
services/common/src/main/java/org/collectionspace/services/common/vocabulary/RefNameServiceUtils.java
services/common/src/main/java/org/collectionspace/services/common/workflow/service/nuxeo/WorkflowDocumentModelHandler.java
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoConnector.java
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoConnectorEmbedded.java
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoConnectorRemote.java
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteSubItemDocumentModelHandlerImpl.java
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/TenantRepository.java
services/config/src/main/java/org/collectionspace/services/common/config/AbstractConfigReaderImpl.java [moved from services/common/src/main/java/org/collectionspace/services/common/config/AbstractConfigReaderImpl.java with 100% similarity]
services/config/src/main/java/org/collectionspace/services/common/config/ConfigReader.java [moved from services/common/src/main/java/org/collectionspace/services/common/config/ConfigReader.java with 100% similarity]
services/config/src/main/java/org/collectionspace/services/common/config/PropertyItemUtils.java [moved from services/common/src/main/java/org/collectionspace/services/common/config/PropertyItemUtils.java with 95% similarity]
services/config/src/main/java/org/collectionspace/services/common/config/ServicesConfigReaderImpl.java [moved from services/common/src/main/java/org/collectionspace/services/common/config/ServicesConfigReaderImpl.java with 96% similarity]
services/config/src/main/resources/service-config.xsd [moved from services/common/src/main/resources/service-config.xsd with 93% similarity]
services/config/src/main/resources/service.xsd [moved from services/common/src/main/resources/service.xsd with 98% similarity]
services/config/src/main/resources/tenant.xsd [moved from services/common/src/main/resources/tenant.xsd with 91% similarity]
services/config/src/main/resources/types.xsd [moved from services/common/src/main/resources/types.xsd with 91% similarity]
services/contact/service/pom.xml
services/contact/service/src/main/java/org/collectionspace/services/contact/nuxeo/ContactDocumentModelHandler.java
services/hyperjaxb/pom.xml
services/imports/service/pom.xml
services/imports/service/src/main/java/org/collectionspace/services/imports/ImportsResource.java
services/imports/service/src/main/java/org/collectionspace/services/imports/TemplateExpander.java
services/imports/service/src/main/java/org/collectionspace/services/imports/nuxeo/ImportCommand.java
services/imports/service/src/main/java/org/collectionspace/services/imports/nuxeo/LoggedXMLDirectoryReader.java
services/media/service/src/main/java/org/collectionspace/services/media/MediaResource.java
services/person/service/src/main/java/org/collectionspace/services/person/nuxeo/PersonDocumentModelHandler.java
services/pom.xml
services/relation/service/pom.xml
services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationDocumentModelHandler.java
services/report/service/pom.xml
services/report/service/src/main/java/org/collectionspace/services/report/ReportResource.java
services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportDocumentModelHandler.java
services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportPostInitHandler.java
services/servicegroup/service/pom.xml
services/servicegroup/service/src/main/java/org/collectionspace/services/servicegroup/ServiceGroupResource.java
services/servicegroup/service/src/main/java/org/collectionspace/services/servicegroup/nuxeo/ServiceGroupDocumentModelHandler.java

diff --git a/pom.xml b/pom.xml
index 40f641d74d8f9064172521cd7b215ca3c9feefc0..a0bb1827c237182ef40361ed282f27a0fe3cd994 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                                <groupId>javax.transaction</groupId>\r
                                <artifactId>jta</artifactId>\r
                                <version>1.1</version>\r
+                               <!--\r
                                <scope>provided</scope>\r
+                               -->\r
                        </dependency>\r
 \r
                        <dependency>\r
index ccde889b374717045d65c69adedabc18005e5a10..944a8aea6bce53ae4cd915f6f1a01a0897d01eb4 100644 (file)
@@ -4,9 +4,7 @@ import org.apache.commons.cli.*;
 \r
 import org.apache.commons.io.FileUtils;\r
 import org.apache.commons.jexl2.JexlEngine;\r
-import org.collectionspace.services.common.api.FileTools;\r
 import org.collectionspace.services.common.api.Tools;\r
-import org.collectionspace.services.common.service.ServiceBindingType;\r
 import org.dom4j.*;\r
 import org.dom4j.io.SAXReader;\r
 \r
index 14cfac1f8842f38d46d6d3073529395681938a50..393c951daa7d2e4a424c4f3ed857f73a306d48ea 100644 (file)
@@ -45,7 +45,7 @@ log4j.appender.cspace_perf_appender.layout.ConversionPattern=%d %-5p [%t] [%c:%L
 #\r
 # This logger uses the "cspace_perf_appender" appender to log performance profiling information.\r
 #\r
-log4j.logger.perf.collectionspace=ERROR, cspace_perf_appender, stdout\r
+log4j.logger.perf.collectionspace=TRACE, cspace_perf_appender, stdout\r
 # send the logs only to our appender -no inheritence.\r
 log4j.additivity.perf.collectionspace=false\r
 \r
index 0fb36cf38ba946683a3f8f03e7899f6c09f131dc..83a83342beab6f2b0ab536a6dc81009c1024c257 100644 (file)
@@ -9,13 +9,17 @@
     </parent>\r
 \r
     <modelVersion>4.0.0</modelVersion>\r
-    <groupId>org.collectionspace.services</groupId>\r
     <artifactId>org.collectionspace.services.authority.service</artifactId>\r
     <name>services.authority.service</name>\r
     <packaging>jar</packaging>\r
 \r
     <dependencies>\r
         <!-- CollectionSpace dependencies -->\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.config</artifactId>\r
+            <version>${project.version}</version>\r
+        </dependency>\r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.common-api</artifactId>\r
index b5119587dd078c28af7dc732728a34b7937468ce..7035137bd08c6e60373a81b6388b211b5e6114b6 100644 (file)
@@ -28,7 +28,6 @@ import org.collectionspace.services.client.IQueryManager;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.client.workflow.WorkflowClient;
-import org.collectionspace.services.common.ClientType;
 import org.collectionspace.services.common.ResourceBase;
 import org.collectionspace.services.common.ResourceMap;
 import org.collectionspace.services.common.ServiceMain;
@@ -55,6 +54,7 @@ import org.collectionspace.services.common.vocabulary.RefNameServiceUtils;
 import org.collectionspace.services.common.vocabulary.nuxeo.AuthorityDocumentModelHandler;
 import org.collectionspace.services.common.vocabulary.nuxeo.AuthorityItemDocumentModelHandler;
 import org.collectionspace.services.common.workflow.service.nuxeo.WorkflowDocumentModelHandler;
+import org.collectionspace.services.config.ClientType;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.nuxeo.client.java.DocumentModelHandler;
 import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandlerImpl;
@@ -114,7 +114,7 @@ public abstract class AuthorityResource<AuthCommon, AuthItemHandler>
     protected Class<?> resourceClass;
     protected String authorityCommonSchemaName;
     protected String authorityItemCommonSchemaName;
-    final static ClientType CLIENT_TYPE = ServiceMain.getInstance().getClientType();
+    final static ClientType CLIENT_TYPE = ServiceMain.getInstance().getClientType(); //FIXME: REM - 3 Why is this field needed?  I see no references to it.
     final static String URN_PREFIX = "urn:cspace:";
     final static int URN_PREFIX_LEN = URN_PREFIX.length();
     final static String URN_PREFIX_NAME = "name(";
index 7ddb66a171b6465e3c18670c3564f8e0b7d87a05..e2b22a664784fa8e2a373da7a59a6fe4becaaa71 100644 (file)
@@ -32,8 +32,8 @@ import org.collectionspace.services.common.api.Tools;
 import org.collectionspace.services.common.context.MultipartServiceContext;
 import org.collectionspace.services.common.context.ServiceContext;
 import org.collectionspace.services.common.document.DocumentWrapper;
-import org.collectionspace.services.common.service.ObjectPartType;
 import org.collectionspace.services.common.vocabulary.AuthorityJAXBSchema;
+import org.collectionspace.services.config.service.ObjectPartType;
 
 import org.collectionspace.services.nuxeo.client.java.DocHandlerBase;
 import org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl;
index 0daa61835bf462358f29620f38e2e4da97ffa91f..c52ac6975e85133b710cded5229621ba44479742 100644 (file)
@@ -45,13 +45,13 @@ import org.collectionspace.services.common.document.DocumentWrapperImpl;
 import org.collectionspace.services.common.relation.IRelationsManager;
 import org.collectionspace.services.common.repository.RepositoryClient;
 import org.collectionspace.services.common.repository.RepositoryClientFactory;
-import org.collectionspace.services.common.service.ObjectPartType;
 import org.collectionspace.services.common.vocabulary.AuthorityJAXBSchema;
 import org.collectionspace.services.common.vocabulary.AuthorityItemJAXBSchema;
 import org.collectionspace.services.common.vocabulary.RefNameServiceUtils;
+import org.collectionspace.services.config.service.ListResultField;
+import org.collectionspace.services.config.service.ObjectPartType;
 import org.collectionspace.services.nuxeo.client.java.DocHandlerBase;
 import org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl;
-import org.collectionspace.services.common.service.ListResultField;
 import org.collectionspace.services.nuxeo.util.NuxeoUtils;
 import org.collectionspace.services.relation.RelationResource;
 import org.collectionspace.services.relation.RelationsCommon;
diff --git a/services/authorization-common/build.xml b/services/authorization-common/build.xml
new file mode 100644 (file)
index 0000000..3baaa1e
--- /dev/null
@@ -0,0 +1,132 @@
+
+<project name="authorization.service" default="package" basedir=".">
+    <description>
+        Collectionspace's common authorization classes
+    </description>
+    <!-- set global properties for this build -->
+    <property name="services.trunk" value="../../.."/>
+    <!-- enviornment should be declared before reading build.properties -->
+    <property environment="env" />
+    <property file="${services.trunk}/build.properties" />
+    <property name="mvn.opts" value="" />
+    <property name="src" location="src"/>
+    <property name="authorization-common.jar" value="cspace-services-authz-common.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.bat" />
+            <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.bat" />
+            <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.bat" />
+            <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.bat" />
+            <arg value="test" />
+            <arg value="${mvn.opts}" />
+        </exec>
+    </target>
+
+    <target name="deploy" depends="install"
+            description="Deploy common authorization jar in ${jee.server.cspace}">
+        <copy file="${basedir}/target/${authorization-common.jar}" todir="${jee.server.cspace}/lib"/>
+        <echo message="Check out authorization Service Configuration Guide on wiki.collectionspace.org for more details" />
+    </target>
+
+    <target name="undeploy"
+            description="undeploy authorization service from ${jee.server.cspace}">
+        <delete file="${jee.server.cspace}/lib/${authorization-common.jar}"/>
+        <echo message="Check out authorization Service Configuration Guide on wiki.collectionspace.org for more details"/>
+    </target>
+
+    <target name="dist"
+            description="generate distribution for authorization service" depends="package">
+        <!-- copy db scripts, etc. -->
+        <copy todir="${services.trunk}/${dist.server.cspace}/cspace/services">
+            <fileset dir="${src}/main/resources/"/>
+        </copy>
+    </target>
+
+</project>
diff --git a/services/authorization-common/pom.xml b/services/authorization-common/pom.xml
new file mode 100644 (file)
index 0000000..c75ae42
--- /dev/null
@@ -0,0 +1,64 @@
+<?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>2.2-SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.collectionspace.services.authorization-common</artifactId>
+    <name>services.authorization-common</name>
+    <packaging>jar</packaging>
+    <dependencies>
+    
+    <!-- CollectionSpace dependencies -->
+        <dependency>
+                       <groupId>org.collectionspace.services</groupId>
+                       <artifactId>org.collectionspace.services.authorization.jaxb</artifactId>
+                       <version>${project.version}</version>
+        </dependency>
+        <dependency>
+                       <groupId>org.collectionspace.services</groupId>
+                       <artifactId>org.collectionspace.services.authorization.service</artifactId>
+                       <version>${project.version}</version>
+        </dependency>
+        <dependency>
+                       <groupId>org.collectionspace.services</groupId>
+                       <artifactId>org.collectionspace.services.hyperjaxb</artifactId>
+                       <version>${project.version}</version>
+        </dependency>        
+        <dependency>
+                       <groupId>org.collectionspace.services</groupId>
+                       <artifactId>org.collectionspace.services.config</artifactId>
+                       <version>${project.version}</version>
+        </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.authorization-mgt.client</artifactId>
+                       <version>${project.version}</version>
+        </dependency>
+    <!-- 3rd Pary dependencies -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+</project>
+
index fb964121e01418470c62a507fa920d61ed2b5020..8778a1d3743cb04c161266bec6294127835ef322 100644 (file)
@@ -9,7 +9,6 @@
     </parent>\r
 \r
     <modelVersion>4.0.0</modelVersion>\r
-    <groupId>org.collectionspace.services</groupId>\r
     <artifactId>org.collectionspace.services.authorization-mgt.client</artifactId>\r
     <name>services.authorization-mgt.client</name>\r
     <properties>\r
index 46e537da3f1fef9542eab717e597f6d4cdde5a8b..030117a907e89ae6f9a06d5838b2a9bbe38ba218 100644 (file)
@@ -9,7 +9,6 @@
     </parent>\r
 \r
     <modelVersion>4.0.0</modelVersion>\r
-    <groupId>org.collectionspace.services</groupId>\r
     <artifactId>org.collectionspace.services.authorization-mgt.import</artifactId>\r
     <name>services.authorization-mgt.import</name>\r
     <properties>\r
@@ -17,6 +16,7 @@
         <spring.version>3.0.0.RELEASE</spring.version>\r
         <spring.security.version>3.0.2.RELEASE</spring.security.version>\r
     </properties>\r
+    \r
     <dependencies>\r
         <!-- keep slf4j dependencies on the top -->\r
         <dependency>\r
             <artifactId>slf4j-log4j12</artifactId>\r
             <version>1.6.1</version>\r
         </dependency>\r
+        <!-- CollectionSpace dependencies -->\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authentication.service</artifactId>\r
+            <version>${project.version}</version>\r
+            <scope>provided</scope>\r
+        </dependency>\r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.authorization.service</artifactId>\r
@@ -57,6 +64,7 @@
             <artifactId>org.collectionspace.services.authorization-mgt.client</artifactId>\r
             <version>${project.version}</version>\r
         </dependency>\r
+        <!-- 3rd Pary dependencies -->\r
         <dependency>\r
             <groupId>org.testng</groupId>\r
             <artifactId>testng</artifactId>\r
index 37c9112f9a3ea04d36ab9aecc16b0b1a87cd8149..f69f8dc9fd2d5988868c4175482f5d2a3e232d3a 100644 (file)
@@ -28,6 +28,9 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+
 import org.collectionspace.services.authorization.AuthZ;
 import org.collectionspace.services.authorization.perms.Permission;
 import org.collectionspace.services.authorization.PermissionRole;
@@ -37,7 +40,8 @@ import org.collectionspace.services.authorization.SubjectType;
 import org.collectionspace.services.authorization.importer.AuthorizationGen;
 import org.collectionspace.services.authorization.importer.AuthorizationSeed;
 import org.collectionspace.services.common.authorization_mgt.AuthorizationStore;
-import org.collectionspace.services.authorization.storage.PermissionRoleUtil;
+import org.collectionspace.services.common.authorization_mgt.PermissionRoleUtil;
+import org.collectionspace.services.common.storage.jpa.JpaStorageUtils;
 
 import org.hibernate.exception.ConstraintViolationException;
 
@@ -190,37 +194,59 @@ public class AuthorizationSeedDriver {
     }
 
     private void store() throws Exception {
-        AuthorizationStore authzStore = new AuthorizationStore();
-        for (Role role : authzGen.getDefaultRoles()) {
-               try {
-                       authzStore.store(role);
-               } catch (Exception e) {
-                       //
-                       // If the role already exists, read it in and replace the instance
-                       // we're trying to import with the exist one.  This will ensure that the rest
-                       // of import uses the correct CSID.
-                       if (e.getCause() instanceof ConstraintViolationException) {
-                               Role existingRole = authzStore.getRoleByName(role.getRoleName(), role.getTenantId());
-                               //
-                               role = existingRole;
-                       }
-               }
-        }
-
-        for (Permission perm : authzGen.getDefaultPermissions()) { //FIXME: REM - 3/27/2012 - If we change the CSID of permissions to something like a refname, then we need to check for existing perms just like we did above for roles
-            authzStore.store(perm);
-        }
-
-        List<PermissionRoleRel> permRoleRels = new ArrayList<PermissionRoleRel>();
-        for (PermissionRole pr : authzGen.getDefaultPermissionRoles()) {
-            PermissionRoleUtil.buildPermissionRoleRel(pr, SubjectType.ROLE, permRoleRels, false /*not for delete*/);
-        }
-        for (PermissionRoleRel permRoleRel : permRoleRels) {
-            authzStore.store(permRoleRel);
-        }
+        EntityManagerFactory emf = JpaStorageUtils.getEntityManagerFactory(JpaStorageUtils.CS_AUTHZ_PERSISTENCE_UNIT);
+        EntityManager em = null;
 
-        if (logger.isInfoEnabled()) {
-            logger.info("Authroization metata persisted.");
+        try {
+            em = emf.createEntityManager();
+            em.getTransaction().begin();
+            
+               AuthorizationStore authzStore = new AuthorizationStore();
+               for (Role role : authzGen.getDefaultRoles()) {
+                       try {
+                               authzStore.store(em, role);
+                       } catch (Exception e) {
+                               //
+                               // If the role already exists, read it in and replace the instance
+                               // we're trying to import with the exist one.  This will ensure that the rest
+                               // of import uses the correct CSID.
+                               if (e.getCause() instanceof ConstraintViolationException) {
+                                       Role existingRole = authzStore.getRoleByName(role.getRoleName(), role.getTenantId());
+                                       //
+                                       role = existingRole;
+                               }
+                       }
+               }
+       
+               for (Permission perm : authzGen.getDefaultPermissions()) { //FIXME: REM - 3/27/2012 - If we change the CSID of permissions to something like a refname, then we need to check for existing perms just like we did above for roles
+                   authzStore.store(em, perm);
+               }
+       
+               List<PermissionRoleRel> permRoleRels = new ArrayList<PermissionRoleRel>();
+               for (PermissionRole pr : authzGen.getDefaultPermissionRoles()) {
+                   PermissionRoleUtil.buildPermissionRoleRel(em, pr, SubjectType.ROLE, permRoleRels, false /*not for delete*/);
+               }
+               for (PermissionRoleRel permRoleRel : permRoleRels) {
+                   authzStore.store(em, permRoleRel);
+               }
+       
+               em.getTransaction().commit();
+               em.close();
+               if (logger.isInfoEnabled()) {
+                   logger.info("Authroization metata persisted.");
+               }
+        } catch (Exception e) {
+            if (em != null && em.getTransaction().isActive()) {
+                em.getTransaction().rollback();
+            }
+            if (logger.isDebugEnabled()) {
+                logger.debug("Caught exception and rolling back permission creation: ", e);
+            }
+            throw e;
+        } finally {
+            if (em != null) {
+                JpaStorageUtils.releaseEntityManagerFactory(emf);
+            }
         }
     }
 
index 3f5426a45ff4c19d52a98a1819aa03b0736bec57..d21bebf39f4b1d8fcaf6af1a3b44351b13ea2576 100644 (file)
@@ -49,9 +49,9 @@ import org.collectionspace.services.authorization.RolesList;
 import org.collectionspace.services.authorization.SubjectType;
 import org.collectionspace.services.common.authorization_mgt.AuthorizationCommon;
 import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl;
-import org.collectionspace.services.common.service.ServiceBindingType;
-import org.collectionspace.services.common.tenant.TenantBindingType;
 import org.collectionspace.services.common.security.SecurityUtils;
+import org.collectionspace.services.config.service.ServiceBindingType;
+import org.collectionspace.services.config.tenant.TenantBindingType;
 
 /**
  * AuthorizationGen generates authorizations (permissions and roles)
@@ -184,7 +184,7 @@ public class AuthorizationGen {
 
     private Permission buildReaderPermission(String tenantId, String resourceName) {
        String description = "Generated read-only permission.";
-       return AuthorizationCommon.createPermission(tenantId, resourceName, description, AuthorizationCommon.ACTIONGROUP_CRUDL_NAME);           
+       return AuthorizationCommon.createPermission(tenantId, resourceName, description, AuthorizationCommon.ACTIONGROUP_RL_NAME);      
     }
 
     public List<Permission> getDefaultPermissions() {
@@ -251,8 +251,10 @@ public class AuthorizationGen {
                allRoleList = new ArrayList<Role>();
                allRoleList.addAll(adminRoles);
                allRoleList.addAll(readerRoles);
+               // Finally, add the "super" role to the list
+               allRoleList.add(cspaceAdminRole);
        }
-        return allRoleList;  //FIXME: REM - 3/27/2012, The super role "cspaceAdminRole" is not on this list.  Intentional?
+        return allRoleList;
     }
 
     public void associateDefaultPermissionsRoles() {
@@ -356,10 +358,14 @@ public class AuthorizationGen {
 
     private Role buildCSpaceAdminRole() {
         Role role = new Role();
+        
+        role.setDescription("A generated super role that has permissions across tenancies.");
         role.setDisplayName(AuthorizationCommon.ROLE_ADMINISTRATOR);
-        role.setRoleName(AuthorizationCommon.ROLE_PREFIX + role.getDisplayName());
+        role.setRoleName(AuthorizationCommon.getQualifiedRoleName(
+                       AuthorizationCommon.ADMINISTRATOR_TENANT_ID, role.getDisplayName()));
         role.setCsid(AuthorizationCommon.ROLE_ADMINISTRATOR_ID);
         role.setTenantId(AuthorizationCommon.ADMINISTRATOR_TENANT_ID);
+        
         return role;
     }
 
index 5a766a8baf1b38226cafb0d1151950d646b56b33..3665301301386016016b33dd23ee173bed667340 100644 (file)
@@ -26,7 +26,6 @@ package org.collectionspace.services.authorization.importer;
 import java.io.FileInputStream;
 import java.io.InputStream;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.bind.JAXBContext;
@@ -35,17 +34,10 @@ import javax.xml.bind.Unmarshaller;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.collectionspace.services.authorization.AuthZ;
-import org.collectionspace.services.authorization.CSpaceAction;
-import org.collectionspace.services.authorization.perms.EffectType;
 import org.collectionspace.services.authorization.perms.Permission;
-import org.collectionspace.services.authorization.perms.PermissionAction;
-import org.collectionspace.services.authorization.PermissionException;
 import org.collectionspace.services.authorization.PermissionRole;
 import org.collectionspace.services.authorization.perms.PermissionsList;
 import org.collectionspace.services.authorization.PermissionsRolesList;
-import org.collectionspace.services.authorization.RoleValue;
-import org.collectionspace.services.authorization.URIResourceImpl;
 import org.collectionspace.services.common.authorization_mgt.AuthorizationCommon;
 
 /**
index e0640d3345ea11f6d08eef84c8b5fe088468c54f..a436f35d3daeb8af5632093b1cdead1ec19cb10f 100644 (file)
@@ -7,7 +7,6 @@
         <version>2.2-SNAPSHOT</version>
     </parent>
 
-    <groupId>org.collectionspace.services</groupId>
     <artifactId>org.collectionspace.services.authorization-mgt</artifactId>
     <name>services.authorization-mgt</name>
     <packaging>pom</packaging>
index 17229558d69c9d48c32e8b3286a1e22f562bb7ee..ae303a05567e8893c6a9aab28e285527fca4e3e2 100644 (file)
@@ -6,7 +6,7 @@
         <groupId>org.collectionspace.services</groupId>\r
         <version>2.2-SNAPSHOT</version>\r
     </parent>\r
-    <groupId>org.collectionspace.services</groupId>\r
+\r
     <artifactId>org.collectionspace.services.authorization-mgt.service</artifactId>\r
     <packaging>jar</packaging>\r
     <name>services.authorization-mgt.service</name>\r
         </dependency>\r
 \r
         <!-- collectionspace -->\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.authentication.service</artifactId>\r
+            <version>${project.version}</version>\r
+            <scope>provided</scope>\r
+        </dependency>        \r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.authorization.jaxb</artifactId>\r
index 1b0f249b219e9e5e348f711c2eb4bba95f346f33..2f97a8a4cb02e1a3d7bc537e94eb2c66691c3691 100644 (file)
@@ -25,6 +25,8 @@ package org.collectionspace.services.authorization.storage;
 
 import java.util.ArrayList;
 import java.util.List;
+
+import org.collectionspace.authentication.AuthN;
 import org.collectionspace.services.authorization.perms.ActionType;
 import org.collectionspace.services.authorization.AuthZ;
 import org.collectionspace.services.authorization.CSpaceAction;
@@ -39,6 +41,7 @@ import org.collectionspace.services.authorization.Role;
 import org.collectionspace.services.authorization.RoleValue;
 import org.collectionspace.services.authorization.SubjectType;
 import org.collectionspace.services.authorization.URIResourceImpl;
+import org.collectionspace.services.common.authorization_mgt.PermissionRoleUtil;
 import org.collectionspace.services.common.context.ServiceContext;
 import org.collectionspace.services.common.document.DocumentNotFoundException;
 import org.collectionspace.services.common.storage.jpa.JpaStorageUtils;
@@ -228,7 +231,7 @@ public class AuthorizationDelegate {
         for (PermissionAction pa : p.getAction()) {
             CSpaceResource res = null;
             if (p.getTenantId() == null) {
-                res = new URIResourceImpl(p.getResourceName(),
+                res = new URIResourceImpl(AuthN.get().getCurrentTenantId(), p.getResourceName(),
                         getAction(pa.getName()));
             } else {
                 res = new URIResourceImpl(p.getTenantId(), p.getResourceName(),
index ba1871de11bdb8328fba9cc017f66750217b4d52..d0914277f6eed151e5fa9f2cda9c292ec63809a9 100644 (file)
@@ -34,6 +34,8 @@ import org.collectionspace.services.authorization.RoleValue;
 import org.collectionspace.services.authorization.SubjectType;
 
 import org.collectionspace.services.common.authorization_mgt.AuthorizationRoleRel;
+import org.collectionspace.services.common.authorization_mgt.PermissionRoleUtil;
+
 import org.collectionspace.services.common.document.DocumentFilter;
 import org.collectionspace.services.common.document.DocumentWrapper;
 import org.collectionspace.services.common.storage.jpa.JpaDocumentHandler;
index 4000e515b14d41b5eb5c15e59b7ae835325a48f1..018e205a5d81d2ea3b552a7a4b8238bf27e5b081 100644 (file)
@@ -8,7 +8,7 @@
         <groupId>org.collectionspace.services</groupId>
         <version>2.2-SNAPSHOT</version>
     </parent>
-    <groupId>org.collectionspace.services</groupId>
+
     <artifactId>org.collectionspace.services.authorization.service</artifactId>
     <packaging>jar</packaging>
     <name>services.authorization.service</name>
index bc7dbe16f5c7222d005fa1eab28455da1109f012..68dff9c0ef45e0866d9f87fcf10ef319868b3c56 100644 (file)
  */
 package org.collectionspace.services.authorization;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.util.HashSet;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.authorization.spi.CSpaceAuthorizationProvider;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.GrantedAuthorityImpl;
+import org.springframework.security.core.context.SecurityContextHolder;
 
 /**
  * AuthZ is the authorization service singleton used by the services runtime
@@ -42,7 +47,7 @@ public class AuthZ {
      */
     private static volatile AuthZ self = new AuthZ();
     private CSpaceAuthorizationProvider provider;
-    final Log log = LogFactory.getLog(AuthZ.class);
+    final Log logger = LogFactory.getLog(AuthZ.class);
 
     private AuthZ() {
         setupProvider();
@@ -63,14 +68,14 @@ public class AuthZ {
         if (beanConfigProp != null && !beanConfigProp.isEmpty()) {
             beanConfig = beanConfigProp;
         }
-        if (log.isDebugEnabled()) {
-            log.debug("reading beanConfig=" + beanConfig);
+        if (logger.isDebugEnabled()) {
+            logger.debug("reading beanConfig=" + beanConfig);
         }
         ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(
                 new String[]{beanConfig});
         provider = (CSpaceAuthorizationProvider) appContext.getBean("cspaceAuthorizationProvider");
-        if (log.isDebugEnabled()) {
-            log.debug("initialized the authz provider");
+        if (logger.isDebugEnabled()) {
+            logger.debug("initialized the authz provider");
         }
     }
 
@@ -178,4 +183,18 @@ public class AuthZ {
     public boolean isAccessAllowed(CSpaceResource res, CSpaceAction action) {
         return provider.getPermissionEvaluator().hasPermission(res, action);
     }
+    
+    public void login() {
+       String user = "SPRING_ADMIN";
+       String password = "SPRING_ADMIN";
+        GrantedAuthority spring_security_admin = new GrantedAuthorityImpl("ROLE_SPRING_ADMIN"); //NOTE: Must match with value in applicationContext-authorization-test.xml (aka SPRING_SECURITY_METADATA)
+        HashSet<GrantedAuthority> gauths = new HashSet<GrantedAuthority>();
+        gauths.add(spring_security_admin);
+        Authentication authRequest = new UsernamePasswordAuthenticationToken(user, password, gauths);
+        SecurityContextHolder.getContext().setAuthentication(authRequest);
+        if (logger.isDebugEnabled()) {
+            logger.debug("Spring Security login successful for user=" + user);
+        }
+    }
+
 }
index f03505800dfea6e648ec1858e004ceb565516211..0bd03144ff4bd40eab9fc0807af2d0996ca44ff1 100644 (file)
@@ -23,8 +23,6 @@
  */
 package org.collectionspace.services.authorization;
 
-import org.collectionspace.authentication.AuthN;
-
 /**
  * CSpaceResourceImpl abstract resource implementation
  * @author 
@@ -39,6 +37,7 @@ public abstract class CSpaceResourceImpl implements CSpaceResource {
     private String tenantId;
 
     private CSpaceResourceImpl() {
+       // Do nothing.
     }
 
     /**
@@ -47,10 +46,12 @@ public abstract class CSpaceResourceImpl implements CSpaceResource {
      * @param action
      * @param type
      */
+    /*
     public CSpaceResourceImpl(String id, CSpaceAction action, TYPE type) {
         setup(id, action, type);
         tenantId = AuthN.get().getCurrentTenantId();
     }
+    */
 
     /**
      * constructor that uses given tenant id to associate the resource with
index 92af7c9d0438a3065fa4f43d41400acbfe7b9bbb..306e0e10b9d2e276c637a388cd4de5e438947430 100644 (file)
@@ -1,9 +1,5 @@
 package org.collectionspace.services.authorization;\r
 \r
-import org.collectionspace.services.authorization.perms.PermissionAction;\r
-import org.collectionspace.services.authorization.perms.ActionType;\r
-import org.collectionspace.services.authorization.perms.Permission;\r
-\r
 public class PermissionActionUtil {\r
 \r
 }\r
index ce282ecb8e1b93c5d3e98063e2c39f755861667e..77304ea26502df7ec5589b75cf731f84794ae795 100644 (file)
@@ -31,6 +31,12 @@ package org.collectionspace.services.authorization;
 public class PermissionException extends Exception {
 
     /**
+        * 
+        */
+       private static final long serialVersionUID = 1L;
+
+
+       /**
      * Creates a new instance of <code>PermissionException</code> without detail message.
      */
     public PermissionException() {
index a6cc3d873263fecd8dbe0e25b86333bf66930777..df7527df5228ec450059d83468e3c5b704a80d40 100644 (file)
@@ -30,6 +30,11 @@ package org.collectionspace.services.authorization;
 public class PermissionNotFoundException extends PermissionException {
 
     /**
+        * 
+        */
+       private static final long serialVersionUID = 1L;
+
+       /**
      * Creates a new instance of <code>PermissionNotFoundException</code> without detail message.
      */
     public PermissionNotFoundException() {
index 05c12b23f16492d53adfeeb8ce24f8de4e0cb045..1381a86ce5317db273dc4094fd9b7f429610dd3f 100644 (file)
@@ -41,12 +41,14 @@ public class URIResourceImpl extends CSpaceResourceImpl {
      * @param uri
      * @param method an http method
      */
+    /*
     public URIResourceImpl(String uri, String method) {
         super(buildId(uri, getAction(method)),
                 getAction(method), TYPE.URI);
         this.uri = uri;
         this.method = method;
     }
+    */
 
     /**
      * constructor that is usually called from service runtime
@@ -67,11 +69,13 @@ public class URIResourceImpl extends CSpaceResourceImpl {
      * @param resourceName no leading / and no trailing / needed
      * @param actionType
      */
+    /*
     public URIResourceImpl(String resourceName, CSpaceAction action) {
         //FIXME more validation might be needed
         super(buildId(resourceName, action),
                 action, TYPE.URI);
     }
+    */
 
     /**
      * constructor that is usually called from administrative interface
index 61b76134da09871870197e953086860330e3612c..414b20afbe2d6f08acf709329e2f35681fa20a15 100644 (file)
@@ -8,7 +8,6 @@
     </parent>
     
     <modelVersion>4.0.0</modelVersion>
-    <groupId>org.collectionspace.services</groupId>
     <artifactId>org.collectionspace.services.blob.service</artifactId>
     <name>services.blob.service</name>
     <packaging>jar</packaging>       
             <artifactId>org.collectionspace.services.common</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.config</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.jaxb</artifactId>
index afa7c4b53856da1a833dadc7c15a6ada7ea097af..b1ac28b3a4666ef352df911ef035d228ead58617 100644 (file)
@@ -37,13 +37,13 @@ import org.collectionspace.services.common.context.ServiceContext;
 import org.collectionspace.services.common.document.DocumentUtils;
 import org.collectionspace.services.common.document.DocumentWrapper;
 import org.collectionspace.services.common.imaging.nuxeo.NuxeoImageUtils;
-import org.collectionspace.services.common.service.ListResultField;
-import org.collectionspace.services.common.service.ObjectPartType;
+import org.collectionspace.services.config.service.ListResultField;
+import org.collectionspace.services.config.service.ObjectPartType;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.jaxb.BlobJAXBSchema;
-import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.nuxeo.client.java.CommonList;
 
+
 import org.nuxeo.ecm.core.api.ClientException;
 import org.nuxeo.ecm.core.api.DocumentModel;
 import org.nuxeo.ecm.core.api.IdRef;
index 0488ea2746aa80aac54864be9b813bc417481de5..ebf68c57745e46a88040b447d3b3311817c2d771 100644 (file)
 \r
     <dependencies>\r
         <!-- CollectionSpace dependencies -->\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.config</artifactId>\r
+            <version>${project.version}</version>\r
+        </dependency>        \r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.common-api</artifactId>\r
index 06b54323877e596ae324d66bdda57e62aa2f6947..890fa00c457f9f4def528f60890fccec42de10b8 100644 (file)
@@ -10,9 +10,9 @@
 -->
 
 <svc:service-config  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
-                     xmlns:svc='http://collectionspace.org/services/common'
-                     xmlns:types='http://collectionspace.org/services/common/types'
-                     xsi:schemaLocation='http://collectionspace.org/services/common ../resources/common.xsd'>
+                     xmlns:svc='http://collectionspace.org/services/config'
+                     xmlns:types='http://collectionspace.org/services/config/types'
+                     xsi:schemaLocation='http://collectionspace.org/services/config ../resources/common.xsd'>
 
     <!-- name of the repository client is referred in each service binding -->
     <repository-client name="nuxeo-java" default="true">
index ca6021a13fc96e4513f301a1f8138fa110047a0a..783708d19c7bc62b18a4a45d832d49fe756640bf 100644 (file)
@@ -1,11 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <tenant:TenantBindingConfig
        xmlns:merge='http://xmlmerge.el4j.elca.ch'
-       xmlns:tenant='http://collectionspace.org/services/common/tenant'>
+       xmlns:tenant='http://collectionspace.org/services/config/tenant'>
                 
     <tenant:tenantBinding id="1" name="core.collectionspace.org" displayName="CollectionSpace Core Demo Tenant" version="0.1">
         <tenant:repositoryDomain name="default-domain" storageName="core-domain" repositoryClient="nuxeo-java" />
-       
     </tenant:tenantBinding>
                       
 </tenant:TenantBindingConfig>
index 2cd346a9de5f5954834efb1e1e6c647ce57f915d..e24cf4664f0f9a5d0de120c9d276900e492902c8 100644 (file)
@@ -1,14 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <tenant:TenantBindingConfig
        xmlns:merge='http://xmlmerge.el4j.elca.ch'
-       xmlns:tenant='http://collectionspace.org/services/common/tenant'>
+       xmlns:tenant='http://collectionspace.org/services/config/tenant'>
                 
   <tenant:tenantBinding id="2" name="lifesci.collectionspace.org" displayName="Life Sciences/Natural History Demo Tenant" version="0.1">
 
     <tenant:repositoryDomain name="default-domain" storageName="lifesci-domain" repositoryClient="nuxeo-java" />
        
        <tenant:serviceBindings merge:matcher="id" id="CollectionObjects">
-    <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+    <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
                        <service:params>
                                <service:ListResultsFields>
                                        <service:ListResultField merge:matcher="skip" merge:action="insert" >
                        </service:params>
     </service:DocHandlerParams>
 
-               <service:object xmlns:service="http://collectionspace.org/services/common/service" >
+               <service:object xmlns:service="http://collectionspace.org/services/config/service" >
                        <service:part id="3" merge:matcher="skip" merge:action="insert" control_group="Managed" versionable="true" auditable="false" label="collectionobjects_naturalhistory" updated="" order="3">
                                <!-- Include authRefs for fields in the added schema -->
                                <service:properties>
-                                       <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                                       <types:item xmlns:types="http://collectionspace.org/services/config/types">
                                                <types:key>authRef</types:key>
                                                <types:value>taxonomicIdentGroupList/*/taxon</types:value>
                                        </types:item>
-                                       <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                                       <types:item xmlns:types="http://collectionspace.org/services/config/types">
                                                <types:key>authRef</types:key>
                                                <types:value>associatedTaxaGroupList/*/taxon</types:value>
                                        </types:item>
-                                       <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                                       <types:item xmlns:types="http://collectionspace.org/services/config/types">
                                                <types:key>authRef</types:key>
                                                <types:value>taxonomicIdentGroupList/*/identBy</types:value>
                                        </types:item>
-                                       <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                                       <types:item xmlns:types="http://collectionspace.org/services/config/types">
                                                <types:key>authRef</types:key>
                                                <types:value>taxonomicIdentGroupList/*/institution</types:value>
                                        </types:item>
-                                       <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                                       <types:item xmlns:types="http://collectionspace.org/services/config/types">
                                                <types:key>authRef</types:key>
                                                <types:value>annotationGroupList/*/annotationAuthor</types:value>
                                        </types:item>
@@ -54,7 +54,7 @@
        </tenant:serviceBindings>
 
        <tenant:serviceBindings merge:matcher="id" id="Persons">
-    <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+    <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
                        <service:params>
                                <service:ListResultsFields>
                                        <service:ListResultField merge:matcher="skip" merge:action="insert" >
@@ -66,7 +66,7 @@
                        </service:params>
     </service:DocHandlerParams>
 
-               <service:object xmlns:service="http://collectionspace.org/services/common/service">
+               <service:object xmlns:service="http://collectionspace.org/services/config/service">
                        <service:part id="3" merge:matcher="skip" merge:action="insert" control_group="Managed"
                                versionable="true" auditable="false" label="persons_naturalhistory" updated="" order="3">
                                <service:content contentType="application/xml">
                                </service:content>
                                <service:properties>
                                        <!-- See CSPACE-3938 for potential additional authRef and termRef entries -->
-                                       <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                                       <types:item xmlns:types="http://collectionspace.org/services/config/types">
                                                <types:key>authRef</types:key>
                                                <types:value>affiliatedPersonOrgGroupList/*/affiliatedPersonOrg</types:value>
                                        </types:item>
-                                       <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                                       <types:item xmlns:types="http://collectionspace.org/services/config/types">
                                                <types:key>authRef</types:key>
                                                <types:value>orgContactNames|orgContactName</types:value>
                                        </types:item>
-                                       <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                                       <types:item xmlns:types="http://collectionspace.org/services/config/types">
                                                <types:key>termRef</types:key>
                                                <types:value>affiliatedPersonOrgGroupList/*/affiliatedPersonOrgType</types:value>
                                        </types:item>
-                                       <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                                       <types:item xmlns:types="http://collectionspace.org/services/config/types">
                                                <types:key>termRef</types:key>
                                                <types:value>nameTypes|nameType</types:value>
                                        </types:item>
-                                       <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                                       <types:item xmlns:types="http://collectionspace.org/services/config/types">
                                                <types:key>termRef</types:key>
                                                <types:value>nameSource</types:value>
                                        </types:item>
-                                       <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                                       <types:item xmlns:types="http://collectionspace.org/services/config/types">
                                                <types:key>termRef</types:key>
                                                <types:value>entityType</types:value>
                                        </types:item>
index 41ba2ca28c396b0b3023de7903eb1ada74392f8f..fd1b92a706e0c6cabd195aa3253e3fc7ead2e454 100644 (file)
     $LastChangedRevision$
     $LastChangedDate$
 -->
-<tenant:TenantBindingConfig xmlns:tenant="http://collectionspace.org/services/common/tenant" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://collectionspace.org/services/common/tenant http://collectionspace.org/services/common/tenant.xsd">
+<tenant:TenantBindingConfig xmlns:tenant="http://collectionspace.org/services/config/tenant" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://collectionspace.org/services/config/tenant http://collectionspace.org/services/config/tenant.xsd">
      
      <!-- begin prototype collectionspace.org tenant meta-data -->
   <tenant:tenantBinding id="-1" name="prototype.collectionspace.org" displayName="CollectionSpace Services Bindings Prototype" version="0.1">
     <tenant:repositoryDomain name="default-domain" storageName="prototype-domain" repositoryClient="nuxeo-java" />
     <tenant:properties>
-      <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <types:item xmlns:types="http://collectionspace.org/services/config/types">
         <types:key>datePattern</types:key>
         <types:value>MM/dd/yyyy</types:value>
       </types:item>
-      <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <types:item xmlns:types="http://collectionspace.org/services/config/types">
         <types:key>datePattern</types:key>
         <types:value>MMM dd, yyyy</types:value>
       </types:item>
-      <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <types:item xmlns:types="http://collectionspace.org/services/config/types">
         <types:key>datePattern</types:key>
         <types:value>dd.MM.yyyy</types:value>
       </types:item>
@@ -35,7 +35,7 @@
                 <types:value>dd/MM/yyyy</types:value>
             </types:item>
             -->
-      <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <types:item xmlns:types="http://collectionspace.org/services/config/types">
         <types:key>localeLanguage</types:key>
         <types:value>en</types:value>
       </types:item>
@@ -57,7 +57,7 @@
     <tenant:serviceBindings id="id" name="id" type="utility" version="0.1">
             <!-- other URI paths through which this service could be accessed -->
             <!-- 
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /idgenerators/*/ids
             </service:uriPath>
             -->
                                 but provides tools like keyword search across many types of services. 
                  -->
     <tenant:serviceBindings id="servicegroups" name="servicegroups" type="utility" version="0.1">
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler</service:documentHandler>
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler</service:documentHandler>
     </tenant:serviceBindings>
     <!-- end servicegroup service meta-data -->
 
     <!-- begin collectionobject service meta-data -->
     <tenant:serviceBindings id="CollectionObjects" name="CollectionObjects" type="object" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/collectionobjects/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/collectionobjects/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /collectionobjects/*/authorityrefs/
             </service:uriPath>
             -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.collectionobject.nuxeo.CollectionObjectDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.collectionobject.nuxeo.CollectionObjectDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.blob.nuxeo.BlobDocumentModelHandler</service:classname>
         <service:params>
           <service:DublinCoreTitle>collectionobjects</service:DublinCoreTitle>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.collectionobject.nuxeo.CollectionObjectValidatorHandler</service:validatorHandler>
-      <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.collectionobject.nuxeo.CollectionObjectValidatorHandler</service:validatorHandler>
+      <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.common.init.ModifyFieldDatatypes</service:classname>
         <service:params>
           <service:field>
           </service:field>
         </service:params>
       </service:initHandler>
-      <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNameProperty</types:key>
                     <types:value>objectNameList/[0]/objectName</types:value>
         </types:item>
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNumberProperty</types:key>
           <types:value>objectNumber</types:value>
         </types:item>
       </service:properties>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="CollectionObject" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="CollectionObject" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="collectionobjects-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="collectionobjects_common" updated="" order="1">
                         <!-- Object Identification Information group -->
                         <!-- There are currently no authority term references in this group -->
                         <!-- Object Description Information group -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>contentActivities|contentActivity</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>contentConcepts|contentConcept</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>contentEventNameGroupList/*/contentEventName</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>contentEventNameGroupList/*/contentEventNameType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>contentOrganizations|contentOrganization</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>contentOtherGroupList/*/contentOther</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>contentOtherGroupList/*/contentOtherType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>contentPeoples|contentPeople</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>contentPersons|contentPerson</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>contentPlaces|contentPlace</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>measuredPartGroupList/*/dimensionSubGroupList/*/measuredBy</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>textualInscriptionGroupList/*/inscriptionContentInscriber</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>textualInscriptionGroupList/*/inscriptionContentMethod</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>nonTextualInscriptionGroupList/*/inscriptionDescriptionInscriber</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>nonTextualInscriptionGroupList/*/inscriptionDescriptionMethod</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>materialGroupList/*/material</types:value>
             </types:item>
                         <!-- for materialComponent, per CSPACE-4563. -->
                         <!-- Names of ancestor elements below are placeholders and subject to change. -->
                         <!--
-             <types:item xmlns:types="http://collectionspace.org/services/common/types">
+             <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>materialGroupList/*/materialComponentSubGroupList/*/materialComponent</types:value>
             </types:item>
                         -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>materialGroupList/*/materialSource</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>styles|style</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>objectComponentGroupList/*/objectComponentName</types:value>
             </types:item>
                         <!-- Object Production Information group -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>objectProductionOrganizationGroupList/*/objectProductionOrganization</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>objectProductionPeopleGroupList/*/objectProductionPeople</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>objectProductionPersonGroupList/*/objectProductionPerson</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>objectProductionPlaceGroupList/*/objectProductionPlace</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>authRef</types:key>
                                                        <types:value>techniqueGroupList/*/technique</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>techniqueGroupList/*/techniqueType</types:value>
             </types:item>
                         <!-- for associatedEvent, per CSPACE-3229. -->
                         <!-- Names of ancestor elements below are placeholders and subject to change. -->
                         <!--
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>assocEventGroupList/*/assocEventOrganization</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>assocEventGroupList/*/assocEventPeople</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>assocEventGroupList/*/assocEventPerson</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>assocEventGroupList/*/assocEventPlace</types:value>
             </types:item>
                         -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>assocOrganizationGroupList/*/assocOrganization</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>assocPeopleGroupList/*/assocPeople</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>assocPersonGroupList/*/assocPerson</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>assocPlaceGroupList/*/assocPlace</types:value>
             </types:item>
                         <!-- for 'owner', per CSPACE-3229. -->
                         <!-- Names of ancestor elements below are placeholders and subject to change. -->
                         <!--
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>ownerGroupList/*/owner</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>ownerGroupList/*/ownershipPlace</types:value>
             </types:item>
                         <!-- Object Viewer's Contribution Information group -->
                         <!-- There are currently no authority term references in this group -->
                         <!-- Reference Information group -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>referenceGroupList/*/reference</types:value>
             </types:item>
                         <!-- Object Collection Information group -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>fieldCollectionPlace</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>fieldCollectionSources|fieldCollectionSource</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>fieldCollectors|fieldCollector</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>fieldColEventNames|fieldColEventName</types:value>
             </types:item>
                         <!-- Fields containing term list / controlled vocabulary references -->
                         <!-- ### -->
                         <!-- Object Identification Information group -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>otherNumberList/*/numberType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>objectNameList/*/objectNameCurrency</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>objectNameList/*/objectNameLevel</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>objectNameList/*/objectNameSystem</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>objectNameList/*/objectNameType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>objectNameList/*/objectNameLanguage</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>responsibleDepartments|responsibleDepartment</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>collection</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>titleGroupList/*/titleLanguage</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>titleGroupList/*/titleTranslationSubGroupList/*/titleTranslationLanguage</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>titleGroupList/*/titleType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>recordStatus</types:value>
             </types:item>
                         <!-- Object Description Information group -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>ageUnit</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>contentLanguages|contentLanguage</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>contentObjectGroupList/*/contentObjectType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>contentPositions|contentPosition</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>contentScripts|contentScript</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>measuredPartGroupList/*/measuredPart</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>measuredPartGroupList/*/dimensionSubGroupList/*/dimension</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>measuredPartGroupList/*/dimensionSubGroupList/*/measurementUnit</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>measuredPartGroupList/*/dimensionSubGroupList/*/measurementMethod</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>forms|form</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>textualInscriptionGroupList/*/inscriptionContentLanguage</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>textualInscriptionGroupList/*/inscriptionContentPosition</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>textualInscriptionGroupList/*/inscriptionContentScript</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>textualInscriptionGroupList/*/inscriptionContentType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>nonTextualInscriptionGroupList/*/inscriptionDescriptionPosition</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>nonTextualInscriptionGroupList/*/inscriptionDescriptionType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>objectStatusList|objectStatus</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>phase</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>sex</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                                                        <types:value>technicalAttributeGroupList/*/technicalAttribute</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                                                        <types:value>technicalAttributeGroupList/*/technicalAttributeMeasurement</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                                                        <types:value>technicalAttributeGroupList/*/technicalAttributeMeasurementUnit</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>objectComponentGroupList/*/objectComponentInformation</types:value>
             </types:item>
                         <!-- Object Production Information group -->
                         <!-- There are currently no term references in this group -->
                         <!-- Object History and Association Information group -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>assocActivityGroupList/*/assocActivity</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>assocConceptGroupList/*/assocConcept</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>assocCulturalContextGroupList/*/assocCulturalContext</types:value>
             </types:item>
                         <!-- for associatedEvent, per CSPACE-3229. -->
                         <!-- Names of ancestor elements below are placeholders and subject to change. -->
                         <!--
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>assocEventGroupList/*/assocEventName</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>assocEventGroupList/*/assocEventNameType</types:value>
             </types:item>
             -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>assocObjectGroupList/*/assocObject</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>assocObjectGroupList/*/assocObjectType</types:value>
             </types:item>
                         <!-- for 'owner', per CSPACE-3229. -->
                         <!-- Names of ancestor elements below are placeholders and subject to change. -->
                         <!--
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                                                        <types:value>ownerGroupList/*/ownershipAccess</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                                                        <types:value>ownerGroupList/*/ownershipCategory</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                                                        <types:value>ownerGroupList/*/ownershipExchangeMethod</types:value>
             </types:item>
             -->
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>usageGroupList/*/usage</types:value>
                         </types:item>
                         <!-- Reference Information group -->
                         <!-- There are currently no term references in this group -->
                         <!-- Object Collection Information group -->
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>fieldCollectionMethods|fieldCollectionMethod</types:value>
                         </types:item>
     <!-- begin blob service meta-data -->
                <!-- This should likely be type="object" -->
     <tenant:serviceBindings id="Blobs" name="Blobs" type="utility" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/blobs/*/workflow/</service:uriPath>
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.blob.nuxeo.BlobDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/blobs/*/workflow/</service:uriPath>
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.blob.nuxeo.BlobDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.blob.nuxeo.BlobValidatorHandler</service:validatorHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Blob" version="0.1">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.blob.nuxeo.BlobValidatorHandler</service:validatorHandler>
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Blob" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="blob-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="blobs_common" updated="" order="1">
     
     <!-- begin intake service meta-data -->
     <tenant:serviceBindings id="Intakes" name="Intakes" type="procedure" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/intakes/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/intakes/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /intakes/*/authorityrefs/
             </service:uriPath>
             -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.intake.nuxeo.IntakeDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.intake.nuxeo.IntakeDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.group.nuxeo.IntakeDocumentModelHandler</service:classname>
         <service:params>
           <service:SchemaName>intakes</service:SchemaName>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams> 
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.intake.nuxeo.IntakeValidatorHandler</service:validatorHandler>
-      <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.intake.nuxeo.IntakeValidatorHandler</service:validatorHandler>
+      <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNameProperty</types:key>
                     <types:value>currentOwner</types:value>
                 </types:item>
-                <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNumberProperty</types:key>
           <types:value>entryNumber</types:value>
         </types:item>
       </service:properties>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Intake" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Intake" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="intakes-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="intakes_common" updated="" order="1">
           <service:properties>
                         <!-- Fields containing authority term references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>currentOwner</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>depositor</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>fieldCollectionPlace</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>fieldCollectionSources|fieldCollectionSource</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>fieldCollectors|fieldCollector</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>fieldCollectionEventNames|fieldCollectionEventName</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>authRef</types:key>
               <types:value>valuer</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>insurers|insurer</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>currentLocationGroupList/*/currentLocation</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>normalLocation</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>conditionCheckersOrAssessors|conditionCheckerOrAssessor</types:value>
             </types:item>
                         <!-- Fields containing term list / controlled vocabulary references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>entryMethods|entryMethod</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>entryReason</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>fieldCollectionMethods|fieldCollectionMethod</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>currentLocationGroupList/*/currentLocationFitness</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>conditionCheckMethods|conditionCheckMethod</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>conditionCheckReasons|conditionCheckReason</types:value>
             </types:item>
         
     <!-- begin loanin service meta-data -->
     <tenant:serviceBindings id="Loansin" name="Loansin" type="procedure" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/loansin/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/loansin/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /loansin/*/authorityrefs/
             </service:uriPath>
             -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.loanin.nuxeo.LoaninDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.loanin.nuxeo.LoaninDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.loanin.nuxeo.LoaninDocumentModelHandler</service:classname>
         <service:params>
           <service:SchemaName>loansin</service:SchemaName>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.loanin.nuxeo.LoaninValidatorHandler</service:validatorHandler>
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.loanin.nuxeo.LoaninValidatorHandler</service:validatorHandler>
       <!-- This block is likely cruft; see CSPACE-4475 -->
-      <s:initHandler xmlns:s="http://collectionspace.org/services/common/service">
+      <s:initHandler xmlns:s="http://collectionspace.org/services/config/service">
         <s:classname>org.collectionspace.services.common.init.InitHandler</s:classname>
         <s:params>
           <s:field>
       </s:initHandler>
       <!-- This tenant:properties block is likely cruft; see CSPACE-4475 -->
       <tenant:properties>
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>datePattern</types:key>
           <types:value>MMM dd, yyyy</types:value>
         </types:item>
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>datePattern</types:key>
           <types:value>dd.MM.yyyy</types:value>
         </types:item>
                     <types:value>dd/MM/yyyy</types:value>
                 </types:item>
                 -->
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>localeLanguage</types:key>
           <types:value>en</types:value>
         </types:item>
                 </types:item>
                 -->
       </tenant:properties>
-      <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNameProperty</types:key>
                     <types:value>lenderGroupList/[0]/lender</types:value>
                 </types:item>
-                <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNumberProperty</types:key>
           <types:value>loanInNumber</types:value>
         </types:item>
       </service:properties>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Loanin" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Loanin" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="loansin-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="loansin_common" updated="" order="1">
           <service:properties>
                         <!-- Fields containing authority term references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>lenderGroupList/*/lender</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>lenderGroupList/*/lendersAuthorizer</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
                <types:key>authRef</types:key>
                             <types:value>lenderGroupList/*/lendersContact</types:value>                          
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>borrowersAuthorizer</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>borrowersContact</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
                <types:key>authRef</types:key>
                             <types:value>loanInContact</types:value>
             </types:item>
                         <!-- Fields containing term list / controlled vocabulary references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>loanPurpose</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                                                        <types:value>loanStatusGroupList/*/loanStatus</types:value>
             </types:item>
     
     <!-- begin loanout service meta-data -->
     <tenant:serviceBindings id="Loansout" name="Loansout" type="procedure" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/loansout/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/loansout/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /loansout/*/authorityrefs/
             </service:uriPath>
             -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.loanout.nuxeo.LoanoutDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.loanout.nuxeo.LoanoutDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.loanout.nuxeo.LoanoutValidatorHandler</service:validatorHandler>
-            <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-                <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.loanout.nuxeo.LoanoutValidatorHandler</service:validatorHandler>
+            <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+                <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNameProperty</types:key>
                     <types:value>borrower</types:value>
                 </types:item>
-                <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNumberProperty</types:key>
                     <types:value>loanOutNumber</types:value>
                 </types:item>
             </service:properties>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Loanout" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Loanout" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="loansout-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="loansout_common" updated="" order="1">
           <service:properties>
                         <!-- Fields containing authority term references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>borrower</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>borrowersContact</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>lendersAuthorizer</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>lendersContact</types:value>
             </types:item>
                         <!-- Fields containing term list / controlled vocabulary references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>loanPurpose</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                                                        <types:value>loanStatusGroupList/*/loanStatus</types:value>
             </types:item>
     
     <!-- begin objectexit service meta-data -->
     <tenant:serviceBindings id="ObjectExit" name="ObjectExit" type="procedure" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/objectexit/*/workflow/</service:uriPath>
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.objectexit.nuxeo.ObjectExitDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/objectexit/*/workflow/</service:uriPath>
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.objectexit.nuxeo.ObjectExitDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.objectexit.nuxeo.ObjectExitDocumentModelHandler</service:classname>
         <service:params>
           <service:ListResultsFields>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.objectexit.nuxeo.ObjectExitValidatorHandler</service:validatorHandler>
-      <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.objectexit.nuxeo.ObjectExitValidatorHandler</service:validatorHandler>
+      <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNameProperty</types:key>
           <types:value>currentOwner</types:value>
         </types:item>
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNumberProperty</types:key>
           <types:value>exitNumber</types:value>
         </types:item>
       </service:properties>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="ObjectExit" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="ObjectExit" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="objectexit-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="objectexit_common" updated="" order="1">
           <service:properties>
                         <!-- Fields containing authority term references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>currentOwner</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>depositor</types:value>
             </types:item>
                         <!-- Fields containing term list / controlled vocabulary references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>exitMethods|exitMethod</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>exitReason</types:value>
             </types:item>
     
     <!-- begin batch service meta-data -->
     <tenant:serviceBindings id="Batch" name="Batch" type="utility" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/batch/*/workflow/</service:uriPath>
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.batch.nuxeo.BatchDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/batch/*/workflow/</service:uriPath>
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.batch.nuxeo.BatchDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.batch.nuxeo.BatchValidatorHandler</service:validatorHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Batch" version="0.1">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.batch.nuxeo.BatchValidatorHandler</service:validatorHandler>
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Batch" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="batch-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="batch_common" updated="" order="1">
     
     <!-- begin group service meta-data -->
     <tenant:serviceBindings id="Groups" name="Groups" type="procedure" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/groups/*/workflow/</service:uriPath>
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.group.nuxeo.GroupDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/groups/*/workflow/</service:uriPath>
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.group.nuxeo.GroupDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.group.nuxeo.GroupValidatorHandler</service:validatorHandler>
-      <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.group.nuxeo.GroupValidatorHandler</service:validatorHandler>
+      <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNameProperty</types:key>
           <types:value>groups_common:owner</types:value>
         </types:item>
-                               <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                               <types:item xmlns:types="http://collectionspace.org/services/config/types">
                                                <types:key>objectNumberProperty</types:key>
                                                <types:value>groups_common:title</types:value>
                                </types:item>
       </service:properties>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Group" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Group" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="group-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="groups_common" updated="" order="1">
           <service:properties>
                         <!-- Fields containing authority term references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>owner</types:value>
             </types:item>
                         <!-- Fields containing term list / controlled vocabulary references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>responsibleDepartment</types:value>
             </types:item>
     
     <!-- begin imports service meta-data -->
     <tenant:serviceBindings id="Imports" name="Imports" type="utility" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/imports/*/workflow/</service:uriPath>
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.imports.nuxeo.ImportsDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/imports/*/workflow/</service:uriPath>
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.imports.nuxeo.ImportsDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.imports.nuxeo.ImportsDocumentModelHandler</service:classname>
         <service:params>
           <service:SchemaName>imports</service:SchemaName>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Imports" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Imports" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="imports-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="imports_common" updated="" order="1">
     <!-- begin media service meta-data -->
                <!-- This should likely be type="object" -->
      <tenant:serviceBindings id="Media" name="Media" type="procedure" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/media/*/workflow/</service:uriPath>
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.media.nuxeo.MediaDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/media/*/workflow/</service:uriPath>
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.media.nuxeo.MediaDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.media.nuxeo.MediaValidatorHandler</service:validatorHandler>
-            <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-                <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.media.nuxeo.MediaValidatorHandler</service:validatorHandler>
+            <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+                <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNameProperty</types:key>
                     <types:value>title</types:value>
                 </types:item>
-                <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNumberProperty</types:key>
                     <types:value>identificationNumber</types:value>
                 </types:item>
             </service:properties>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Media" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Media" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="media-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="media_common" updated="" order="1">
           <service:properties>
                         <!-- Fields containing authority term references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>contributor</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>coverage</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>creator</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>publisher</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>rightsHolder</types:value>
             </types:item>
             <!-- Subject Authority field -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>subjectList|subject</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>measuredPartGroupList/*/dimensionSubGroupList/*/measuredBy</types:value>
             </types:item>
                         <!-- Fields containing term list / controlled vocabulary references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>languageList|language</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>typeList|type</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>measuredPartGroupList/*/dimensionSubGroupList/*/dimension</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>measuredPartGroupList/*/dimensionSubGroupList/*/measurementUnit</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>measuredPartGroupList/*/dimensionSubGroupList/*/measurementMethod</types:value>
             </types:item>
         
     <!-- begin movement service meta-data -->
     <tenant:serviceBindings id="Movements" name="Movements" type="procedure" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/movements/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/movements/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /movements/*/authorityrefs/
             </service:uriPath>
             -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.movement.nuxeo.MovementDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.movement.nuxeo.MovementDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.movement.nuxeo.MovementValidatorHandler</service:validatorHandler>
-      <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.movement.nuxeo.MovementValidatorHandler</service:validatorHandler>
+      <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
             <types:key>objectNameProperty</types:key>
             <types:value>currentLocation</types:value>
         </types:item>
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
             <types:key>objectNumberProperty</types:key>
             <types:value>movementReferenceNumber</types:value>
         </types:item>
     </service:properties>
-    <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+    <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
         <service:params>
             <service:field>
             </service:field>
         </service:params>
     </service:initHandler>
-    <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Movement" version="0.1">
+    <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Movement" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="movements-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="movements_common" updated="" order="1">
                         <!-- See CSPACE-4474 for possible additional authRef and termRef entries -->
                         <!-- Fields containing authority term references -->
                         <!-- Object Location Information group -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>currentLocation</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>normalLocation</types:value>
             </types:item>
                         <!-- Movement Information group -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>movementContact</types:value>
             </types:item>
                          <!-- Inventory Control Information group -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>inventoryContactList|inventoryContact</types:value>
             </types:item>
                         <!-- Fields containing term list / controlled vocabulary references -->
                         <!-- Object Location Information group -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>currentLocationFitness</types:value>
             </types:item>
                         <!-- Movement Information group -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>movementMethods|movementMethod</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>reasonForMove</types:value>
             </types:item>
                         <!-- Inventory Control Information group -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>inventoryActionRequired</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>frequencyForInventory</types:value>
             </types:item>
     
     <!-- begin Workflow service meta-data -->
     <tenant:serviceBindings id="Workflow" name="Workflow" type="utility" version="0.1">
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.common.workflow.service.nuxeo.WorkflowDocumentModelHandler</service:documentHandler>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.workflow.nuxeo.WorkflowValidatorHandler</service:validatorHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Workflow" version="0.1">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.common.workflow.service.nuxeo.WorkflowDocumentModelHandler</service:documentHandler>
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.workflow.nuxeo.WorkflowValidatorHandler</service:validatorHandler>
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Workflow" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="workflow-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="workflow_common" updated="" order="1">
         
     <!-- begin report service meta-data -->
     <tenant:serviceBindings id="Reports" name="Reports" type="utility" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/reports/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/reports/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /reports/*/output/
             </service:uriPath>-->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.report.nuxeo.ReportDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.report.nuxeo.ReportDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
                        </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.report.nuxeo.ReportValidatorHandler</service:validatorHandler>
-      <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.report.nuxeo.ReportValidatorHandler</service:validatorHandler>
+      <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.report.nuxeo.ReportPostInitHandler</service:classname>
         <service:params>
           <service:property>
           </service:property>
         </service:params>
       </service:initHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Report" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Report" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="reports-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="reports_common" updated="" order="1">
     
     <!-- begin vocabulary service meta-data -->
     <tenant:serviceBindings id="Vocabularies" name="Vocabularies" type="utility" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/vocabularies/*/workflow/</service:uriPath>
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/vocabularies/*/items/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/vocabularies/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/vocabularies/*/items/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.vocabulary.nuxeo.VocabularyDocumentModelHandler</service:documentHandler>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.vocabulary.nuxeo.VocabularyValidatorHandler</service:validatorHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.vocabulary.nuxeo.VocabularyDocumentModelHandler</service:documentHandler>
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.vocabulary.nuxeo.VocabularyValidatorHandler</service:validatorHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
      </service:DocHandlerParams>
-     <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+     <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
         <service:params>
           <service:field>
           </service:field>
         </service:params>
       </service:initHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Vocabulary" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Vocabulary" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="vocabularies-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="vocabularies_common" updated="" order="1">
             Repository workspace so we have to configure that.
         -->
     <tenant:serviceBindings id="Vocabularyitems" name="Vocabularyitems" type="authority" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/vocabularyitems/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/vocabularyitems/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
       <!--
-                        <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+                        <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /vocabularies/*/items/
             </service:uriPath>
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /vocabularies/*/items/*/refObjs
             </service:uriPath>
                         -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.vocabulary.nuxeo.VocabularyItemDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.vocabulary.nuxeo.VocabularyItemDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
                                                <!-- Omit the standard AuthorityItem items (they are handled by the code) -->
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.vocabulary.nuxeo.VocabularyItemValidatorHandler</service:validatorHandler>
-      <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.vocabulary.nuxeo.VocabularyItemValidatorHandler</service:validatorHandler>
+      <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
         <service:params>
           <service:field>
           </service:field>
         </service:params>
       </service:initHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Vocabularyitem" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Vocabularyitem" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="vocabularyitems-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="vocabularyitems_common" updated="" order="1">
     
     <!-- begin orgauthority service meta-data -->
     <tenant:serviceBindings id="Orgauthorities" name="Orgauthorities" type="utility" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/orgauthorities/*/workflow/</service:uriPath>
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/orgauthorities/*/items/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/orgauthorities/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/orgauthorities/*/items/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /orgauthorities/*/items/*/authorityrefs/
             </service:uriPath>
             -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.organization.nuxeo.OrgAuthorityDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.organization.nuxeo.OrgAuthorityDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.organization.nuxeo.OrgAuthorityValidatorHandler</service:validatorHandler>
-      <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.organization.nuxeo.OrgAuthorityValidatorHandler</service:validatorHandler>
+      <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
         <service:params>
           <service:field>
           </service:field>
         </service:params>
       </service:initHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" id="1" name="Orgauthority" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" id="1" name="Orgauthority" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="orgauthorities-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="orgauthorities_common" updated="" order="1">
     <tenant:serviceBindings id="Organizations" name="Organizations" type="authority" version="0.1">
             <!-- other URI paths through which this service could be accessed -->
             <!-- 
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /orgauthorities/*/items/
             </service:uriPath>
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /orgauthorities/*/items/*/refObjs
             </service:uriPath>
             -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.organization.nuxeo.OrganizationDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.organization.nuxeo.OrganizationDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
                                        <!-- Omit the standard AuthorityItem items (they are handled by the code) -->
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.organization.nuxeo.OrganizationValidatorHandler</service:validatorHandler>
-      <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.organization.nuxeo.OrganizationValidatorHandler</service:validatorHandler>
+      <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
         <service:params>
           <service:field>
           </service:field>
         </service:params>
       </service:initHandler>
-      <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNameProperty</types:key>
           <types:value>displayName</types:value>
         </types:item>
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNumberProperty</types:key>
           <types:value>shortIdentifier</types:value>
         </types:item>
       </service:properties>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" id="1" name="Organization" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" id="1" name="Organization" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="organizations-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="organizations_common" updated="" order="1">
           <service:properties>
                         <!-- See CSPACE-3939 for potential additional authRef and termRef entries -->
                         <!-- Fields containing authority term references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>contactNames|contactName</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>foundingPlace</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>groups|group</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>functions|function</types:value>
             </types:item>
                         <!-- Organization's subBody field was removed here from the authRef list -->
                         <!-- per anticipated work on CSPACE-4685.-->
                         <!-- Fields containing term list / controlled vocabulary references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>termStatus</types:value>
             </types:item>
         
     <!-- begin personauthority service meta-data -->
     <tenant:serviceBindings id="Personauthorities" name="Personauthorities" type="utility" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/personauthorities/*/workflow/</service:uriPath>
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/personauthorities/*/items/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/personauthorities/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/personauthorities/*/items/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /personauthorities/*/items/
             </service:uriPath>
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /personauthorities/*/items/*/refObjs
             </service:uriPath>
             -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.person.nuxeo.PersonAuthorityDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.person.nuxeo.PersonAuthorityDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.person.nuxeo.PersonAuthorityValidatorHandler</service:validatorHandler>
-      <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.person.nuxeo.PersonAuthorityValidatorHandler</service:validatorHandler>
+      <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
         <service:params>
           <service:field>
           </service:field>
         </service:params>
       </service:initHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" id="1" name="Personauthority" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" id="1" name="Personauthority" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="personauthorities-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="personauthorities_common" updated="" order="1">
     <tenant:serviceBindings id="Persons" name="Persons" type="authority" version="0.1">
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /personauthorities/*/items/
             </service:uriPath>
             -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.person.nuxeo.PersonDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.person.nuxeo.PersonDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
                                        <!-- Omit the standard AuthorityItem items (they are handled by the code) -->
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.person.nuxeo.PersonValidatorHandler</service:validatorHandler>
-      <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.person.nuxeo.PersonValidatorHandler</service:validatorHandler>
+      <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
         <service:params>
           <service:field>
           </service:field>
         </service:params>
       </service:initHandler>
-      <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNameProperty</types:key>
           <types:value>displayName</types:value>
         </types:item>
         <!-- there is no objectNumberProperty for persons -->
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNumberProperty</types:key>
           <types:value>shortIdentifier</types:value>
         </types:item>
       </service:properties>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" id="1" name="Person" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" id="1" name="Person" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="persons-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="persons_common" updated="" order="1">
           </service:content>
           <service:properties>
                         <!-- See CSPACE-3938 for potential additional authRef and termRef entries -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>birthPlace</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>deathPlace</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>groups|group</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>nationalities|nationality</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>occupations|occupation</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>schoolsOrStyles|schoolOrStyle</types:value>
             </types:item>
                         <!-- Fields containing term list / controlled vocabulary references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
               <types:value>salutation</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
               <types:value>title</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
               <types:value>gender</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>termStatus</types:value>
             </types:item>
         
     <!-- begin locationauthority service meta-data -->
     <tenant:serviceBindings id="Locationauthorities" name="Locationauthorities" type="utility" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/locationauthorities/*/workflow/</service:uriPath>
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/locationauthorities/*/items/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/locationauthorities/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/locationauthorities/*/items/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /locationauthorities/*/items/
             </service:uriPath>
             -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.location.nuxeo.LocationAuthorityDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.location.nuxeo.LocationAuthorityDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+      <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
         <service:params>
           <service:field>
           </service:field>
         </service:params>
       </service:initHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" id="1" name="Locationauthority" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" id="1" name="Locationauthority" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="locationauthorities-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="locationauthorities_common" updated="" order="1">
              Repository workspace so we have to configure that.
         -->
     <tenant:serviceBindings id="Locations" name="Locations" type="authority" version="0.1">
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.location.nuxeo.LocationDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.location.nuxeo.LocationDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
                                        <!-- Omit the standard AuthorityItem items (they are handled by the code) -->
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.location.nuxeo.LocationValidatorHandler</service:validatorHandler>
-      <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.location.nuxeo.LocationValidatorHandler</service:validatorHandler>
+      <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
         <service:params>
           <service:field>
           </service:field>
         </service:params>
       </service:initHandler>
-      <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-               <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+               <types:item xmlns:types="http://collectionspace.org/services/config/types">
                        <types:key>objectNameProperty</types:key>
                        <types:value>displayName</types:value>
                </types:item>
-               <types:item xmlns:types="http://collectionspace.org/services/common/types">
+               <types:item xmlns:types="http://collectionspace.org/services/config/types">
                        <types:key>objectNumberProperty</types:key>
                        <types:value>shortIdentifier</types:value>
                </types:item>
       </service:properties>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" id="1" name="Locationitem" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" id="1" name="Locationitem" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="locations-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="locations_common" updated="" order="1">
-          <service:properties xmlns:service="http://collectionspace.org/services/common/service">
+          <service:properties xmlns:service="http://collectionspace.org/services/config/service">
                         <!-- Fields containing term list / controlled vocabulary references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>locationType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>termStatus</types:value>
             </types:item>
     <!-- end location service meta-data -->
         <!-- begin placeauthority service meta-data -->
         <tenant:serviceBindings id="Placeauthorities" name="Placeauthorities" version="0.1">
-            <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/placeauthorities/*/workflow/</service:uriPath>
-            <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/placeauthorities/*/items/*/workflow/</service:uriPath>
+            <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/placeauthorities/*/workflow/</service:uriPath>
+            <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/placeauthorities/*/items/*/workflow/</service:uriPath>
             <!-- other URI paths using which this service could be accessed -->
             <!-- 
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /placeauthorities/*/items/
             </service:uriPath>-->
-            <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-            <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.place.nuxeo.PlaceAuthorityDocumentModelHandler</service:documentHandler>
-            <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+            <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+            <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.place.nuxeo.PlaceAuthorityDocumentModelHandler</service:documentHandler>
+            <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
                 <service:params>
                     <service:ListResultsFields>
                         <service:ListResultField>
                     </service:ListResultsFields>
                 </service:params>
             </service:DocHandlerParams>
-            <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+            <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
                 <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
                 <service:params>
                     <service:field>
                     </service:field>
                 </service:params>
             </service:initHandler>
-            <service:object xmlns:service="http://collectionspace.org/services/common/service" id="1" name="Placeauthority" version="0.1">
+            <service:object xmlns:service="http://collectionspace.org/services/config/service" id="1" name="Placeauthority" version="0.1">
                 <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="placeauthorities-system" updated="" order="0">
                     <service:content contentType="application/xml">
-                        <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd"/>
+                        <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd"/>
                     </service:content>
                 </service:part>
                 <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="placeauthorities_common" updated="" order="1">
              Repository workspace so we have to configure that.
         -->
         <tenant:serviceBindings id="Places" name="Places" version="0.1">
-            <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-            <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.place.nuxeo.PlaceDocumentModelHandler</service:documentHandler>
-            <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+            <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+            <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.place.nuxeo.PlaceDocumentModelHandler</service:documentHandler>
+            <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
                 <service:params>
                     <service:ListResultsFields>
                         <!-- Omit the standard AuthorityItem items (they are handled by the code) -->
                     </service:ListResultsFields>
                 </service:params>
             </service:DocHandlerParams>
-            <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.place.nuxeo.PlaceValidatorHandler</service:validatorHandler>
-            <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+            <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.place.nuxeo.PlaceValidatorHandler</service:validatorHandler>
+            <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
                 <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
                 <service:params>
                     <service:field>
                     </service:field>
                 </service:params>
             </service:initHandler>
-            <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-                <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+                <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNameProperty</types:key>
                     <types:value>displayName</types:value>
                 </types:item>
-                <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNumberProperty</types:key>
                     <types:value>shortIdentifier</types:value>
                 </types:item>
             </service:properties>
-            <service:object xmlns:service="http://collectionspace.org/services/common/service" id="1" name="Placeitem" version="0.1">
+            <service:object xmlns:service="http://collectionspace.org/services/config/service" id="1" name="Placeitem" version="0.1">
                 <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="places-system" updated="" order="0">
                     <service:content contentType="application/xml">
-                        <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd"/>
+                        <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd"/>
                     </service:content>
                 </service:part>
                 <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="places_common" updated="" order="1">
-                    <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                    <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>authRef</types:key>
                             <types:value>placeOwnerGroupList/*/owner</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>termStatus</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>placeType</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>placeNameGroupList/*/nameLanguage</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>placeNameGroupList/*/nameType</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>placeNameGroupList/*/nameStatus</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>placeNameGroupList/*/nameAdminStatus</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>vCoordSys</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>vSpatialReferenceSystem</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>vUnitofMeasure</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>placeGeoRefGroupList/*/geodeticDatum</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>placeGeoRefGroupList/*/geoRefProtocol</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>placeGeoRefGroupList/*/geoRefVerificationStatus</types:value>
                         </types:item>
         <!-- end place service meta-data -->
     <!-- begin taxonomyauthority service meta-data -->
     <tenant:serviceBindings id="Taxonomyauthority" name="Taxonomyauthority" type="utility" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/taxonomyauthority/*/workflow/</service:uriPath>
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/taxonomyauthority/*/items/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/taxonomyauthority/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/taxonomyauthority/*/items/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /taxonomyauthority/*/items/
             </service:uriPath>
             -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.taxonomy.nuxeo.TaxonomyAuthorityDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.taxonomy.nuxeo.TaxonomyAuthorityDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+      <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
         <service:params>
           <service:field>
           </service:field>
         </service:params>
       </service:initHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" id="1" name="Taxonomyauthority" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" id="1" name="Taxonomyauthority" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="taxonomyauthority-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="taxonomyauthority_common" updated="" order="1">
              Repository workspace so we have to configure that.
         -->
     <tenant:serviceBindings id="Taxon" name="Taxon" type="authority" version="0.1">
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.taxonomy.nuxeo.TaxonDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.taxonomy.nuxeo.TaxonDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
                                        <!-- Omit the standard AuthorityItem items (they are handled by the code) -->
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.taxonomy.nuxeo.TaxonValidatorHandler</service:validatorHandler>
-      <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.taxonomy.nuxeo.TaxonValidatorHandler</service:validatorHandler>
+      <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
         <service:params>
           <service:field>
           </service:field>
         </service:params>
       </service:initHandler>
-      <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNameProperty</types:key>
           <types:value>displayName</types:value>
         </types:item>
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNumberProperty</types:key>
           <types:value>shortIdentifier</types:value>
         </types:item>
       </service:properties>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" id="1" name="Taxon" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" id="1" name="Taxon" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="taxon-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="taxon_common" updated="" order="1">
-          <service:properties xmlns:service="http://collectionspace.org/services/common/service">
+          <service:properties xmlns:service="http://collectionspace.org/services/config/service">
                         <!-- Fields containing authority term references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>taxonAuthorGroupList/*/taxonAuthor</types:value>
             </types:item>
                         <!-- Fields containing term list / controlled vocabulary references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>taxonRank</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>taxonCurrency</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>taxonAuthorGroupList/*/taxonAuthorType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>taxonomicStatus</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>taxonNameSource</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>termStatus</types:value>
             </types:item>
     
     <!-- begin acquisition service meta-data -->
     <tenant:serviceBindings id="Acquisitions" name="Acquisitions" type="procedure" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/acquisitions/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/acquisitions/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /acquisitions/*/authorityrefs/
             </service:uriPath>
             -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.acquisition.nuxeo.AcquisitionDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.acquisition.nuxeo.AcquisitionDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.acquisition.nuxeo.AcquisitionValidatorHandler</service:validatorHandler>
-      <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.acquisition.nuxeo.AcquisitionValidatorHandler</service:validatorHandler>
+      <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNameProperty</types:key>
                     <types:value>acquisitionSources/[0]</types:value>
                     </types:item>
-                <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNumberProperty</types:key>
           <types:value>acquisitionReferenceNumber</types:value>
         </types:item>
       </service:properties>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Acquisition" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Acquisition" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="acquisitions-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="acquisitions_common" updated="" order="1">
           <service:properties>
                         <!-- Fields containing authority term references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>acquisitionAuthorizer</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                             <types:value>acquisitionFundingList/*/acquisitionFundingSource</types:value>
                         </types:item>
-                        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+                        <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>authRef</types:key>
               <types:value>owners|owner</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>acquisitionSources|acquisitionSource</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
               <types:value>fieldCollectionEventNames|fieldCollectionEventName</types:value>
             </types:item>
                         <!-- Fields containing term list / controlled vocabulary references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
                             <types:key>termRef</types:key>
                             <types:value>acquisitionFundingList/*/acquisitionFundingCurrency</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>acquisitionMethod</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>groupPurchasePriceCurrency</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>objectOfferPriceCurrency</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>objectPurchaseOfferPriceCurrency</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
               <types:value>objectPurchasePriceCurrency</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>originalObjectPurchasePriceCurrency</types:value>
             </types:item>
     
     <!-- begin relation service meta-data -->
     <tenant:serviceBindings id="Relations" name="Relations" type="utility" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/relations/*/workflow/</service:uriPath>
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/relations/*/workflow/</service:uriPath>
             <!-- other URI paths through which this service could be accessed -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.relation.nuxeo.RelationDocumentModelHandler</service:documentHandler>
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.relation.nuxeo.RelationDocumentModelHandler</service:documentHandler>
       <!-- Configuration of list results fields for relation items is commented out for now, -->
       <!-- pending resolution of how to specify nested elements in list results. -->
       <!--
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           and hence containers for, as many as eight child fields.  See
           services/jaxb/src/main/resources/relations_common.xsd
       -->
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.relation.nuxeo.RelationValidatorHandler</service:validatorHandler>
-      <service:properties xmlns:service="http://collectionspace.org/services/common/service">
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.relation.nuxeo.RelationValidatorHandler</service:validatorHandler>
+      <service:properties xmlns:service="http://collectionspace.org/services/config/service">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNameProperty</types:key>
           <types:value>subjectCsid</types:value>
         </types:item>
-        <types:item xmlns:types="http://collectionspace.org/services/common/types">
+        <types:item xmlns:types="http://collectionspace.org/services/config/types">
           <types:key>objectNumberProperty</types:key>
           <types:value>predicateDisplayName</types:value>
         </types:item>
       </service:properties>
-      <service:initHandler xmlns:service="http://collectionspace.org/services/common/service">
+      <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
         <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
         <service:params>
           <!-- The database index that is to be created for the ubiquitious updatedAt field -->
           </service:field>
         </service:params>
       </service:initHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Relation" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Relation" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="relations-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="relations_common" updated="" order="1">
     <!-- begin account service meta-data -->
     <tenant:serviceBindings id="Accounts" name="Accounts" type="security" version="0.1">
             <!-- other URI paths through which this service could be accessed -->
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.account.storage.AccountDocumentHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.account.storage.AccountDocumentHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
           </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.account.storage.AccountValidatorHandler</service:validatorHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Acccount" version="0.1">
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.account.storage.AccountValidatorHandler</service:validatorHandler>
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Acccount" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="accounts_system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="accounts_common" updated="" order="1">
     <!-- begin dimension service meta-data -->
     <tenant:serviceBindings id="Dimensions" name="Dimensions" type="utility" version="0.1">
             <!-- other URI paths through which this service could be accessed -->
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/dimensions/*/workflow/</service:uriPath>
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.dimension.nuxeo.DimensionDocumentModelHandler</service:documentHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Dimension" version="0.1">
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/dimensions/*/workflow/</service:uriPath>
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.dimension.nuxeo.DimensionDocumentModelHandler</service:documentHandler>
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Dimension" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="dimensions-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="dimensions_common" updated="" order="1">
     <tenant:serviceBindings id="Contacts" name="Contacts" type="utility" version="0.1">
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /personauthorities/*/items/*/contacts
             </service:uriPath>
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /orgauthorities/*/items/*/contacts
             </service:uriPath>
             -->
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.contact.nuxeo.ContactDocumentModelHandler</service:documentHandler>
-      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/common/service">
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.contact.nuxeo.ContactDocumentModelHandler</service:documentHandler>
+      <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
         <service:params>
           <service:ListResultsFields>
             <service:ListResultField>
            </service:ListResultsFields>
         </service:params>
       </service:DocHandlerParams>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Contact" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Contact" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="contacts-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="contacts_common" updated="" order="1">
           <service:properties>
                         <!-- Fields containing authority term references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>addressGroupList/*/addressMunicipality</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>addressGroupList/*/addressStateOrProvince</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>authRef</types:key>
                                                        <types:value>addressGroupList/*/addressCountry</types:value>
             </types:item>
                         <!-- Fields containing term list / controlled vocabulary references -->
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                                                        <types:value>emailGroupList/*/emailType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>telephoneNumberGroupList/*/telephoneNumberType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>faxNumberGroupList/*/faxNumberType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                             <types:value>webAddressGroupList/*/webAddressType</types:value>
             </types:item>
-            <types:item xmlns:types="http://collectionspace.org/services/common/types">
+            <types:item xmlns:types="http://collectionspace.org/services/config/types">
               <types:key>termRef</types:key>
                                                        <types:value>addressGroupList/*/addressType</types:value>
             </types:item>
     
     <!-- begin note service meta-data -->
     <tenant:serviceBindings id="Notes" name="Notes" type="utility" version="0.1">
-      <service:uriPath xmlns:service="http://collectionspace.org/services/common/service">/notes/*/workflow/</service:uriPath>
-      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/common/service">default-domain</service:repositoryDomain>
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.note.nuxeo.NoteDocumentModelHandler</service:documentHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="CSNote" version="0.1">
+      <service:uriPath xmlns:service="http://collectionspace.org/services/config/service">/notes/*/workflow/</service:uriPath>
+      <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.note.nuxeo.NoteDocumentModelHandler</service:documentHandler>
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="CSNote" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="notes-system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="notes_common" updated="" order="1">
     <!-- begin role service meta-data -->
     <tenant:serviceBindings id="authorization/roles" name="authorization/roles" type="security" version="0.1">
             <!-- other URI paths through which this service could be accessed -->
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.authorization.storage.RoleDocumentHandler</service:documentHandler>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.authorization.storage.RoleValidatorHandler</service:validatorHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Role" version="0.1">
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.authorization.storage.RoleDocumentHandler</service:documentHandler>
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.authorization.storage.RoleValidatorHandler</service:validatorHandler>
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Role" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="roles_system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="roles" updated="" order="1">
     <!-- begin permission service meta-data -->
     <tenant:serviceBindings id="authorization/permissions" name="authorization/permissions" type="security" version="0.1">
             <!-- other URI paths through which this service could be accessed -->
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.authorization.storage.PermissionDocumentHandler</service:documentHandler>
-      <service:validatorHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.authorization.storage.PermissionValidatorHandler</service:validatorHandler>
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="Permission" version="0.1">
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.authorization.storage.PermissionDocumentHandler</service:documentHandler>
+      <service:validatorHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.authorization.storage.PermissionValidatorHandler</service:validatorHandler>
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="Permission" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="permissions_system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="permissions" updated="" order="1">
     <tenant:serviceBindings id="authorization/permissions/permroles" name="authorization/permissions/permroles" type="security" version="0.1">
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /authorization/permissions/*/permroles/
             </service:uriPath>
             -->
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.authorization.storage.PermissionRoleDocumentHandler</service:documentHandler>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.authorization.storage.PermissionRoleDocumentHandler</service:documentHandler>
             <!--
-            <service:validatorHandler xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:validatorHandler xmlns:service='http://collectionspace.org/services/config/service'>
                 org.collectionspace.services.authorization.storage.PermissionRoleValidatorHandler
             </service:validatorHandler>
             -->
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="PermissionRole" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="PermissionRole" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="permroles_system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="permroles" updated="" order="1">
     <tenant:serviceBindings id="accounts/accountroles" name="accounts/accountroles" type="security" version="0.1">
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /accounts/*/accountroles/
             </service:uriPath>
             -->
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.account.storage.AccountRoleDocumentHandler</service:documentHandler>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.account.storage.AccountRoleDocumentHandler</service:documentHandler>
             <!--
-            <service:validatorHandler xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:validatorHandler xmlns:service='http://collectionspace.org/services/config/service'>
                 org.collectionspace.services.account.storage.AccountRoleDocumentHandler
             </service:validatorHandler>
             -->
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="AccountRole" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="AccountRole" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="accountroles_system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="accountroles" updated="" order="1">
     <tenant:serviceBindings id="authorization/roles/permroles" name="authorization/roles/permroles" type="security" version="0.1">
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /authorization/roles/*/permroles/
             </service:uriPath>
             -->
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.authorization.storage.PermissionRoleDocumentHandler</service:documentHandler>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.authorization.storage.PermissionRoleDocumentHandler</service:documentHandler>
             <!--
-            <service:validatorHandler xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:validatorHandler xmlns:service='http://collectionspace.org/services/config/service'>
                 org.collectionspace.services.authorization.storage.PermissionRoleValidatorHandler
             </service:validatorHandler>
             -->
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="PermissionRole" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="PermissionRole" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="permroles_system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="permroles" updated="" order="1">
     <tenant:serviceBindings id="authorization/roles/accountroles" name="authorization/roles/accountroles" type="security" version="0.1">
             <!-- other URI paths through which this service could be accessed -->
             <!--
-            <service:uriPath xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:uriPath xmlns:service='http://collectionspace.org/services/config/service'>
                 /authorization/roles/*/accountroles/
             </service:uriPath>
             -->
-      <service:documentHandler xmlns:service="http://collectionspace.org/services/common/service">org.collectionspace.services.account.storage.AccountRoleDocumentHandler</service:documentHandler>
+      <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.account.storage.AccountRoleDocumentHandler</service:documentHandler>
             <!--
-            <service:validatorHandler xmlns:service='http://collectionspace.org/services/common/service'>
+            <service:validatorHandler xmlns:service='http://collectionspace.org/services/config/service'>
                 org.collectionspace.services.authorization.storage.PermissionRoleValidatorHandler
             </service:validatorHandler>
             -->
-      <service:object xmlns:service="http://collectionspace.org/services/common/service" name="AccountRole" version="0.1">
+      <service:object xmlns:service="http://collectionspace.org/services/config/service" name="AccountRole" version="0.1">
         <service:part id="0" control_group="Managed" versionable="true" auditable="false" label="accountroles_system" updated="" order="0">
           <service:content contentType="application/xml">
-            <service:xmlContent namespaceURI="http://collectionspace.org/services/common/system" schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd" />
+            <service:xmlContent namespaceURI="http://collectionspace.org/services/config/system" schemaLocation="http://collectionspace.org/services/config/system http://collectionspace.org/services/config/system/system-response.xsd" />
           </service:content>
         </service:part>
         <service:part id="1" control_group="Managed" versionable="true" auditable="false" label="accountroles" updated="" order="1">
index 3f2d2896cdfdbdb87a100842f3f578e06a97d3bd..78242c97ab2003c5f1a6b758936701af618d4e61 100644 (file)
@@ -29,21 +29,17 @@ import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.common.api.RefName;\r
 import org.collectionspace.services.common.api.Tools;\r
 import org.collectionspace.services.common.authorityref.AuthorityRefList;\r
-import org.collectionspace.services.common.context.MultipartServiceContextImpl;\r
-import org.collectionspace.services.common.context.ServiceBindingUtils;\r
 import org.collectionspace.services.common.context.ServiceContext;\r
 import org.collectionspace.services.common.document.DocumentFilter;\r
 import org.collectionspace.services.common.document.DocumentHandler;\r
 import org.collectionspace.services.common.document.DocumentNotFoundException;\r
-import org.collectionspace.services.common.document.DocumentWrapper;\r
 import org.collectionspace.services.common.query.QueryManager;\r
-import org.collectionspace.services.common.security.UnauthorizedException;\r
 import org.collectionspace.services.common.vocabulary.RefNameServiceUtils;\r
 import org.collectionspace.services.common.vocabulary.RefNameServiceUtils.AuthRefConfigInfo;\r
+import org.collectionspace.services.config.ClientType;\r
 import org.collectionspace.services.jaxb.AbstractCommonList;\r
 import org.collectionspace.services.nuxeo.client.java.DocumentModelHandler;\r
 import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;\r
-import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput;\r
 import org.jboss.resteasy.util.HttpResponseCodes;\r
 import org.nuxeo.ecm.core.api.DocumentModel;\r
 import org.nuxeo.ecm.core.api.repository.RepositoryInstance;\r
@@ -52,7 +48,6 @@ import javax.ws.rs.*;
 import javax.ws.rs.core.*;\r
 \r
 import java.util.List;\r
-import java.util.Map;\r
 \r
 /**\r
  * $LastChangedRevision:  $\r
index 7d1a643249a92939d86c645d0b1e67f35f4f3ed6..0bf0add2d60c007f1fd6d653fe48b281475c2e05 100644 (file)
@@ -18,19 +18,24 @@ import javax.servlet.ServletContext;
 import javax.sql.DataSource;\r
 \r
 import org.collectionspace.authentication.AuthN;\r
+\r
+import org.collectionspace.services.config.service.InitHandler;\r
 import org.collectionspace.services.common.authorization_mgt.AuthorizationCommon;\r
 import org.collectionspace.services.common.config.ServicesConfigReaderImpl;\r
 import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl;\r
 import org.collectionspace.services.common.init.IInitHandler;\r
 import org.collectionspace.services.common.security.SecurityUtils;\r
-import org.collectionspace.services.common.service.*;\r
 import org.collectionspace.services.common.storage.JDBCTools;\r
 import org.collectionspace.services.common.storage.DatabaseProductType;\r
-import org.collectionspace.services.common.tenant.TenantBindingType;\r
-import org.collectionspace.services.common.types.PropertyItemType;\r
-import org.collectionspace.services.common.types.PropertyType;\r
+import org.collectionspace.services.config.ClientType;\r
+import org.collectionspace.services.config.ServiceConfig;\r
+import org.collectionspace.services.config.service.ServiceBindingType;\r
+import org.collectionspace.services.config.tenant.TenantBindingType;\r
+import org.collectionspace.services.config.types.PropertyItemType;\r
+import org.collectionspace.services.config.types.PropertyType;\r
 import org.collectionspace.services.nuxeo.client.java.NuxeoConnectorEmbedded;\r
 import org.collectionspace.services.nuxeo.client.java.TenantRepository;\r
+\r
 import org.slf4j.Logger;\r
 import org.slf4j.LoggerFactory;\r
 \r
@@ -202,7 +207,6 @@ public class ServiceMain {
             }\r
         }\r
     }\r
-    \r
 \r
     public void firePostInitHandlers() throws Exception {\r
        DataSource dataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_REPOSITORY_NAME);\r
@@ -215,15 +219,15 @@ public class ServiceMain {
             List<ServiceBindingType> sbtList = tbt.getServiceBindings();\r
             for (ServiceBindingType sbt: sbtList){\r
                 //Get the list of InitHandler elements, extract the first one (only one supported right now) and fire it using reflection.\r
-                List<org.collectionspace.services.common.service.InitHandler> list = sbt.getInitHandler();\r
+                List<org.collectionspace.services.config.service.InitHandler> list = sbt.getInitHandler();\r
                 if (list!=null && list.size()>0){\r
-                    org.collectionspace.services.common.service.InitHandler handlerType = list.get(0);\r
+                       org.collectionspace.services.config.service.InitHandler handlerType = list.get(0);\r
                     String initHandlerClassname = handlerType.getClassname();\r
 \r
-                    List<org.collectionspace.services.common.service.InitHandler.Params.Field>\r
+                    List<org.collectionspace.services.config.service.InitHandler.Params.Field>\r
                             fields = handlerType.getParams().getField();\r
 \r
-                    List<org.collectionspace.services.common.service.InitHandler.Params.Property>\r
+                    List<org.collectionspace.services.config.service.InitHandler.Params.Property>\r
                             props = handlerType.getParams().getProperty();\r
 \r
                     //org.collectionspace.services.common.service.InitHandler.Fields ft = handlerType.getFields();\r
index 45141ad0b5e22e3f3f0ce9710280699e2bc9224c..6dac00e22559f8a8bb9a0afc87a785d360ac220a 100644 (file)
@@ -7,17 +7,20 @@ import java.sql.SQLException;
 import java.sql.Statement;\r
 import java.util.ArrayList;\r
 import java.util.Date;\r
+import java.util.HashMap;\r
 import java.util.Hashtable;\r
 import java.util.List;\r
 import java.util.UUID;\r
 \r
 import javax.naming.NamingException;\r
+import javax.persistence.EntityManager;\r
+import javax.persistence.EntityManagerFactory;\r
 \r
 import org.collectionspace.services.authorization.AuthZ;\r
 import org.collectionspace.services.authorization.CSpaceAction;\r
-import org.collectionspace.services.authorization.PermissionActionUtil;\r
 import org.collectionspace.services.authorization.PermissionException;\r
 import org.collectionspace.services.authorization.PermissionRole;\r
+import org.collectionspace.services.authorization.PermissionRoleRel;\r
 import org.collectionspace.services.authorization.PermissionValue;\r
 import org.collectionspace.services.authorization.Role;\r
 import org.collectionspace.services.authorization.RoleValue;\r
@@ -30,16 +33,16 @@ import org.collectionspace.services.authorization.perms.PermissionAction;
 \r
 import org.collectionspace.services.client.RoleClient;\r
 import org.collectionspace.services.client.workflow.WorkflowClient;\r
-\r
-import org.collectionspace.services.common.authorization_mgt.AuthorizationStore;\r
 import org.collectionspace.services.common.config.ServiceConfigUtils;\r
 import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl;\r
 import org.collectionspace.services.common.document.DocumentHandler;\r
+import org.collectionspace.services.common.profile.Profiler;\r
 import org.collectionspace.services.common.security.SecurityUtils;\r
-import org.collectionspace.services.common.service.ServiceBindingType;\r
 import org.collectionspace.services.common.storage.DatabaseProductType;\r
 import org.collectionspace.services.common.storage.JDBCTools;\r
-import org.collectionspace.services.common.tenant.TenantBindingType;\r
+import org.collectionspace.services.common.storage.jpa.JpaStorageUtils;\r
+import org.collectionspace.services.config.service.ServiceBindingType;\r
+import org.collectionspace.services.config.tenant.TenantBindingType;\r
 \r
 import org.collectionspace.services.lifecycle.Lifecycle;\r
 import org.collectionspace.services.lifecycle.TransitionDef;\r
@@ -92,11 +95,15 @@ public class AuthorizationCommon {
        \r
     final static Logger logger = LoggerFactory.getLogger(AuthorizationCommon.class);\r
 \r
+    //\r
+    // The "super" role has a predefined ID of "0" and a tenant ID of "0";\r
+    //\r
     final public static String ROLE_ADMINISTRATOR = "ADMINISTRATOR";\r
-    final public static String ROLE_TENANT_ADMINISTRATOR = "TENANT_ADMINISTRATOR";\r
-    final public static String ROLE_TENANT_READER = "TENANT_READER";\r
     final public static String ROLE_ADMINISTRATOR_ID = "0";\r
     final public static String ADMINISTRATOR_TENANT_ID = "0";\r
+\r
+    final public static String ROLE_TENANT_ADMINISTRATOR = "TENANT_ADMINISTRATOR";\r
+    final public static String ROLE_TENANT_READER = "TENANT_READER";\r
        \r
     public static final String TENANT_ADMIN_ACCT_PREFIX = "admin@"; \r
     public static final String TENANT_READER_ACCT_PREFIX = "reader@"; \r
@@ -119,6 +126,16 @@ public class AuthorizationCommon {
         return role;\r
     }\r
     \r
+    public static Role getRole(EntityManager em, String tenantId, String displayName) {\r
+       Role role = null;\r
+       \r
+       String roleName = AuthorizationCommon.getQualifiedRoleName(tenantId, displayName);\r
+       role = AuthorizationStore.getRoleByName(em, roleName, tenantId);\r
+        \r
+        return role;\r
+    }\r
+    \r
+    \r
     public static Role createRole(String tenantId, String name, String description) {\r
        return createRole(tenantId, name, description, false /* mutable by default */);\r
     }\r
@@ -229,7 +246,10 @@ public class AuthorizationCommon {
                String resourceName,\r
                String description,\r
                ActionGroup actionGroup) {\r
-        String id = UUID.randomUUID().toString(); //FIXME: Could this be something like a refname instead of a UUID?\r
+//        String id = UUID.randomUUID().toString(); //FIXME: Could this be something like a refname instead of a UUID?\r
+        String id = tenantId\r
+                       + "-" + resourceName\r
+                       + "-" + actionGroup.name;\r
         Permission perm = new Permission();\r
         perm.setCsid(id);\r
         perm.setDescription(description);\r
@@ -257,12 +277,20 @@ public class AuthorizationCommon {
        Permission result = null;\r
        \r
        String tenantId = tenantBinding.getId();\r
-       String resourceName = serviceBinding.getName().toLowerCase().trim()\r
+       String resourceName = "/"\r
+                       + serviceBinding.getName().toLowerCase().trim()\r
                        + WorkflowClient.SERVICE_AUTHZ_SUFFIX\r
                        + transitionDef.getName();\r
-       String description = "A generate workflow permission for actiongroup " + actionGroup.name;\r
+       String description = "A generated workflow permission for actiongroup " + actionGroup.name;\r
        result = createPermission(tenantId, resourceName, description, actionGroup);\r
        \r
+       if (logger.isDebugEnabled() == true) {\r
+               logger.debug("Generated a workflow permission: "\r
+                               + result.getResourceName()\r
+                               + ":" + transitionDef.getName()\r
+                               + ":" + "tenant id=" + result.getTenantId());\r
+       }\r
+       \r
        return result;\r
     }\r
     \r
@@ -271,8 +299,13 @@ public class AuthorizationCommon {
                boolean enforceTenancy) throws Exception\r
     {\r
        PermissionRole permRole = new PermissionRole();\r
-       \r
-               if (enforceTenancy && role.getTenantId().equalsIgnoreCase(permission.getTenantId())) {\r
+       // Check to see if the tenant ID of the permission and the tenant ID of the role match\r
+       boolean tenantIdsMatch = role.getTenantId().equalsIgnoreCase(permission.getTenantId());\r
+       if (tenantIdsMatch == false && enforceTenancy == false) {\r
+               tenantIdsMatch = true; // If we don't need to enforce tenancy then we'll just consider them matched.\r
+       }\r
+                       \r
+               if (tenantIdsMatch == true) {\r
                permRole.setSubject(SubjectType.ROLE);\r
                //\r
                // Set of the permission value list of the permrole\r
@@ -303,48 +336,6 @@ public class AuthorizationCommon {
        return permRole;\r
     }\r
     \r
-    public static void createDefaultPermissions(TenantBindingConfigReaderImpl tenantBindingConfigReader) throws Exception\r
-    {\r
-        PermissionAction pa = new PermissionAction();\r
-        pa.getHjid();\r
-\r
-        Hashtable<String, TenantBindingType> tenantBindings =\r
-               tenantBindingConfigReader.getTenantBindings();\r
-        for (String tenantId : tenantBindings.keySet()) {\r
-               TenantBindingType tenantBinding = tenantBindings.get(tenantId);\r
-               for (ServiceBindingType serviceBinding : tenantBinding.getServiceBindings()) {\r
-                       try {\r
-                               DocumentHandler docHandler = ServiceConfigUtils.createDocumentHandlerInstance(\r
-                                               tenantBinding, serviceBinding);\r
-                               Lifecycle lifecycle = docHandler.getLifecycle();\r
-                               TransitionDefList transitionDefList = lifecycle.getTransitionDefList();\r
-                               for (TransitionDef transitionDef : transitionDefList.getTransitionDef()) {\r
-                                       //\r
-                                       // Create the permission for the admin role\r
-                                       //\r
-                                       Permission adminPerm = createWorkflowPermission(tenantBinding, serviceBinding, transitionDef, AuthorizationCommon.ACTIONGROUP_CRUDL);\r
-                                       Role adminRole = AuthorizationCommon.getRole(tenantBinding.getId(), AuthorizationCommon.ROLE_TENANT_ADMINISTRATOR);\r
-                                       PermissionRole adminPermRole = createPermissionRole(adminPerm, adminRole, true);\r
-                                       addPermissionsForUri(adminPerm, adminPermRole);\r
-                                       //\r
-                                       // Create the permission for the read-only role\r
-                                       Permission readonlyPerm = createWorkflowPermission(tenantBinding, serviceBinding, transitionDef, AuthorizationCommon.ACTIONGROUP_RL);\r
-                                       Role readonlyRole = AuthorizationCommon.getRole(tenantBinding.getId(), AuthorizationCommon.ROLE_TENANT_READER);\r
-                                       PermissionRole readonlyPermRole = createPermissionRole(readonlyPerm, readonlyRole, true);\r
-                                       addPermissionsForUri(readonlyPerm, readonlyPermRole);\r
-                                       //\r
-                                       // Create the permission for the super-admin role.  Note we use the same "adminPerm" instance we used for the "adminPermRole" instance\r
-                                       //\r
-                                       Role superRole = AuthorizationCommon.getRole(tenantBinding.getId(), AuthorizationCommon.ROLE_TENANT_READER);\r
-                                       PermissionRole superPermRole = createPermissionRole(adminPerm, superRole, false);\r
-                                       addPermissionsForUri(adminPerm, superPermRole);\r
-                               }\r
-                       } catch (IllegalStateException e) {\r
-                               logger.debug(e.getLocalizedMessage(), e); //We end up here if there is no document handler for the service -this is ok for some of the services.\r
-                       }\r
-               }\r
-        }\r
-    }\r
     \r
     /*\r
      * FIXME: REM - This method is way too big -over 300 lines!  We need to break it up into\r
@@ -764,6 +755,158 @@ public class AuthorizationCommon {
            return pa;\r
        }\r
        \r
+       private static TransitionDefList getTransitionDefList(TenantBindingType tenantBinding, ServiceBindingType serviceBinding) {\r
+               TransitionDefList result = null;\r
+               try {\r
+               DocumentHandler docHandler = ServiceConfigUtils.createDocumentHandlerInstance(\r
+                               tenantBinding, serviceBinding);\r
+               Lifecycle lifecycle = docHandler.getLifecycle();\r
+               if (lifecycle != null) {\r
+                       result = lifecycle.getTransitionDefList();\r
+               }\r
+               } catch (Exception e) {\r
+                       // Ignore this exception and return an empty non-null TransitionDefList\r
+               }\r
+               \r
+               if (result == null) {\r
+                       logger.warn("Could not retrieve a lifecycle transition definition list from: "\r
+                                       + serviceBinding.getName()\r
+                                       + " with tenant ID = "\r
+                                       + tenantBinding.getId());                       \r
+                       // return an empty list                 \r
+                       result = new TransitionDefList();\r
+               } else {\r
+                       logger.debug("Successfully etrieved a lifecycle transition definition list from: "\r
+                                       + serviceBinding.getName()\r
+                                       + " with tenant ID = "\r
+                                       + tenantBinding.getId());\r
+               }\r
+               \r
+               return result;\r
+       }\r
+       \r
+    public static void createDefaultPermissions(TenantBindingConfigReaderImpl tenantBindingConfigReader) throws Exception\r
+    {\r
+       AuthZ.get().login(); //login to Spring Security manager\r
+       \r
+        EntityManagerFactory emf = JpaStorageUtils.getEntityManagerFactory(JpaStorageUtils.CS_PERSISTENCE_UNIT);\r
+        EntityManager em = null;\r
+\r
+        try {\r
+            em = emf.createEntityManager();\r
+\r
+            Role superRole = AuthorizationCommon.getRole(em, ADMINISTRATOR_TENANT_ID, ROLE_ADMINISTRATOR);\r
+               Hashtable<String, TenantBindingType> tenantBindings =\r
+                       tenantBindingConfigReader.getTenantBindings();\r
+               for (String tenantId : tenantBindings.keySet()) {\r
+                       TenantBindingType tenantBinding = tenantBindings.get(tenantId);\r
+                       Role adminRole = AuthorizationCommon.getRole(em, tenantBinding.getId(), ROLE_TENANT_ADMINISTRATOR);\r
+                       Role readonlyRole = AuthorizationCommon.getRole(em, tenantBinding.getId(), ROLE_TENANT_READER);\r
+                       for (ServiceBindingType serviceBinding : tenantBinding.getServiceBindings()) {\r
+                               try {\r
+                                       TransitionDefList transitionDefList = getTransitionDefList(tenantBinding, serviceBinding);\r
+                                       for (TransitionDef transitionDef : transitionDefList.getTransitionDef()) {\r
+                                               em.getTransaction().begin();\r
+                                               /*\r
+                                               //\r
+                                               // Create the permission for the admin role\r
+                                               //\r
+                                               Permission adminPerm = createWorkflowPermission(tenantBinding, serviceBinding, transitionDef, ACTIONGROUP_CRUDL);\r
+                                               persist(em, adminPerm, adminRole, true);\r
+                                               */\r
+                                               //\r
+                                               // Create the permission for the read-only role\r
+                                               Permission readonlyPerm = createWorkflowPermission(tenantBinding, serviceBinding, transitionDef, ACTIONGROUP_RL);\r
+                                               \r
+                                               Profiler profiler = new Profiler(AuthorizationCommon.class, 1);\r
+                                               profiler.start("createDefaultPermissions started:" + readonlyPerm.getCsid());\r
+                                               persist(em, readonlyPerm, readonlyRole, true);\r
+                                               profiler.stop("createDefaultPermissions finished:" + readonlyPerm.getCsid());\r
+                                               logger.debug("Finished full perm generation for "\r
+                                                               + ":" + tenantBinding.getId()\r
+                                                               + ":" + serviceBinding.getName()\r
+                                                               + ":" + transitionDef.getName()\r
+                                                               + ":" + ACTIONGROUP_RL\r
+                                                               + ":" + profiler.getCumulativeTime());\r
+                                               \r
+                                               /*\r
+                                               //\r
+                                               // Create the permission for the super-admin role.  Note we use the same "adminPerm" instance we used for the "adminPermRole" instance\r
+                                               //\r
+                                               persist(em, adminPerm, superRole, false);\r
+                                               \r
+                                               */\r
+                                               em.getTransaction().commit();\r
+                                       }\r
+                               } catch (IllegalStateException e) {\r
+                                       logger.debug(e.getLocalizedMessage(), e); //We end up here if there is no document handler for the service -this is ok for some of the services.\r
+                               }\r
+                       }\r
+               }\r
+            em.close();\r
+       } catch (Exception e) {\r
+            if (em != null && em.getTransaction().isActive()) {\r
+                em.getTransaction().rollback();\r
+            }\r
+            if (logger.isDebugEnabled()) {\r
+                logger.debug("Caught exception and rolling back permission creation: ", e);\r
+            }\r
+            throw e;\r
+        } finally {\r
+            if (em != null) {\r
+                JpaStorageUtils.releaseEntityManagerFactory(emf);\r
+            }\r
+        }\r
+    }\r
+    \r
+    private static PermissionRoleRel findPermRoleRel(EntityManager em, String permissionId, String RoleId) {\r
+       PermissionRoleRel result = null;\r
+       \r
+       try {\r
+               String whereClause = "where permissionId = :id and roleId = :roleId";\r
+               HashMap<String, Object> params = new HashMap<String, Object>();\r
+               params.put("id", permissionId);\r
+               params.put("roleId", RoleId);        \r
        \r
+               result = (PermissionRoleRel) JpaStorageUtils.getEntity(em,\r
+                               PermissionRoleRel.class.getCanonicalName(), whereClause, params);\r
+       } catch (Exception e) {\r
+               //Do nothing. Will return null;\r
+       }\r
+               \r
+       return result;\r
+    }\r
+    \r
+    /*\r
+     * Persists the Permission, PermissionRoleRel, and Spring Security table entries all in one transaction\r
+     */\r
+    private static void persist(EntityManager em, Permission permission, Role role, boolean enforceTenancy) throws Exception {\r
+               AuthorizationStore authzStore = new AuthorizationStore();\r
+               // First persist the Permission record\r
+               authzStore.store(em, permission);\r
+               \r
+               // If the PermRoleRel doesn't already exists then relate the permission and the role in a new PermissionRole (the service payload)\r
+               // Create a PermissionRoleRel (the database relation table for the permission and role)\r
+               PermissionRoleRel permRoleRel = findPermRoleRel(em, permission.getCsid(), role.getCsid());\r
+               if (permRoleRel == null) {\r
+                       PermissionRole permRole = createPermissionRole(permission, role, enforceTenancy);\r
+               List<PermissionRoleRel> permRoleRels = new ArrayList<PermissionRoleRel>();\r
+               PermissionRoleUtil.buildPermissionRoleRel(em, permRole, SubjectType.ROLE, permRoleRels, false /*not for delete*/);\r
+               for (PermissionRoleRel prr : permRoleRels) {\r
+                   authzStore.store(em, prr);\r
+               }\r
+                       Profiler profiler = new Profiler(AuthorizationCommon.class, 2);\r
+                       profiler.start();\r
+                       // Add a corresponding entry in the Spring Security Tables\r
+                       addPermissionsForUri(permission, permRole);\r
+                       profiler.stop();\r
+                       logger.debug("Finished full perm generation for "\r
+                                       + ":" + permission.getTenantId()\r
+                                       + ":" + permission.getResourceName()\r
+                                       + ":" + ACTIONGROUP_RL\r
+                                       + ":" + profiler.getCumulativeTime());\r
+               }\r
+        \r
+    }\r
 \r
 }\r
index 1ef90a4e998387dd64fdc828ea936cca45a8140e..b2828e93650cacfde899030609695db09c5b0da2 100644 (file)
@@ -5,7 +5,6 @@ import org.collectionspace.services.authorization.PermissionRoleRel;
 import org.collectionspace.services.authorization.AccountRoleRel;\r
 import org.collectionspace.services.authorization.PermissionValue;\r
 import org.collectionspace.services.authorization.RoleValue;\r
-import org.collectionspace.services.common.authorization_mgt.AuthorizationCommon;\r
 \r
 public class AuthorizationRoleRel {\r
 \r
index d28de34ea079caddf7f93d8601add6052d7c3755..281b88756769251979bc2cffc8fedc75b207baeb 100644 (file)
@@ -54,7 +54,7 @@ public class AuthorizationStore {
        try {
                theRole = (Role)JpaStorageUtils.getEnityByKey(Role.class.getName(),
                                RoleStorageConstants.ROLE_NAME, roleName, tenantId);
-       } catch (Exception e) {
+       } catch (Throwable e) {
                if (logger.isTraceEnabled() == true) {
                        logger.trace("Could not retrieve role with name =" + roleName, e);
                }
@@ -63,6 +63,22 @@ public class AuthorizationStore {
        return theRole;
     }
     
+    static public Role getRoleByName(EntityManager em, String roleName, String tenantId) {
+       Role theRole = null;
+       
+       try {
+               theRole = (Role)JpaStorageUtils.getEnityByKey(em, Role.class.getName(),
+                               RoleStorageConstants.ROLE_NAME, roleName, tenantId);
+       } catch (Throwable e) {
+               if (logger.isTraceEnabled() == true) {
+                       logger.trace("Could not retrieve role with name =" + roleName, e);
+               }
+       }
+       
+       return theRole;
+    }
+    
+    
     static public Permission getPermission(Permission permission) {
        Permission result = null;
        //
@@ -111,8 +127,53 @@ public class AuthorizationStore {
             throw e;
         } finally {
             if (em != null) {
+               em.clear();
+               em.close();
                 JpaStorageUtils.releaseEntityManagerFactory(emf);
             }
         }
     }
+    
+    private boolean exists(EntityManager em, Object entity) {
+       boolean result = false;
+       
+       try {
+               String csid = (String)JaxbUtils.getValue(entity, "getCsid");
+               Object existingEntity = em.find(entity.getClass(), csid);
+               if (existingEntity != null) {
+                       result = true;
+               }
+       } catch (Exception e) {
+               //NOTE: Not all entities have a CSID attribute
+       }
+       
+       return result;
+    }
+    /*
+     * Use this method if you've already started a transaction with an EntityManager
+     */
+    public String store(EntityManager em, Object entity) throws Exception {
+       boolean entityExists = exists(em, entity);
+       if (entityExists == true) {
+               logger.debug("Entity to persist already exists.");
+       }
+        if (JaxbUtils.getValue(entity, "getCreatedAt") == null) {
+            JaxbUtils.setValue(entity, "setCreatedAtItem", Date.class, new Date());
+        }
+        
+        if (entityExists == true) {
+               em.merge(entity);
+        } else {
+               em.persist(entity);
+        }
+        
+        // look for a CSID
+        String id = null;
+        try{
+            id = (String) JaxbUtils.getValue(entity, "getCsid"); //NOTE: Not all entities have a CSID attribute
+        } catch(NoSuchMethodException nsme) {
+            //do nothing ok, relationship does not have csid
+        }
+        return id;
+    }
 }
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.collectionspace.services.authorization.storage;
+package org.collectionspace.services.common.authorization_mgt;
 
 import java.util.HashMap;
 import java.util.List;
 
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+
 import org.collectionspace.services.common.document.DocumentNotFoundException;
 import org.collectionspace.services.common.context.ServiceContext;
 import org.collectionspace.services.common.context.ServiceContextProperties;
@@ -51,7 +54,7 @@ import org.slf4j.LoggerFactory;
  */
 public class PermissionRoleUtil {
 
-    final Logger logger = LoggerFactory.getLogger(PermissionRoleUtil.class);
+    static final Logger logger = LoggerFactory.getLogger(PermissionRoleUtil.class);
 
     /**
      * Gets the relation subject.
@@ -59,7 +62,7 @@ public class PermissionRoleUtil {
      * @param ctx the ctx
      * @return the relation subject
      */
-    static SubjectType getRelationSubject(ServiceContext ctx) {
+    static public SubjectType getRelationSubject(ServiceContext ctx) {
         Object o = ctx.getProperty(ServiceContextProperties.SUBJECT);
         if (o == null) {
             throw new IllegalArgumentException(ServiceContextProperties.SUBJECT
@@ -76,7 +79,7 @@ public class PermissionRoleUtil {
      * @param pr the pr
      * @return the relation subject
      */
-    static SubjectType getRelationSubject(ServiceContext ctx, PermissionRole pr) {
+    static public SubjectType getRelationSubject(ServiceContext ctx, PermissionRole pr) {
         SubjectType subject = pr.getSubject();
         if (subject == null) {
             //it is not required to give subject as URI determines the subject
@@ -94,17 +97,17 @@ public class PermissionRoleUtil {
      * @param prrl persistent entities built are inserted into this list
      * @param toDelete the to delete
      */
-    static public void buildPermissionRoleRel(PermissionRole pr,
+    static public void buildPermissionRoleRel(EntityManager em, 
+               PermissionRole pr,
                SubjectType subject,
                List<PermissionRoleRel> prrl,
-               boolean handleDelete)
-                       throws DocumentNotFoundException {
+               boolean handleDelete) throws Exception {
         if (subject.equals(SubjectType.ROLE)) {
                List<PermissionValue> permissionValues = pr.getPermission();
                if (permissionValues != null && permissionValues.size() > 0) {
                    PermissionValue pv = permissionValues.get(0);
                    for (RoleValue rv : pr.getRole()) {
-                       PermissionRoleRel prr = buildPermissonRoleRel(pv, rv, subject, handleDelete);
+                       PermissionRoleRel prr = buildPermissonRoleRel(em, pv, rv, subject, handleDelete);
                        prrl.add(prr);
                    }
                }
@@ -113,12 +116,43 @@ public class PermissionRoleUtil {
                if (roleValues != null && roleValues.size() > 0) {
                    RoleValue rv = roleValues.get(0);
                    for (PermissionValue pv : pr.getPermission()) {
-                       PermissionRoleRel prr = buildPermissonRoleRel(pv, rv, subject, handleDelete);
+                       PermissionRoleRel prr = buildPermissonRoleRel(em, pv, rv, subject, handleDelete);
                        prrl.add(prr);
                    }
                }
         }
     }
+    
+    static public void buildPermissionRoleRel( 
+               PermissionRole pr,
+               SubjectType subject,
+               List<PermissionRoleRel> prrl,
+               boolean handleDelete) throws Exception {
+        EntityManagerFactory emf = null;
+        EntityManager em = null;
+        try {
+            emf = JpaStorageUtils.getEntityManagerFactory(JpaStorageUtils.CS_PERSISTENCE_UNIT);
+            em = emf.createEntityManager();
+            em.getTransaction().begin();
+            
+            buildPermissionRoleRel(em, pr, subject, prrl, handleDelete);
+            
+            em.getTransaction().commit();
+               em.close();            
+        } catch (Exception e) {
+            if (em != null && em.getTransaction().isActive()) {
+                em.getTransaction().rollback();
+            }
+            if (logger.isDebugEnabled()) {
+                logger.debug("Caught exception ", e);
+            }
+            throw e;
+        } finally {
+            if (em != null) {
+                JpaStorageUtils.releaseEntityManagerFactory(emf);
+            }
+        }
+    }    
 
     /**
      * Builds a permisson role relationship for either 'create' or 'delete'
@@ -128,7 +162,7 @@ public class PermissionRoleUtil {
      * @param handleDelete the handle delete
      * @return the permission role rel
      */
-    static private PermissionRoleRel buildPermissonRoleRel(PermissionValue permissionValue,
+    static private PermissionRoleRel buildPermissonRoleRel(EntityManager em, PermissionValue permissionValue,
                RoleValue roleValue,
                SubjectType subject,
                boolean handleDelete)
@@ -142,8 +176,13 @@ public class PermissionRoleUtil {
        // correctly.  The import utility should create and store the permissions and roles BEFORE creating the relationships
        //
        PermissionValue pv = permissionValue;
+       
+       //
+       // This lookup is slow, do we really need it?
+       //
+       /*
        try {
-               Permission permission = (Permission)JpaStorageUtils.getEntity(pv.getPermissionId(),
+               Permission permission = (Permission)JpaStorageUtils.getEntity(em, pv.getPermissionId(), //FIXME: REM 4/5/2012 - To improve performance, we should use a passed in Permission instance
                                Permission.class);
                if (permission != null) {
                        // If the permission already exists, then use it to fill our the relation record
@@ -152,14 +191,19 @@ public class PermissionRoleUtil {
        } catch (DocumentNotFoundException e) {
                // ignore this exception, pv is set to permissionValue;
        }
+       */
+       
        //
        // Ensure we can find both the Permission and Role to relate.
        // FIXME: REM - This is a workaround until the Import utility creates Perm/Role relationships
        // correctly.  The import utility should create and store the permissions and roles BEFORE creating the relationships
        //
        RoleValue rv = roleValue;
+       
+       /*
+        * This lookup is slow, can we avoid it?
        try {
-               Role role = (Role)JpaStorageUtils.getEntity(rv.getRoleId(),
+               Role role = (Role)JpaStorageUtils.getEntity(em, rv.getRoleId(),
                                Role.class);
                if (role != null) {
                        // If the role already exists, then use it to fill out the relation record
@@ -168,6 +212,7 @@ public class PermissionRoleUtil {
        } catch (DocumentNotFoundException e) {
                // ignore this exception, rv is set to roleValue
        }
+        */
        
         result = new PermissionRoleRel();
         result.setPermissionId(pv.getPermissionId());
index ff59b020b9f702f486f07cd217aea719d92556c2..be56353ed333a14af6bd6defff7f3eadbe0dedc3 100644 (file)
@@ -26,13 +26,13 @@ package org.collectionspace.services.common.config;
 import java.util.ArrayList;\r
 import java.util.List;\r
 \r
-import org.collectionspace.services.common.RepositoryClientConfigType;\r
-import org.collectionspace.services.common.ServiceConfig;\r
 import org.collectionspace.services.common.document.DocumentHandler;\r
-import org.collectionspace.services.common.service.ServiceBindingType;\r
-import org.collectionspace.services.common.tenant.TenantBindingType;\r
-import org.collectionspace.services.common.types.PropertyItemType;\r
-import org.collectionspace.services.common.types.PropertyType;\r
+import org.collectionspace.services.config.RepositoryClientConfigType;\r
+import org.collectionspace.services.config.ServiceConfig;\r
+import org.collectionspace.services.config.service.ServiceBindingType;\r
+import org.collectionspace.services.config.tenant.TenantBindingType;\r
+import org.collectionspace.services.config.types.PropertyItemType;\r
+import org.collectionspace.services.config.types.PropertyType;\r
 import org.slf4j.Logger;\r
 import org.slf4j.LoggerFactory;\r
 \r
@@ -59,6 +59,9 @@ public class ServiceConfigUtils {
         Class<?> c = tccl.loadClass(getDocumentHandlerClass(tenantBinding, serviceBinding));\r
         if (DocumentHandler.class.isAssignableFrom(c)) {\r
             docHandler = (DocumentHandler) c.newInstance();\r
+            if (logger.isDebugEnabled()) {\r
+               logger.debug("Created an instance of the DocumentHandler for: " + getDocumentHandlerClass(tenantBinding, serviceBinding));\r
+            }\r
         } else {\r
             throw new IllegalArgumentException("Not of type "\r
                     + DocumentHandler.class.getCanonicalName());\r
@@ -76,10 +79,10 @@ public class ServiceConfigUtils {
                ServiceBindingType serviceBinding) {\r
         if (serviceBinding.getDocumentHandler() == null\r
                 || serviceBinding.getDocumentHandler().isEmpty()) {\r
-            String msg = "Missing documentHandler in service binding for "\r
-                    + serviceBinding.getName() + " for tenant id=" + tenantBinding.getId()\r
+            String msg = "Missing documentHandler in service binding for service name \""\r
+                    + serviceBinding.getName() + "\" for tenant id=" + tenantBinding.getId()\r
                     + " name=" + tenantBinding.getName();\r
-            logger.error(msg);\r
+            logger.warn(msg);\r
             throw new IllegalStateException(msg);\r
         }\r
         return serviceBinding.getDocumentHandler().trim();\r
index dfbb4fe1fc3850289b7d4ba0b09ac10b069130de..f6a4295d2f8aa6ba4cd44ba5c6276d37af69af84 100644 (file)
@@ -32,12 +32,12 @@ import java.util.Hashtable;
 import java.util.List;
 
 import org.apache.commons.io.FileUtils;
-import org.collectionspace.services.common.service.ServiceBindingType;
-import org.collectionspace.services.common.service.ServiceObjectType;
-import org.collectionspace.services.common.tenant.RepositoryDomainType;
-import org.collectionspace.services.common.tenant.TenantBindingType;
-import org.collectionspace.services.common.tenant.TenantBindingConfig;
-import org.collectionspace.services.common.types.PropertyItemType;
+import org.collectionspace.services.config.service.ServiceBindingType;
+import org.collectionspace.services.config.service.ServiceObjectType;
+import org.collectionspace.services.config.tenant.RepositoryDomainType;
+import org.collectionspace.services.config.tenant.TenantBindingConfig;
+import org.collectionspace.services.config.tenant.TenantBindingType;
+import org.collectionspace.services.config.types.PropertyItemType;
 
 import ch.elca.el4j.services.xmlmerge.Configurer;
 import ch.elca.el4j.services.xmlmerge.config.AttributeMergeConfigurer;
index 05ee63bde20c8585e38fc70b6ebd44beccf28ccb..142c4ba646957bc4c1a91297105a3c9e061bf931 100644 (file)
@@ -4,10 +4,11 @@ import java.util.ArrayList;
 import java.util.List;\r
 \r
 import org.collectionspace.services.common.context.ServiceBindingUtils;\r
-import org.collectionspace.services.common.service.ServiceBindingType;\r
-import org.collectionspace.services.common.tenant.TenantBindingType;\r
-import org.collectionspace.services.common.types.PropertyItemType;\r
-import org.collectionspace.services.common.types.PropertyType;\r
+import org.collectionspace.services.config.service.ServiceBindingType;\r
+import org.collectionspace.services.config.tenant.TenantBindingType;\r
+import org.collectionspace.services.config.types.PropertyItemType;\r
+import org.collectionspace.services.config.types.PropertyType;\r
+\r
 \r
 public class TenantBindingUtils {\r
 \r
index c114ba955f7b5aa37f777ac7f5e93617ae629fdf..d3fa9f3a72a7ab601c9d63023811ef429393a821 100644 (file)
@@ -32,7 +32,6 @@ import javax.ws.rs.core.UriInfo;
 
 import org.collectionspace.services.client.IQueryManager;
 import org.collectionspace.services.client.workflow.WorkflowClient;
-import org.collectionspace.services.common.ClientType;
 import org.collectionspace.services.common.ServiceMain;
 import org.collectionspace.services.common.config.PropertyItemUtils;
 import org.collectionspace.services.common.config.ServiceConfigUtils;
@@ -43,12 +42,13 @@ import org.collectionspace.services.common.document.ValidatorHandler;
 import org.collectionspace.services.common.security.SecurityContext;
 import org.collectionspace.services.common.security.SecurityContextImpl;
 import org.collectionspace.services.common.security.UnauthorizedException;
-import org.collectionspace.services.common.service.ObjectPartType;
-import org.collectionspace.services.common.service.ServiceBindingType;
-import org.collectionspace.services.common.tenant.RepositoryDomainType;
-import org.collectionspace.services.common.tenant.TenantBindingType;
-import org.collectionspace.services.common.types.PropertyItemType;
-import org.collectionspace.services.common.types.PropertyType;
+import org.collectionspace.services.config.ClientType;
+import org.collectionspace.services.config.service.ObjectPartType;
+import org.collectionspace.services.config.service.ServiceBindingType;
+import org.collectionspace.services.config.tenant.RepositoryDomainType;
+import org.collectionspace.services.config.tenant.TenantBindingType;
+import org.collectionspace.services.config.types.PropertyItemType;
+import org.collectionspace.services.config.types.PropertyType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index 248ad43c880e0a13660d9991c492ed34b8c13933..934a90cacef77b5ca24848f9d948f783705be96b 100644 (file)
@@ -5,12 +5,11 @@ import java.util.List;
 import java.util.Map;\r
 \r
 import org.collectionspace.services.common.config.PropertyItemUtils;\r
-import org.collectionspace.services.common.service.ObjectPartType;\r
-import org.collectionspace.services.common.service.ServiceBindingType;\r
-import org.collectionspace.services.common.service.ServiceObjectType;\r
-import org.collectionspace.services.common.tenant.TenantBindingType;\r
-import org.collectionspace.services.common.types.PropertyItemType;\r
-import org.collectionspace.services.common.types.PropertyType;\r
+import org.collectionspace.services.config.service.ObjectPartType;\r
+import org.collectionspace.services.config.service.ServiceBindingType;\r
+import org.collectionspace.services.config.service.ServiceObjectType;\r
+import org.collectionspace.services.config.types.PropertyItemType;\r
+import org.collectionspace.services.config.types.PropertyType;\r
 import org.collectionspace.services.nuxeo.util.NuxeoUtils;\r
 import org.nuxeo.ecm.core.api.ClientException;\r
 import org.nuxeo.ecm.core.api.DocumentModel;\r
index 193167e1ce55be91453147c45dd88858aea8abf2..fee621f1b5c31ff8ea5aed61c8ca7b1481a5a887 100644 (file)
@@ -29,15 +29,13 @@ import java.util.Map;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.UriInfo;
 
-import org.collectionspace.services.common.ClientType;
 import org.collectionspace.services.common.ResourceMap;
 import org.collectionspace.services.common.document.DocumentHandler;
 import org.collectionspace.services.common.document.ValidatorHandler;
-import org.collectionspace.services.common.query.QueryContext;
 import org.collectionspace.services.common.security.SecurityContext;
-import org.collectionspace.services.common.security.UnauthorizedException;
-import org.collectionspace.services.common.service.ObjectPartType;
-import org.collectionspace.services.common.service.ServiceBindingType;
+import org.collectionspace.services.config.ClientType;
+import org.collectionspace.services.config.service.ObjectPartType;
+import org.collectionspace.services.config.service.ServiceBindingType;
 
 /**
  *
index 373b9c0d4a0beb3bb0290c65a71236b43a4dbfea..eab1a2efa3ec2eec2b132f00a1c3f4bc4af22e56 100644 (file)
@@ -34,7 +34,7 @@ import org.collectionspace.services.common.ServiceMain;
 import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl;
 import org.collectionspace.services.common.config.TenantBindingUtils;
 import org.collectionspace.services.common.context.ServiceContext;
-import org.collectionspace.services.common.tenant.TenantBindingType;
+import org.collectionspace.services.config.tenant.TenantBindingType;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
index 3037f290bde0b1bba3b6dc2cfb27d3e9ebedd11e..26899f78431aa987212e71bee926fcb4e140eb93 100644 (file)
@@ -23,8 +23,6 @@
  */
 package org.collectionspace.services.common.document;
 
-import java.util.Calendar;
-
 import java.lang.reflect.Array;
 
 import java.io.File;
@@ -56,9 +54,9 @@ import javax.xml.transform.TransformerException;
 import org.collectionspace.services.common.ServiceMain;
 import org.collectionspace.services.common.context.ServiceContext;
 import org.collectionspace.services.common.datetime.DateTimeFormatUtils;
-import org.collectionspace.services.common.service.ObjectPartContentType;
-import org.collectionspace.services.common.service.ObjectPartType;
-import org.collectionspace.services.common.service.XmlContentType;
+import org.collectionspace.services.config.service.ObjectPartContentType;
+import org.collectionspace.services.config.service.ObjectPartType;
+import org.collectionspace.services.config.service.XmlContentType;
 import org.dom4j.io.DOMReader;
 
 import org.jboss.resteasy.plugins.providers.multipart.MultipartInput;
index 656ccc5a044c81cf2cf21b79fb9f447b6dbf02d9..7e0dfc17202ba74a856bec59aea0e41f3b233266 100644 (file)
@@ -90,7 +90,6 @@ import org.slf4j.LoggerFactory;
 import org.collectionspace.services.common.blob.BlobInput;\r
 import org.collectionspace.services.common.context.ServiceContext;\r
 import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;\r
-import org.collectionspace.services.common.service.ListResultField;\r
 import org.collectionspace.services.blob.BlobsCommon;\r
 import org.collectionspace.services.blob.DimensionSubGroup;\r
 import org.collectionspace.services.blob.DimensionSubGroupList;\r
@@ -102,6 +101,8 @@ import org.collectionspace.services.jaxb.BlobJAXBSchema;
 import org.collectionspace.services.nuxeo.client.java.CommonList;\r
 import org.collectionspace.services.common.blob.BlobOutput;\r
 \r
+import org.collectionspace.services.config.service.ListResultField;\r
+\r
 //import org.collectionspace.ecm.platform.quote.api.QuoteManager;\r
 \r
 // TODO: Auto-generated Javadoc\r
index 944fd2d57bd5944a61e136ee788117c6129e43ad..6e62f1416f8b82db851d4c7a81bfb0509f3a544e 100644 (file)
@@ -26,11 +26,11 @@ import java.util.List;
 import javax.sql.DataSource;\r
 \r
 import org.collectionspace.services.common.api.Tools;\r
-import org.collectionspace.services.common.service.ServiceBindingType;\r
-import org.collectionspace.services.common.service.InitHandler.Params.Field;\r
-import org.collectionspace.services.common.service.InitHandler.Params.Property;\r
 import org.collectionspace.services.common.storage.DatabaseProductType;\r
 import org.collectionspace.services.common.storage.JDBCTools;\r
+import org.collectionspace.services.config.service.InitHandler.Params.Field;\r
+import org.collectionspace.services.config.service.InitHandler.Params.Property;\r
+import org.collectionspace.services.config.service.ServiceBindingType;\r
 \r
 import org.slf4j.Logger;\r
 import org.slf4j.LoggerFactory;\r
index fa7eccdfb2a6ee1696941b82ae5c85ff17fe7e89..9eecbcfffe2df87fdef379b4eaa27020324ff0f4 100644 (file)
@@ -1,13 +1,13 @@
 package org.collectionspace.services.common.init;\r
 \r
-import org.collectionspace.services.common.service.ServiceBindingType;\r
-import org.collectionspace.services.common.service.InitHandler.Params.Field;\r
-import org.collectionspace.services.common.service.InitHandler.Params.Property;\r
-\r
 import java.util.List;\r
 \r
 import javax.sql.DataSource;\r
 \r
+import org.collectionspace.services.config.service.InitHandler.Params.Field;\r
+import org.collectionspace.services.config.service.InitHandler.Params.Property;\r
+import org.collectionspace.services.config.service.ServiceBindingType;\r
+\r
 /**\r
  * User: laramie\r
  * $LastChangedRevision$\r
index f99287b96f560ee8503332de333dba616cd7ae3c..6318b633c4756138f7166837029009b8006af6dd 100644 (file)
  */\r
 package org.collectionspace.services.common.init;\r
 \r
-import org.collectionspace.services.common.storage.DatabaseProductType;\r
-import org.collectionspace.services.common.storage.JDBCTools;\r
-import org.collectionspace.services.common.service.ServiceBindingType;\r
-import org.collectionspace.services.common.service.InitHandler.Params.Field;\r
-import org.collectionspace.services.common.service.InitHandler.Params.Property;\r
+import org.collectionspace.services.config.service.InitHandler.Params.Field;\r
+import org.collectionspace.services.config.service.InitHandler.Params.Property;\r
+import org.collectionspace.services.config.service.ServiceBindingType;\r
 \r
 import org.slf4j.Logger;\r
 import org.slf4j.LoggerFactory;\r
 \r
-import java.sql.ResultSet;\r
 import java.util.List;\r
 \r
 import javax.sql.DataSource;\r
index c575579a756e4cc045a1607a2a454c2c64214ba4..8e1cca0f1408be37b373e420ac3b0c6e9ad5026b 100644 (file)
@@ -33,11 +33,11 @@ import java.util.Map;
 
 import javax.sql.DataSource;
 
-import org.collectionspace.services.common.service.ServiceBindingType;
-import org.collectionspace.services.common.service.InitHandler.Params.Field;
-import org.collectionspace.services.common.service.InitHandler.Params.Property;
 import org.collectionspace.services.common.storage.DatabaseProductType;
 import org.collectionspace.services.common.storage.JDBCTools;
+import org.collectionspace.services.config.service.InitHandler.Params.Field;
+import org.collectionspace.services.config.service.InitHandler.Params.Property;
+import org.collectionspace.services.config.service.ServiceBindingType;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
index 64af8a48c7f4476bf79bdfe6d822c73321ce51ac..9d9d508cc253d2c4e94e70be2d31677906163bd0 100644 (file)
@@ -24,9 +24,9 @@
 package org.collectionspace.services.common.repository;
 
 import java.util.Hashtable;
-import org.collectionspace.services.common.RepositoryClientConfigType;
 import org.collectionspace.services.common.ServiceMain;
 import org.collectionspace.services.common.config.ServicesConfigReaderImpl;
+import org.collectionspace.services.config.RepositoryClientConfigType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index c1b4b9ed04d6f906b4c01fb26b32a4c7f98412ba..6187754a88d9ff39fc5a803390e945ef48b86e3f 100644 (file)
@@ -124,7 +124,7 @@ public class SecurityInterceptor implements PreProcessInterceptor, PostProcessIn
                //
                if (resName.equalsIgnoreCase(ACCOUNT_PERMISSIONS) != true) { //see comment immediately above
                        AuthZ authZ = AuthZ.get();
-                       CSpaceResource res = new URIResourceImpl(resName, httpMethod);
+                       CSpaceResource res = new URIResourceImpl(AuthN.get().getCurrentTenantId(), resName, httpMethod);
                        if (authZ.isAccessAllowed(res) == false) {
                                        logger.error("Access to " + res.getId() + " is NOT allowed to "
                                                        + " user=" + AuthN.get().getUserId());
@@ -138,7 +138,7 @@ public class SecurityInterceptor implements PreProcessInterceptor, PostProcessIn
                                //
                                if (uriPath.endsWith(WorkflowClient.SERVICE_PATH_COMPONENT) == true) {
                                        String workflowSubResName = SecurityUtils.getResourceName(request.getUri());
-                                       res = new URIResourceImpl(workflowSubResName, httpMethod);
+                                       res = new URIResourceImpl(AuthN.get().getCurrentTenantId(), workflowSubResName, httpMethod);
                                        if (authZ.isAccessAllowed(res) == false) {
                                                logger.error("Access to " + resName + ":" + res.getId() + " is NOT allowed to "
                                                                + " user=" + AuthN.get().getUserId());
index 76156efadbfb131d597018dcd9f0e5339cd035ee..9d0df0934d176dbb9c946aeeeb9dfb89e4b454f5 100644 (file)
@@ -32,8 +32,7 @@ import java.util.StringTokenizer;
 import org.collectionspace.services.authorization.AuthZ;
 import org.collectionspace.services.authorization.CSpaceResource;
 import org.collectionspace.services.authorization.URIResourceImpl;
-import org.collectionspace.services.common.service.ServiceBindingType;
-import org.collectionspace.services.common.service.ServiceObjectType;
+import org.collectionspace.services.config.service.ServiceBindingType;
 
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.UriInfo;
@@ -202,7 +201,7 @@ public class SecurityUtils {
                AuthZ authZ = AuthZ.get();
        for(ServiceBindingType binding:serviceBindings) {
                String resourceName = binding.getName().toLowerCase();
-               CSpaceResource res = new URIResourceImpl(resourceName, "GET");
+               CSpaceResource res = new URIResourceImpl(AuthN.get().getCurrentTenantId(), resourceName, "GET");
                if (authZ.isAccessAllowed(res) == true) {
                        readableList.add(binding);
                }
index 01153762e9a0ba3e28ecc8db671326b91cd9373d..9013358da1eb044c89913bba97b766bf38a2533f 100644 (file)
@@ -63,18 +63,12 @@ public class JpaStorageUtils {
     
     /** The Constant CS_PERSISTENCE_UNIT. */
     public final static String CS_PERSISTENCE_UNIT = "org.collectionspace.services";
-    private final static String CS_AUTHZ_PERSISTENCE_UNIT = "org.collectionspace.services.authorization";
+    public static String CS_AUTHZ_PERSISTENCE_UNIT = "org.collectionspace.services.authorization";
     public final static String CS_CURRENT_USER = "0";
     
     // This is the column name for ID field of all the JPA objects
     public static final String CSID_LABEL = "csid";
-
-    /**
-     * getEntity for given id and class
-     * @param id
-     * @param entityClazz
-     * @return null if entity is not found
-     */
+    
     public static Object getEntity(String id, Class entityClazz)
                throws DocumentNotFoundException {
         EntityManagerFactory emf = null;
@@ -92,6 +86,7 @@ public class JpaStorageUtils {
         }
         return entityFound;
     }
+    
 
     public static Object getEntity(long id, Class entityClazz)
                throws DocumentNotFoundException {
@@ -119,7 +114,7 @@ public class JpaStorageUtils {
      * @param entityClazz
      * @return
      */
-    public static Object getEntity(EntityManager em, String id, Class entityClazz) {
+    public static Object getEntity(EntityManager em, String id, Class entityClazz) throws DocumentNotFoundException {
         if (entityClazz == null) {
             String msg = "Not constructed with JpaStorageClientImpl(entityClazz) ctor";
             logger.error(msg);
@@ -227,7 +222,7 @@ public class JpaStorageUtils {
        String userId = account.getUserId();
        String currentUserId = AuthN.get().getUserId(); 
         if (currentUserId.equalsIgnoreCase(userId) == false) {
-                       CSpaceResource res = new URIResourceImpl("accounts", "GET");
+                       CSpaceResource res = new URIResourceImpl(AuthN.get().getCurrentTenantId(), "accounts", "GET");
                        if (AuthZ.get().isAccessAllowed(res) == false) {
                        String msg = "Access to the permissions for the account with csid = " + csid + " is NOT allowed for " +
                                        " user=" + currentUserId;
@@ -296,12 +291,10 @@ public class JpaStorageUtils {
         return result;
     }
     
-    public static Object getEnityByKey(String entityName, String key, String value,
+    public static Object getEnityByKey(EntityManager em, String entityName, String key, String value,
             String tenantId) {
-        EntityManagerFactory emf = null;
-        EntityManager em = null;
-        Object o = null;
-        
+       Object result = null;
+       
         if (entityName == null) {
             throw new IllegalArgumentException("entityName is required");
         }
@@ -311,24 +304,36 @@ public class JpaStorageUtils {
         if (tenantId == null) {
             throw new IllegalArgumentException("tenantId is required");
         }
+        
+        StringBuilder queryStrBldr = new StringBuilder("SELECT a FROM ");
+        queryStrBldr.append(entityName);
+        queryStrBldr.append(" a");
+        queryStrBldr.append(" WHERE " + key + " = :" + key);
+        boolean csAdmin = SecurityUtils.isCSpaceAdmin();
+        if (!csAdmin) {
+            queryStrBldr.append(" AND tenantId = :tenantId");
+        }
+        String queryStr = queryStrBldr.toString(); //for debugging
+        Query q = em.createQuery(queryStr);
+        q.setParameter(key, value);
+        if (!csAdmin) {
+            q.setParameter("tenantId", tenantId);
+        }
+        result = q.getSingleResult();
+
+        return result;
+    }
+    
+    public static Object getEnityByKey(String entityName, String key, String value,
+            String tenantId) {
+        EntityManagerFactory emf = null;
+        EntityManager em = null;
+        Object o = null;
+        
         try {
-            StringBuilder queryStrBldr = new StringBuilder("SELECT a FROM ");
-            queryStrBldr.append(entityName);
-            queryStrBldr.append(" a");
-            queryStrBldr.append(" WHERE " + key + " = :" + key);
-            boolean csAdmin = SecurityUtils.isCSpaceAdmin();
-            if (!csAdmin) {
-                queryStrBldr.append(" AND tenantId = :tenantId");
-            }
             emf = getEntityManagerFactory();
             em = emf.createEntityManager();
-            String queryStr = queryStrBldr.toString(); //for debugging
-            Query q = em.createQuery(queryStr);
-            q.setParameter(key, value);
-            if (!csAdmin) {
-                q.setParameter("tenantId", tenantId);
-            }
-            o = q.getSingleResult();
+            o = getEnityByKey(em, entityName, key, value, tenantId);
         } catch (NoResultException nre) {
             if (em != null && em.getTransaction().isActive()) {
                 em.getTransaction().rollback();
@@ -342,7 +347,7 @@ public class JpaStorageUtils {
                 em.getTransaction().rollback();
             }
             if (logger.isDebugEnabled()) {
-                logger.debug("could not find entity(2) with id=" + key, e);
+                logger.debug("Could not find entity with id=" + key, e);
             }
             //returns null
         } finally {
@@ -423,6 +428,37 @@ public class JpaStorageUtils {
         return o;
     }
 
+    public static Object getEntity(EntityManager em, String entityName,
+            String whereClause, HashMap<String, Object> paramBindings) {
+        Object result = null;
+        
+       if (entityName == null) {
+            throw new IllegalArgumentException("entityName is required");
+        }
+        if (whereClause == null) {
+            throw new IllegalArgumentException("whereClause is required");
+        }
+
+        StringBuilder queryStrBldr = new StringBuilder("SELECT a FROM ");
+        queryStrBldr.append(entityName);
+        queryStrBldr.append(" a");
+        queryStrBldr.append(" " + whereClause);
+
+        String queryStr = queryStrBldr.toString(); //for debugging
+        Query q = em.createQuery(queryStr);
+        for (String paramName : paramBindings.keySet()) {
+            q.setParameter(paramName, paramBindings.get(paramName));
+        }
+        
+        result = q.getSingleResult();
+        
+        if (result == null) {
+               logger.debug("Call to getEntity() returned empty set.");
+        }
+        
+        return result;
+    }
+    
     /**
      * getEntity using given where clause with given param bindings
      * @param entityName
@@ -432,29 +468,13 @@ public class JpaStorageUtils {
      */
     public static Object getEntity(String entityName,
             String whereClause, HashMap<String, Object> paramBindings) {
-        if (entityName == null) {
-            throw new IllegalArgumentException("entityName is required");
-        }
-        if (whereClause == null) {
-            throw new IllegalArgumentException("whereClause is required");
-        }
-        EntityManagerFactory emf = null;
-        EntityManager em = null;
+       EntityManagerFactory emf = null;
+       EntityManager em = null;
         Object o = null;
         try {
-            StringBuilder queryStrBldr = new StringBuilder("SELECT a FROM ");
-            queryStrBldr.append(entityName);
-            queryStrBldr.append(" a");
-            queryStrBldr.append(" " + whereClause);
-            //FIXME it would be nice to insert tenant id in the where clause here
             emf = getEntityManagerFactory();
             em = emf.createEntityManager();
-            String queryStr = queryStrBldr.toString(); //for debugging
-            Query q = em.createQuery(queryStr);
-            for (String paramName : paramBindings.keySet()) {
-                q.setParameter(paramName, paramBindings.get(paramName));
-            }
-            o = q.getSingleResult();
+            o = getEntity(em, entityName, whereClause, paramBindings);
         } catch (NoResultException nre) {
             if (em != null && em.getTransaction().isActive()) {
                 em.getTransaction().rollback();
@@ -523,8 +543,33 @@ public class JpaStorageUtils {
      */
     public static EntityManagerFactory getEntityManagerFactory(
             String persistenceUnit) {
-        return Persistence.createEntityManagerFactory(persistenceUnit);
+       EntityManagerFactory result = null;
+       
+       try {
+               result = Persistence.createEntityManagerFactory(persistenceUnit);
+       } catch (javax.persistence.PersistenceException e) {
+               logger.warn("Could not find a persistence unit for: " + persistenceUnit);
+       }
+       
+               //
+               // Try using a backup persistence unit if the specified one is not available and log a warning
+               //
+       if (result == null && !persistenceUnit.equalsIgnoreCase(CS_PERSISTENCE_UNIT)) try {
+               result = Persistence.createEntityManagerFactory(CS_PERSISTENCE_UNIT);
+       } catch (javax.persistence.PersistenceException e) {
+               logger.warn("Could not find a persistence unit for: " + CS_PERSISTENCE_UNIT);
+       }
+       
+       //
+       // One more try.
+       //
+       if (result == null && !persistenceUnit.equalsIgnoreCase(CS_AUTHZ_PERSISTENCE_UNIT)) try {
+               result = Persistence.createEntityManagerFactory(CS_AUTHZ_PERSISTENCE_UNIT);
+       } catch (javax.persistence.PersistenceException e) {
+               logger.warn("Could not find a persistence unit for: " + CS_AUTHZ_PERSISTENCE_UNIT);
+       }
 
+        return result;
     }
 
     /**
index 92a01600658386c36747bda44098d227f0afeb3c..534d4b36d83cba5dde91335e4d14c7f9731438ff 100644 (file)
@@ -59,7 +59,7 @@ import org.collectionspace.services.common.repository.RepositoryClient;
 import org.collectionspace.services.nuxeo.client.java.DocHandlerBase;\r
 import org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl;\r
 import org.collectionspace.services.common.security.SecurityUtils;\r
-import org.collectionspace.services.common.service.ServiceBindingType;\r
+import org.collectionspace.services.config.service.ServiceBindingType;\r
 import org.collectionspace.services.jaxb.AbstractCommonList;\r
 import org.collectionspace.services.nuxeo.util.NuxeoUtils;\r
 \r
index 59b3348000b3679390224e1c548ba24f8cad9622..14a1e7801f10591a1a1df87a99db334335a1fb0c 100644 (file)
 package org.collectionspace.services.common.workflow.service.nuxeo;
 
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
 
 import org.collectionspace.services.client.PayloadInputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.client.workflow.WorkflowClient;
-import org.collectionspace.services.common.context.MultipartServiceContext;
 import org.collectionspace.services.common.context.ServiceContext;
-import org.collectionspace.services.common.document.BadRequestException;
-import org.collectionspace.services.common.document.DocumentNotFoundException;
-import org.collectionspace.services.common.document.DocumentUtils;
 import org.collectionspace.services.common.document.DocumentWrapper;
-import org.collectionspace.services.common.document.DocumentHandler.Action;
-import org.collectionspace.services.common.service.ObjectPartType;
 import org.collectionspace.services.common.workflow.jaxb.WorkflowJAXBSchema;
+import org.collectionspace.services.config.service.ObjectPartType;
 import org.collectionspace.services.nuxeo.client.java.DocHandlerBase;
-import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandlerImpl;
 import org.collectionspace.services.workflow.WorkflowCommon;
-import org.dom4j.Element;
 import org.nuxeo.ecm.core.api.ClientException;
 import org.nuxeo.ecm.core.api.DocumentModel;
 import org.slf4j.Logger;
index 8d13e45c7b228a36d37352b040cadb8b9c1abd50..4e1ada976d7dc7375b06217eab0cdfcd979e7779 100644 (file)
@@ -32,16 +32,13 @@ import java.util.List;
 \r
 import org.collectionspace.services.common.ReflectionMapper;\r
 import org.collectionspace.services.common.api.Tools;\r
-import org.collectionspace.services.common.repository.RepositoryClient;\r
-import org.collectionspace.services.common.repository.RepositoryClientFactory;\r
-import org.collectionspace.services.common.service.ListResultField;\r
-import org.collectionspace.services.common.service.DocHandlerParams;\r
-import org.collectionspace.services.common.service.ServiceBindingType;\r
 import org.collectionspace.services.common.context.MultipartServiceContext;\r
-import org.collectionspace.services.common.context.ServiceContext;\r
 import org.collectionspace.services.common.datetime.DateTimeFormatUtils;\r
 import org.collectionspace.services.common.document.DocumentException;\r
 import org.collectionspace.services.common.document.DocumentWrapper;\r
+import org.collectionspace.services.config.service.DocHandlerParams;\r
+import org.collectionspace.services.config.service.ListResultField;\r
+import org.collectionspace.services.config.service.ServiceBindingType;\r
 import org.collectionspace.services.jaxb.AbstractCommonList;\r
 import org.collectionspace.services.nuxeo.client.java.CommonList;\r
 import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandlerImpl;\r
index ae1ee63e206d45b1dc464d884e44aa869ab09cd8..fbb14e66f9b83b7882e56bbc300b1ffd3e643629 100644 (file)
@@ -27,7 +27,8 @@ import java.io.File;
 import java.util.Collection;
 import java.util.Hashtable;
 import java.util.Iterator;
-import org.collectionspace.services.common.RepositoryClientConfigType;
+
+import org.collectionspace.services.config.RepositoryClientConfigType;
 import org.nuxeo.ecm.core.api.DocumentModel;
 import org.nuxeo.ecm.core.api.DocumentModelList;
 import org.nuxeo.ecm.core.api.repository.RepositoryInstance;
index 1fdf95492d44c613398b81e0b08d42b3031d2cab..bda350a7981737c6d04370f87c2dcfe79e18299f 100644 (file)
@@ -2,27 +2,17 @@ package org.collectionspace.services.nuxeo.client.java;
 \r
 import java.io.File;\r
 import java.io.IOException;\r
-import java.util.Collection;\r
 import java.util.Hashtable;\r
 import java.util.Iterator;\r
 \r
-import javax.servlet.ServletConfig;\r
 import javax.servlet.ServletContext;\r
 \r
-//import org.collectionspace.services.common.RepositoryClientConfigType;\r
-import org.collectionspace.services.common.RepositoryClientConfigType;\r
+import org.collectionspace.services.config.RepositoryClientConfigType;\r
 import org.collectionspace.services.nuxeo.util.NuxeoUtils;\r
-import org.nuxeo.ecm.core.api.CoreInstance;\r
 import org.nuxeo.ecm.core.api.DocumentModel;\r
 import org.nuxeo.ecm.core.api.DocumentModelList;\r
-import org.nuxeo.ecm.core.api.repository.Repository;\r
 import org.nuxeo.ecm.core.api.repository.RepositoryInstance;\r
-import org.nuxeo.ecm.core.api.repository.RepositoryManager;\r
-import org.nuxeo.ecm.core.client.DefaultLoginHandler;\r
-import org.nuxeo.ecm.core.client.NuxeoApp;\r
-//import org.nuxeo.ecm.core.client.NuxeoClient;\r
 import org.nuxeo.osgi.application.FrameworkBootstrap;\r
-import org.nuxeo.runtime.api.Framework;\r
 import org.slf4j.Logger;\r
 import org.slf4j.LoggerFactory;\r
 \r
index 2949e2131ec754b96b53de507127670488f9a704..bada25bd77b9a33e913da7e12f39d29cf84a0605 100644 (file)
@@ -5,7 +5,7 @@ import java.util.Collection;
 import java.util.Hashtable;\r
 import java.util.Iterator;\r
 \r
-import org.collectionspace.services.common.RepositoryClientConfigType;\r
+import org.collectionspace.services.config.RepositoryClientConfigType;\r
 import org.nuxeo.ecm.core.api.CoreInstance;\r
 import org.nuxeo.ecm.core.api.DocumentModel;\r
 import org.nuxeo.ecm.core.api.DocumentModelList;\r
index 50892eee9962fb538743d85625e1c6069072aecb..343d9f6d7ada22f0c99e00a149456300cfe34980 100644 (file)
@@ -24,7 +24,6 @@
 package org.collectionspace.services.nuxeo.client.java;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.GregorianCalendar;
 import java.util.HashMap;
 import java.util.List;
@@ -44,26 +43,22 @@ import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.client.workflow.WorkflowClient;
-import org.collectionspace.services.common.api.Tools;
 import org.collectionspace.services.common.authorityref.AuthorityRefList;
 import org.collectionspace.services.common.context.JaxRsContext;
 import org.collectionspace.services.common.context.MultipartServiceContext;
 import org.collectionspace.services.common.context.ServiceContext;
 import org.collectionspace.services.common.datetime.DateTimeFormatUtils;
 import org.collectionspace.services.common.document.BadRequestException;
-import org.collectionspace.services.common.document.DocumentException;
-import org.collectionspace.services.common.document.DocumentNotFoundException;
 import org.collectionspace.services.common.document.DocumentUtils;
 import org.collectionspace.services.common.document.DocumentWrapper;
 import org.collectionspace.services.common.document.DocumentFilter;
-import org.collectionspace.services.common.document.DocumentHandler.Action;
 import org.collectionspace.services.common.profile.Profiler;
 import org.collectionspace.services.common.security.SecurityUtils;
-import org.collectionspace.services.common.service.ObjectPartType;
 import org.collectionspace.services.common.storage.jpa.JpaStorageUtils;
 import org.collectionspace.services.common.vocabulary.RefNameUtils;
 import org.collectionspace.services.common.vocabulary.RefNameServiceUtils;
 import org.collectionspace.services.common.vocabulary.RefNameServiceUtils.AuthRefConfigInfo;
+import org.collectionspace.services.config.service.ObjectPartType;
 import org.dom4j.Element;
 
 import org.nuxeo.ecm.core.api.DocumentModel;
index 37856ad86dd955f96d5d427fc9a4c67312b6678b..8ce7ccd12beada3ac1e5be9dc2e291fbd1122184 100644 (file)
@@ -33,7 +33,7 @@ import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;\r
 import org.collectionspace.services.common.context.ServiceContext;\r
 import org.collectionspace.services.common.document.DocumentUtils;\r
-import org.collectionspace.services.common.service.ObjectPartType;\r
+import org.collectionspace.services.config.service.ObjectPartType;\r
 \r
 import org.jboss.resteasy.plugins.providers.multipart.InputPart;\r
 import javax.ws.rs.core.MediaType;\r
index e5b7e18446db450dc09eb33c6acb6814592657ea..93fa7e6a877c956e1f43dca48b06b1eed60902dd 100644 (file)
@@ -28,14 +28,14 @@ import java.util.Hashtable;
 import javax.security.auth.login.LoginContext;
 
 import org.collectionspace.services.common.ServiceMain;
-import org.collectionspace.services.common.ClientType;
-import org.collectionspace.services.common.RepositoryClientConfigType;
 import org.collectionspace.services.common.repository.RepositoryClient;
 import org.collectionspace.services.common.repository.RepositoryClientFactory;
-import org.collectionspace.services.common.service.ServiceBindingType;
-import org.collectionspace.services.common.tenant.TenantBindingType;
 import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl;
-import org.collectionspace.services.common.tenant.RepositoryDomainType;
+import org.collectionspace.services.config.ClientType;
+import org.collectionspace.services.config.RepositoryClientConfigType;
+import org.collectionspace.services.config.service.ServiceBindingType;
+import org.collectionspace.services.config.tenant.RepositoryDomainType;
+import org.collectionspace.services.config.tenant.TenantBindingType;
 import org.nuxeo.runtime.api.Framework;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
similarity index 95%
rename from services/common/src/main/java/org/collectionspace/services/common/config/PropertyItemUtils.java
rename to services/config/src/main/java/org/collectionspace/services/common/config/PropertyItemUtils.java
index dd15f33c8f1603832f370495517ce0605644aa1f..154045b74cca6bf652e45cd932d6b490c498853f 100644 (file)
@@ -3,8 +3,8 @@ package org.collectionspace.services.common.config;
 import java.util.ArrayList;\r
 import java.util.List;\r
 \r
-import org.collectionspace.services.common.types.PropertyItemType;\r
-import org.collectionspace.services.common.types.PropertyType;\r
+import org.collectionspace.services.config.types.PropertyItemType;\r
+import org.collectionspace.services.config.types.PropertyType;\r
 \r
 public class PropertyItemUtils {\r
 \r
similarity index 96%
rename from services/common/src/main/java/org/collectionspace/services/common/config/ServicesConfigReaderImpl.java
rename to services/config/src/main/java/org/collectionspace/services/common/config/ServicesConfigReaderImpl.java
index a576f4a5cd4e33e593de4f5077cc563aa06c87dc..f5ab1c02ffb87a16495bd1ee44c3aa00d248680e 100644 (file)
@@ -24,7 +24,9 @@
 package org.collectionspace.services.common.config;
 
 import java.io.File;
-import org.collectionspace.services.common.*;
+
+import org.collectionspace.services.config.ClientType;
+import org.collectionspace.services.config.ServiceConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
similarity index 93%
rename from services/common/src/main/resources/service-config.xsd
rename to services/config/src/main/resources/service-config.xsd
index 514d3fd178372be47da45a1c6c8199b7f4e45598..84381ba6c531f088f41ae8044c4d5b8275efd93d 100644 (file)
 
 <xs:schema 
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
-  xmlns="http://collectionspace.org/services/common"
-  xmlns:types="http://collectionspace.org/services/common/types"
-  targetNamespace="http://collectionspace.org/services/common"
+  xmlns="http://collectionspace.org/services/config"
+  xmlns:types="http://collectionspace.org/services/config/types"
+  targetNamespace="http://collectionspace.org/services/config"
   version="0.1"
 >
 
-    <xs:import namespace="http://collectionspace.org/services/common/types" schemaLocation="types.xsd" />
+    <xs:import namespace="http://collectionspace.org/services/config/types" schemaLocation="types.xsd" />
 
     <xs:element name="service-config">
         <xs:complexType>
similarity index 98%
rename from services/common/src/main/resources/service.xsd
rename to services/config/src/main/resources/service.xsd
index e7fbbb1d37bcbb9b2eba7b07eb62196e4b0334f2..1c30a8f37474200b259e8e2a31abeb2dc443931c 100644 (file)
 -->
 <xs:schema
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
-    xmlns="http://collectionspace.org/services/common/service"
-    xmlns:types="http://collectionspace.org/services/common/types"
-    targetNamespace="http://collectionspace.org/services/common/service"
+    xmlns="http://collectionspace.org/services/config/service"
+    xmlns:types="http://collectionspace.org/services/config/types"
+    targetNamespace="http://collectionspace.org/services/config/service"
     version="0.1"
     elementFormDefault="qualified"
     >
 
-    <xs:import namespace="http://collectionspace.org/services/common/types" schemaLocation="types.xsd" />
+    <xs:import namespace="http://collectionspace.org/services/config/types" schemaLocation="types.xsd" />
 
     <xs:complexType name="ServiceBindingType">
         <xs:sequence>
similarity index 91%
rename from services/common/src/main/resources/tenant.xsd
rename to services/config/src/main/resources/tenant.xsd
index 04cee10c3f3e008b8fdf71fe84e608481df7aa42..84d86f1a61a210658e6b0bbfad77db372f805a49 100644 (file)
 
 -->
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
-           xmlns="http://collectionspace.org/services/common/tenant"
-           xmlns:types="http://collectionspace.org/services/common/types"
-           xmlns:service="http://collectionspace.org/services/common/service"
-           targetNamespace="http://collectionspace.org/services/common/tenant"
+           xmlns="http://collectionspace.org/services/config/tenant"
+           xmlns:types="http://collectionspace.org/services/config/types"
+           xmlns:service="http://collectionspace.org/services/config/service"
+           targetNamespace="http://collectionspace.org/services/config/tenant"
            version="0.1"
            elementFormDefault="qualified">
 
-    <xs:import namespace="http://collectionspace.org/services/common/types" schemaLocation="types.xsd" />
-    <xs:import namespace="http://collectionspace.org/services/common/service" schemaLocation="service.xsd" />
+    <xs:import namespace="http://collectionspace.org/services/config/types" schemaLocation="types.xsd" />
+    <xs:import namespace="http://collectionspace.org/services/config/service" schemaLocation="service.xsd" />
 
     <xs:element name="TenantBindingConfig">
         <xs:annotation>
similarity index 91%
rename from services/common/src/main/resources/types.xsd
rename to services/config/src/main/resources/types.xsd
index be364649fc91a4f3a951cbc172651b7ac6b977ab..ddf3a6d8edece2f052b44a797ce579a40d7c626a 100644 (file)
@@ -15,8 +15,8 @@
         
 -->
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
-    xmlns="http://collectionspace.org/services/common/types"
-    targetNamespace="http://collectionspace.org/services/common/types"
+    xmlns="http://collectionspace.org/services/config/types"
+    targetNamespace="http://collectionspace.org/services/config/types"
     elementFormDefault="qualified"
 >
     <!--
index a31e97dd81831e5f4c4383dec8df30243aede7ee..e65e1c31b48ac8b23325a9afbbaabc2f7fac8215 100644 (file)
@@ -7,12 +7,16 @@
     </parent>
     
     <modelVersion>4.0.0</modelVersion>
-    <groupId>org.collectionspace.services</groupId>
     <artifactId>org.collectionspace.services.contact.service</artifactId>
     <name>services.contact.service</name>
     <packaging>jar</packaging>
 
     <dependencies>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.config</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.authority.service</artifactId>
index b6b5a3c2c8df792f1f7b4b8c058c053d96a1ea22..55d9a5cabace49ba065194decca86510c1a0f02d 100644 (file)
@@ -27,10 +27,10 @@ import java.util.Map;
 
 import javax.ws.rs.core.UriInfo;
 import org.collectionspace.services.client.AuthorityClient;
+import org.collectionspace.services.config.service.ObjectPartType;
 import org.collectionspace.services.contact.ContactJAXBSchema;
 import org.collectionspace.services.common.document.DocumentWrapper;
 import org.collectionspace.services.nuxeo.client.java.DocHandlerBase;
-import org.collectionspace.services.common.service.ObjectPartType;
 import org.collectionspace.services.contact.ContactsCommon;
 
 import org.nuxeo.ecm.core.api.DocumentModel;
index d1f7d570910e598afe5cf120184ca76f1c0377eb..b7fffae6ad800a7b9c087b14875d586b34b477ed 100644 (file)
@@ -30,7 +30,6 @@
   </parent>\r
   \r
   <modelVersion>4.0.0</modelVersion>\r
-  <groupId>org.collectionspace.services</groupId>\r
   <artifactId>org.collectionspace.services.hyperjaxb</artifactId>\r
   <name>services.hyperjaxb</name>\r
   \r
index 5709397230472aa2cb11f8c96d7915524ebed7ad..a922c92f6b4974e1737a60bd3dc696bfa6e35b30 100644 (file)
@@ -8,12 +8,16 @@
     </parent>
     
     <modelVersion>4.0.0</modelVersion>
-    <groupId>org.collectionspace.services</groupId>
     <artifactId>org.collectionspace.services.imports.service</artifactId>
     <name>services.imports.service</name>
     <packaging>jar</packaging>       
 
     <dependencies>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.config</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.common</artifactId>
index 6fc0db06c10b8958a6fda3f6a8b0dd76af7b8c43..75109b400e031a7e1ebb9a66634d5f1b181b9d76 100644 (file)
@@ -32,8 +32,8 @@ import org.collectionspace.services.common.api.FileTools;
 import org.collectionspace.services.common.api.Tools;
 import org.collectionspace.services.common.api.ZipTools;
 import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl;
-import org.collectionspace.services.common.tenant.RepositoryDomainType;
-import org.collectionspace.services.common.tenant.TenantBindingType;
+import org.collectionspace.services.config.tenant.RepositoryDomainType;
+import org.collectionspace.services.config.tenant.TenantBindingType;
 import org.collectionspace.authentication.AuthN;
 
 import org.collectionspace.services.imports.nuxeo.ImportCommand;
index 8242eb1d74c7d58097786c9c3f840e22a25be293..f1a2f0cb81a9ca2634335e8251f7c8bcf78e5a98 100644 (file)
-/**\r
- *  This document is a part of the source code and related artifacts\r
- *  for CollectionSpace, an open source collections management system\r
- *  for museums and related institutions:\r
-\r
- *  http://www.collectionspace.org\r
- *  http://wiki.collectionspace.org\r
-\r
- *  Copyright 2011 University of California at Berkeley\r
-\r
- *  Licensed under the Educational Community License (ECL), Version 2.0.\r
- *  You may not use this file except in compliance with this License.\r
-\r
- *  You may obtain a copy of the ECL 2.0 License at\r
-\r
- *  https://source.collectionspace.org/collection-space/LICENSE.txt\r
-\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- */\r
-\r
-package org.collectionspace.services.imports;\r
-\r
-import java.util.UUID;\r
-\r
-import org.collectionspace.services.common.IFragmentHandler;\r
-import org.collectionspace.services.common.XmlSaxFragmenter;\r
-import org.collectionspace.services.common.XmlTools;\r
-import org.collectionspace.services.common.api.FileTools;\r
-import org.collectionspace.services.common.api.Tools;\r
-import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;\r
-import org.collectionspace.services.nuxeo.util.NuxeoUtils;\r
-\r
-import org.dom4j.Document;\r
-import org.dom4j.Element;\r
-import org.xml.sax.InputSource;\r
-\r
-/** This class expands templates specifically for the imports service.\r
- *\r
- *  To see capability to create workspaces, see svn revision 4346 on branch\r
- *  https://source.collectionspace.org/collection-space/src/services/branches/CSPACE-3178/services\r
- *  This capability was removed, as it was necessary for testing only.\r
- *\r
- * @author Laramie Crocker\r
- */\r
-public class TemplateExpander {\r
-\r
-    protected static String var(String theVar){\r
-        return "\\$\\{"+theVar+"\\}";\r
-    }\r
-\r
-    /**\r
-     * @param source the template, which contains variables wrapped in a dollar sign and curly braces, e.g. source="my template with ID ${docID} yada yada."\r
-     * @param theVar a variable name, without the dollar sign or curly braces or internal quotes, e.g. searchAndReplaceVar(source, "docID", "1234-5678")\r
-     * @param replace the value the variable will be replaced with.\r
-     * @return the expanded template.\r
-     */\r
-    public static String searchAndReplaceVar(String source, String theVar, String replace){\r
-        return Tools.searchAndReplace(source, var(theVar), replace);\r
-    }\r
-\r
-    public static String doOneService(String tenantId, String outDir, String partTmpl, String wrapperTmpl,\r
-                                      String SERVICE_TYPE, String SERVICE_NAME, String CSID) throws Exception {\r
-        String docID;\r
-        if (Tools.notBlank(CSID)){\r
-            docID = CSID;\r
-        } else {\r
-            docID = UUID.randomUUID().toString();\r
-        }\r
-        String part = Tools.searchAndReplace(partTmpl, var("docID"), docID);\r
-\r
-        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("Schema"), part);\r
-        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("docID"), docID);\r
-        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("tenantID"), tenantId);\r
-        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("ServiceType"), SERVICE_TYPE);\r
-        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("ServiceName"), SERVICE_NAME);\r
-        //TODO: set timestamp via creating a ${created} variable.\r
-        String nowTime = GregorianCalendarDateTimeUtils.timestampUTC();\r
-        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("createdDate"), nowTime);\r
-        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("updatedDate"), nowTime);\r
-\r
-        String serviceDir = outDir+'/'+docID;\r
-        FileTools.saveFile(serviceDir, "document.xml", wrapperTmpl, true/*true=create parent dirs*/);\r
-        return docID;\r
-    }\r
-\r
-\r
-    /** Once you have called createWorkspace() to create a home for documents of a service, you can call this method to add documents for that service.\r
-     *\r
-     *  Internally, this method also gets called by the XmlSaxFragmenter callback via the public inner class FragmentHandlerImpl.\r
-     *\r
-     * @param partTmpl  A template file that contains the schema part for the service, and which has macros such as ${docID} to be expanded.\r
-     * @param SERVICE_NAME The name of the service, such as "Personauthorities"\r
-     * @param SERVICE_TYPE The Nuxeo document type, such as "Personauthority"\r
-     * @param TEMPLATE_DIR The local filesystem location of all the standard templates that wrap up workspace documents;\r
-     *                     once expanded, these spit out Nuxeo import format.\r
-     * @param CSID An optional parameter which forces the document CSID, otherwise the CSID is set to a random UUID.\r
-     * @throws Exception\r
-     */\r
-    public static void createDocInWorkspace(\r
-               String tenantId,\r
-            String partTmpl,\r
-            String SERVICE_NAME,\r
-            String SERVICE_TYPE,\r
-            String TEMPLATE_DIR,\r
-            String OUTPUT_DIR,\r
-            String CSID) throws Exception {\r
-        String wrapperTmpl = FileTools.readFile(TEMPLATE_DIR,"service-document.xml");\r
-        String outputDir = OUTPUT_DIR+'/'+SERVICE_NAME;\r
-        doOneService(tenantId, outputDir, partTmpl, wrapperTmpl, SERVICE_TYPE, SERVICE_NAME, CSID);\r
-    }\r
-\r
-    public static void expand(String tenantId, String TEMPLATE_DIR, String outputDir, String requestFilename, String chopPath){\r
-        FragmentHandlerImpl callback = new FragmentHandlerImpl(tenantId, TEMPLATE_DIR, outputDir);\r
-        XmlSaxFragmenter.parse(requestFilename, chopPath, callback, false);\r
-    }\r
-\r
-    public static void expandInputSource(String tenantId, String TEMPLATE_DIR, String outputDir, InputSource requestSource, String chopPath){\r
-        FragmentHandlerImpl callback = new FragmentHandlerImpl(tenantId, TEMPLATE_DIR, outputDir);\r
-        XmlSaxFragmenter.parse(requestSource, chopPath, callback, false);\r
-    }\r
-\r
-    /** This inner class is the callback target for calls to XmlSaxFragmenter, for example:\r
-     *     FragmentHandlerImpl callback = new FragmentHandlerImpl();\r
-     *     XmlSaxFragmenter.parse(filename, "/imports/import", callback, false);\r
-     *  It will be called for every /imports/import in the file:\r
-     *      &lt;import ID="1" service="Personauthorities" type="Personauthority">\r
-     */\r
-    public static class FragmentHandlerImpl implements IFragmentHandler {\r
-        public String SERVICE_NAME = "";   //You can provide a default.\r
-        public String SERVICE_TYPE = "";   //You can provide a default.\r
-        public String TEMPLATE_DIR = "";   //You MUST provide a default via constructor.\r
-        public String OUPUT_DIR = "";      //You MUST provide a default via constructor.\r
-        public String TENANT_ID = "";\r
-\r
-        //============IFragmentHandler===========================================================\r
-        public void onFragmentReady(Document context, Element fragmentParent, String currentPath, int fragmentIndex, String fragment){\r
-            try {\r
-                dump(context, currentPath, fragmentIndex, fragment);\r
-                String serviceName = checkAttribute(fragmentParent, "service", SERVICE_NAME);\r
-                String serviceType = checkAttribute(fragmentParent, "type", SERVICE_TYPE);\r
-                serviceType = NuxeoUtils.getTenantQualifiedDocType(TENANT_ID, serviceType); //REM - Ensure a tenant qualified Nuxeo doctype\r
-                String CSID  = fragmentParent.attributeValue("CSID");\r
-                TemplateExpander.createDocInWorkspace(TENANT_ID, fragment, serviceName, serviceType, TEMPLATE_DIR, OUPUT_DIR, CSID);\r
-            } catch (Exception e){\r
-                System.err.println("ERROR calling expandXmlPayloadToDir"+e);\r
-                e.printStackTrace();\r
-            }\r
-        }\r
-        public void onEndDocument(Document document, int fragmentCount){\r
-            System.out.println("====TemplateExpander DONE============\r\n"+ XmlTools.prettyPrint(document)+"================");\r
-        }\r
-        //============helper methods==============================================================\r
-        public FragmentHandlerImpl(String tenantId, String templateDir, String outputDir){\r
-            TEMPLATE_DIR = templateDir;\r
-            OUPUT_DIR = outputDir;\r
-            TENANT_ID = tenantId;\r
-        }\r
-        private String checkAttribute(Element fragmentParent, String attName, String defaultVal){\r
-            String val = fragmentParent.attributeValue(attName);\r
-            if (Tools.notEmpty(val)){\r
-                return val;\r
-            }\r
-            return defaultVal;\r
-        }\r
-        private void dump(Document context, String currentPath, int fragmentIndex, String fragment){\r
-            System.out.println("====Path============\r\n"+currentPath+'['+fragmentIndex+']');\r
-            System.out.println("====Context=========\r\n"+ XmlTools.prettyPrint(context));\r
-            System.out.println("====Fragment========\r\n"+fragment+"\r\n===================\r\n");\r
-        }\r
-    }\r
-\r
-}\r
+/**
+ *  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
+
+ *  Copyright 2011 University of California at Berkeley
+
+ *  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
+
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.collectionspace.services.imports;
+
+import java.util.UUID;
+
+import org.collectionspace.services.common.IFragmentHandler;
+import org.collectionspace.services.common.XmlSaxFragmenter;
+import org.collectionspace.services.common.XmlTools;
+import org.collectionspace.services.common.api.FileTools;
+import org.collectionspace.services.common.api.Tools;
+import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
+import org.collectionspace.services.nuxeo.util.NuxeoUtils;
+
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.xml.sax.InputSource;
+
+/** This class expands templates specifically for the imports service.
+ *
+ *  To see capability to create workspaces, see svn revision 4346 on branch
+ *  https://source.collectionspace.org/collection-space/src/services/branches/CSPACE-3178/services
+ *  This capability was removed, as it was necessary for testing only.
+ *
+ * @author Laramie Crocker
+ */
+public class TemplateExpander {
+
+    protected static String var(String theVar){
+        return "\\$\\{"+theVar+"\\}";
+    }
+
+    /**
+     * @param source the template, which contains variables wrapped in a dollar sign and curly braces, e.g. source="my template with ID ${docID} yada yada."
+     * @param theVar a variable name, without the dollar sign or curly braces or internal quotes, e.g. searchAndReplaceVar(source, "docID", "1234-5678")
+     * @param replace the value the variable will be replaced with.
+     * @return the expanded template.
+     */
+    public static String searchAndReplaceVar(String source, String theVar, String replace){
+        return Tools.searchAndReplace(source, var(theVar), replace);
+    }
+
+    public static String doOneService(String tenantId, String outDir, String partTmpl, String wrapperTmpl,
+                                      String SERVICE_TYPE, String SERVICE_NAME, String CSID) throws Exception {
+        String docID;
+        if (Tools.notBlank(CSID)){
+            docID = CSID;
+        } else {
+            docID = UUID.randomUUID().toString();
+        }
+        String part = Tools.searchAndReplace(partTmpl, var("docID"), docID);
+
+        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("Schema"), part);
+        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("docID"), docID);
+        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("tenantID"), tenantId);
+        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("ServiceType"), SERVICE_TYPE);
+        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("ServiceName"), SERVICE_NAME);
+        //TODO: set timestamp via creating a ${created} variable.
+        String nowTime = GregorianCalendarDateTimeUtils.timestampUTC();
+        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("createdDate"), nowTime);
+        wrapperTmpl = Tools.searchAndReplace(wrapperTmpl, var("updatedDate"), nowTime);
+
+        String serviceDir = outDir+'/'+docID;
+        FileTools.saveFile(serviceDir, "document.xml", wrapperTmpl, true/*true=create parent dirs*/);
+        return docID;
+    }
+
+
+    /** Once you have called createWorkspace() to create a home for documents of a service, you can call this method to add documents for that service.
+     *
+     *  Internally, this method also gets called by the XmlSaxFragmenter callback via the public inner class FragmentHandlerImpl.
+     *
+     * @param partTmpl  A template file that contains the schema part for the service, and which has macros such as ${docID} to be expanded.
+     * @param SERVICE_NAME The name of the service, such as "Personauthorities"
+     * @param SERVICE_TYPE The Nuxeo document type, such as "Personauthority"
+     * @param TEMPLATE_DIR The local filesystem location of all the standard templates that wrap up workspace documents;
+     *                     once expanded, these spit out Nuxeo import format.
+     * @param CSID An optional parameter which forces the document CSID, otherwise the CSID is set to a random UUID.
+     * @throws Exception
+     */
+    public static void createDocInWorkspace(
+               String tenantId,
+            String partTmpl,
+            String SERVICE_NAME,
+            String SERVICE_TYPE,
+            String TEMPLATE_DIR,
+            String OUTPUT_DIR,
+            String CSID) throws Exception {
+        String wrapperTmpl = FileTools.readFile(TEMPLATE_DIR,"service-document.xml");
+        String outputDir = OUTPUT_DIR+'/'+SERVICE_NAME;
+        doOneService(tenantId, outputDir, partTmpl, wrapperTmpl, SERVICE_TYPE, SERVICE_NAME, CSID);
+    }
+
+    public static void expand(String tenantId, String TEMPLATE_DIR, String outputDir, String requestFilename, String chopPath){
+        FragmentHandlerImpl callback = new FragmentHandlerImpl(tenantId, TEMPLATE_DIR, outputDir);
+        XmlSaxFragmenter.parse(requestFilename, chopPath, callback, false);
+    }
+
+    public static void expandInputSource(String tenantId, String TEMPLATE_DIR, String outputDir, InputSource requestSource, String chopPath){
+        FragmentHandlerImpl callback = new FragmentHandlerImpl(tenantId, TEMPLATE_DIR, outputDir);
+        XmlSaxFragmenter.parse(requestSource, chopPath, callback, false);
+    }
+
+    /** This inner class is the callback target for calls to XmlSaxFragmenter, for example:
+     *     FragmentHandlerImpl callback = new FragmentHandlerImpl();
+     *     XmlSaxFragmenter.parse(filename, "/imports/import", callback, false);
+     *  It will be called for every /imports/import in the file:
+     *      &lt;import ID="1" service="Personauthorities" type="Personauthority">
+     */
+    public static class FragmentHandlerImpl implements IFragmentHandler {
+        public String SERVICE_NAME = "";   //You can provide a default.
+        public String SERVICE_TYPE = "";   //You can provide a default.
+        public String TEMPLATE_DIR = "";   //You MUST provide a default via constructor.
+        public String OUPUT_DIR = "";      //You MUST provide a default via constructor.
+        public String TENANT_ID = "";
+
+        //============IFragmentHandler===========================================================
+        public void onFragmentReady(Document context, Element fragmentParent, String currentPath, int fragmentIndex, String fragment){
+            try {
+                dump(context, currentPath, fragmentIndex, fragment);
+                String serviceName = checkAttribute(fragmentParent, "service", SERVICE_NAME);
+                String serviceType = checkAttribute(fragmentParent, "type", SERVICE_TYPE);
+                serviceType = NuxeoUtils.getTenantQualifiedDocType(TENANT_ID, serviceType); //REM - Ensure a tenant qualified Nuxeo doctype
+                String CSID  = fragmentParent.attributeValue("CSID");
+                TemplateExpander.createDocInWorkspace(TENANT_ID, fragment, serviceName, serviceType, TEMPLATE_DIR, OUPUT_DIR, CSID);
+            } catch (Exception e){
+                System.err.println("ERROR calling expandXmlPayloadToDir"+e);
+                e.printStackTrace();
+            }
+        }
+        public void onEndDocument(Document document, int fragmentCount){
+            System.out.println("====TemplateExpander DONE============\r\n"+ XmlTools.prettyPrint(document)+"================");
+        }
+        //============helper methods==============================================================
+        public FragmentHandlerImpl(String tenantId, String templateDir, String outputDir){
+            TEMPLATE_DIR = templateDir;
+            OUPUT_DIR = outputDir;
+            TENANT_ID = tenantId;
+        }
+        private String checkAttribute(Element fragmentParent, String attName, String defaultVal){
+            String val = fragmentParent.attributeValue(attName);
+            if (Tools.notEmpty(val)){
+                return val;
+            }
+            return defaultVal;
+        }
+        private void dump(Document context, String currentPath, int fragmentIndex, String fragment){
+            System.out.println("====Path============\r\n"+currentPath+'['+fragmentIndex+']');
+            System.out.println("====Context=========\r\n"+ XmlTools.prettyPrint(context));
+            System.out.println("====Fragment========\r\n"+fragment+"\r\n===================\r\n");
+        }
+    }
+
+}
index a8097fc3f3c507661863735f5d564bd76bc085cc..37b23919efda524dd4d5b00ff48c9d8328e7deec 100644 (file)
@@ -1,57 +1,57 @@
-package org.collectionspace.services.imports.nuxeo;\r
-\r
-import java.io.File;\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.collectionspace.services.nuxeo.client.java.NuxeoClientEmbedded;\r
-import org.collectionspace.services.nuxeo.client.java.NuxeoConnectorEmbedded;\r
-import org.nuxeo.ecm.core.api.repository.RepositoryInstance;\r
-import org.nuxeo.ecm.core.io.DocumentPipe;\r
-import org.nuxeo.ecm.core.io.DocumentReader;\r
-import org.nuxeo.ecm.core.io.DocumentWriter;\r
-import org.nuxeo.ecm.core.io.impl.DocumentPipeImpl;\r
-import org.nuxeo.ecm.core.io.impl.plugins.DocumentModelWriter;\r
-// we use our own override of this: import org.nuxeo.ecm.core.io.impl.plugins.XMLDirectoryReader;\r
-\r
-// based loosely on package org.nuxeo.ecm.shell.commands.io.ImportCommand;\r
-public class ImportCommand {\r
-    private static final Log logger = LogFactory.getLog(ImportCommand.class);\r
-\r
-    public String run(String src, String dest) throws Exception {\r
-        File file = new File(src);\r
-        ///cspace way of configuring client and auth:\r
-        NuxeoClientEmbedded client = NuxeoConnectorEmbedded.getInstance().getClient();\r
-        RepositoryInstance  repoSession = client.openRepository();\r
-        try {\r
-            return importTree(repoSession, file, dest);\r
-        } finally {\r
-//            repository.close();\r
-            client.releaseRepository(repoSession);\r
-        }\r
-    }\r
-\r
-    String importTree(RepositoryInstance repository, File file, String toPath) throws Exception {\r
-        DocumentReader reader = null;\r
-        DocumentWriter writer = null;\r
-        String dump = "NO RESULTS";\r
-        try {\r
-            System.out.println("importTree reading file: "+file+(file!=null ? " exists? "+file.exists() : " file param is null"));\r
-            reader = new LoggedXMLDirectoryReader(file);  //our overload of XMLDirectoryReader.\r
-            writer = new DocumentModelWriter(repository, toPath, 10);\r
-            DocumentPipe pipe = new DocumentPipeImpl(10);\r
-            // pipe.addTransformer(transformer);\r
-            pipe.setReader(reader);\r
-            pipe.setWriter(writer);\r
-            pipe.run();\r
-        } finally {\r
-            if (reader != null) {\r
-                reader.close();\r
-                dump = ((LoggedXMLDirectoryReader)reader).report();\r
-            }\r
-            if (writer != null) {\r
-                writer.close();\r
-            }\r
-        }\r
-        return dump;\r
-    }\r
+package org.collectionspace.services.imports.nuxeo;
+
+import java.io.File;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.collectionspace.services.nuxeo.client.java.NuxeoClientEmbedded;
+import org.collectionspace.services.nuxeo.client.java.NuxeoConnectorEmbedded;
+import org.nuxeo.ecm.core.api.repository.RepositoryInstance;
+import org.nuxeo.ecm.core.io.DocumentPipe;
+import org.nuxeo.ecm.core.io.DocumentReader;
+import org.nuxeo.ecm.core.io.DocumentWriter;
+import org.nuxeo.ecm.core.io.impl.DocumentPipeImpl;
+import org.nuxeo.ecm.core.io.impl.plugins.DocumentModelWriter;
+// we use our own override of this: import org.nuxeo.ecm.core.io.impl.plugins.XMLDirectoryReader;
+
+// based loosely on package org.nuxeo.ecm.shell.commands.io.ImportCommand;
+public class ImportCommand {
+    private static final Log logger = LogFactory.getLog(ImportCommand.class);
+
+    public String run(String src, String dest) throws Exception {
+        File file = new File(src);
+        ///cspace way of configuring client and auth:
+        NuxeoClientEmbedded client = NuxeoConnectorEmbedded.getInstance().getClient();
+        RepositoryInstance  repoSession = client.openRepository();
+        try {
+            return importTree(repoSession, file, dest);
+        } finally {
+//            repository.close();
+            client.releaseRepository(repoSession);
+        }
+    }
+
+    String importTree(RepositoryInstance repository, File file, String toPath) throws Exception {
+        DocumentReader reader = null;
+        DocumentWriter writer = null;
+        String dump = "NO RESULTS";
+        try {
+            System.out.println("importTree reading file: "+file+(file!=null ? " exists? "+file.exists() : " file param is null"));
+            reader = new LoggedXMLDirectoryReader(file);  //our overload of XMLDirectoryReader.
+            writer = new DocumentModelWriter(repository, toPath, 10);
+            DocumentPipe pipe = new DocumentPipeImpl(10);
+            // pipe.addTransformer(transformer);
+            pipe.setReader(reader);
+            pipe.setWriter(writer);
+            pipe.run();
+        } finally {
+            if (reader != null) {
+                reader.close();
+                dump = ((LoggedXMLDirectoryReader)reader).report();
+            }
+            if (writer != null) {
+                writer.close();
+            }
+        }
+        return dump;
+    }
 }
\ No newline at end of file
index 125976ff291482899a803f1e59160534692b921b..36f0a3ebe86259013b892fb05b6432c2949ab099 100644 (file)
-package org.collectionspace.services.imports.nuxeo;\r
-\r
-import java.io.BufferedInputStream;\r
-import java.io.File;\r
-import java.io.FileFilter;\r
-import java.io.FileInputStream;\r
-import java.io.IOException;\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import org.dom4j.Document;\r
-import org.dom4j.DocumentException;\r
-import org.dom4j.io.SAXReader;\r
-import org.nuxeo.common.utils.FileTreeIterator;\r
-import org.nuxeo.common.utils.FileUtils;\r
-import org.nuxeo.common.utils.Path;\r
-import org.nuxeo.ecm.core.api.impl.blob.StreamingBlob;\r
-import org.nuxeo.ecm.core.io.ExportConstants;\r
-import org.nuxeo.ecm.core.io.ExportedDocument;\r
-import org.nuxeo.ecm.core.io.impl.AbstractDocumentReader;\r
-import org.nuxeo.ecm.core.io.impl.ExportedDocumentImpl;\r
-import org.nuxeo.ecm.core.io.impl.plugins.XMLDirectoryReader;\r
-import org.nuxeo.runtime.services.streaming.FileSource;\r
-\r
-public class LoggedXMLDirectoryReader extends AbstractDocumentReader {\r
-\r
-    protected Document loadXML(File file) throws IOException {\r
-        String filename = file.getCanonicalPath();\r
-        System.out.println("~~~~~~~~~~~~~~~~~~~ LoggedXMLDirectoryReader :: "+filename);\r
-        BufferedInputStream in = null;\r
-        try {\r
-            in = new BufferedInputStream(new FileInputStream(file));\r
-            System.out.println("~~~~~~~~~~~~~~~~~~~ LoggedXMLDirectoryReader :: "+filename+" :: DONE");\r
-            reportList.add("READ: "+filename);\r
-            return new SAXReader().read(in);\r
-        } catch (DocumentException e) {\r
-            IOException ioe = new IOException("Failed to read file document "\r
-                    + file + ": " + e.getMessage());\r
-            ioe.setStackTrace(e.getStackTrace());\r
-            System.out.println("~~~~~~~~~~~~~~~~~~~ LoggedXMLDirectoryReader :: "+filename+" :: ERROR");\r
-            reportList.add("ERROR: "+filename);\r
-            throw ioe;\r
-        } finally {\r
-            if (in != null) {\r
-                in.close();\r
-            }\r
-        }\r
-    }\r
-\r
-    private File source;\r
-\r
-    private FileTreeIterator iterator;\r
-\r
-    public LoggedXMLDirectoryReader(String sourcePath) {\r
-        this(new File(sourcePath));\r
-    }\r
-\r
-    public LoggedXMLDirectoryReader(File source) {\r
-        this.source = source;\r
-        iterator = new FileTreeIterator(source);\r
-        iterator.setFilter(new FileFilter() {\r
-            public boolean accept(File pathname) {\r
-                return pathname.isDirectory();\r
-            }\r
-        });\r
-    }\r
-\r
-    public Object getSource() {\r
-        return source;\r
-    }\r
-\r
-    public void setSource(File source) {\r
-        this.source = source;\r
-    }\r
-\r
-    public void close() {\r
-        source = null;\r
-        iterator = null;\r
-    }\r
-\r
-    private List<String> reportList = new ArrayList<String>();\r
-    public String report(){\r
-        StringBuffer result = new StringBuffer();\r
-        for (String s: reportList){\r
-            result.append(s).append("\r\n");\r
-        }\r
-        return result.toString();\r
-    }\r
-\r
-\r
-    @Override\r
-    public ExportedDocument read() throws IOException {\r
-        if (iterator.hasNext()) {\r
-            File dir = iterator.next();\r
-            if (dir == null) {\r
-                return null;\r
-            }\r
-            // read document files\r
-            ExportedDocument xdoc = new ExportedDocumentImpl();\r
-            for (File file : dir.listFiles()) {\r
-                if (file.isFile()) {\r
-                    String name = file.getName();\r
-                    if (ExportConstants.DOCUMENT_FILE.equals(name)) {\r
-                        Document doc = loadXML(file);\r
-                        xdoc.setDocument(doc);\r
-                        Path relPath = computeRelativePath(dir);\r
-                        xdoc.setPath(relPath);\r
-                        reportList.add(relPath.toString());\r
-                    } else if (name.endsWith(".xml")) {\r
-                        xdoc.putDocument(\r
-                                FileUtils.getFileNameNoExt(file.getName()),\r
-                                loadXML(file));\r
-                    } else { // presume a blob\r
-                        xdoc.putBlob(file.getName(), new StreamingBlob(\r
-                                new FileSource(file)));\r
-                    }\r
-                }\r
-            }\r
-            return xdoc;\r
-        }\r
-        return null;\r
-    }\r
-\r
-    /*NXP-1688 Rux: the path was somehow left over when migrated from\r
-    core 1.3.4 to 1.4.0. Pull back.*/\r
-    private Path computeRelativePath(File file) {\r
-        /*NXP-2507 Rux: preserve directory structure with slashes instead OS name separator*/\r
-        String subPathS =\r
-            file.getAbsolutePath().substring(source.getAbsolutePath().length());\r
-        subPathS = subPathS.replace(File.separatorChar, '/');\r
-        return new Path(subPathS);\r
-    }\r
-\r
+package org.collectionspace.services.imports.nuxeo;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.io.SAXReader;
+import org.nuxeo.common.utils.FileTreeIterator;
+import org.nuxeo.common.utils.FileUtils;
+import org.nuxeo.common.utils.Path;
+import org.nuxeo.ecm.core.api.impl.blob.StreamingBlob;
+import org.nuxeo.ecm.core.io.ExportConstants;
+import org.nuxeo.ecm.core.io.ExportedDocument;
+import org.nuxeo.ecm.core.io.impl.AbstractDocumentReader;
+import org.nuxeo.ecm.core.io.impl.ExportedDocumentImpl;
+import org.nuxeo.ecm.core.io.impl.plugins.XMLDirectoryReader;
+import org.nuxeo.runtime.services.streaming.FileSource;
+
+public class LoggedXMLDirectoryReader extends AbstractDocumentReader {
+
+    protected Document loadXML(File file) throws IOException {
+        String filename = file.getCanonicalPath();
+        System.out.println("~~~~~~~~~~~~~~~~~~~ LoggedXMLDirectoryReader :: "+filename);
+        BufferedInputStream in = null;
+        try {
+            in = new BufferedInputStream(new FileInputStream(file));
+            System.out.println("~~~~~~~~~~~~~~~~~~~ LoggedXMLDirectoryReader :: "+filename+" :: DONE");
+            reportList.add("READ: "+filename);
+            return new SAXReader().read(in);
+        } catch (DocumentException e) {
+            IOException ioe = new IOException("Failed to read file document "
+                    + file + ": " + e.getMessage());
+            ioe.setStackTrace(e.getStackTrace());
+            System.out.println("~~~~~~~~~~~~~~~~~~~ LoggedXMLDirectoryReader :: "+filename+" :: ERROR");
+            reportList.add("ERROR: "+filename);
+            throw ioe;
+        } finally {
+            if (in != null) {
+                in.close();
+            }
+        }
+    }
+
+    private File source;
+
+    private FileTreeIterator iterator;
+
+    public LoggedXMLDirectoryReader(String sourcePath) {
+        this(new File(sourcePath));
+    }
+
+    public LoggedXMLDirectoryReader(File source) {
+        this.source = source;
+        iterator = new FileTreeIterator(source);
+        iterator.setFilter(new FileFilter() {
+            public boolean accept(File pathname) {
+                return pathname.isDirectory();
+            }
+        });
+    }
+
+    public Object getSource() {
+        return source;
+    }
+
+    public void setSource(File source) {
+        this.source = source;
+    }
+
+    public void close() {
+        source = null;
+        iterator = null;
+    }
+
+    private List<String> reportList = new ArrayList<String>();
+    public String report(){
+        StringBuffer result = new StringBuffer();
+        for (String s: reportList){
+            result.append(s).append("\r\n");
+        }
+        return result.toString();
+    }
+
+
+    @Override
+    public ExportedDocument read() throws IOException {
+        if (iterator.hasNext()) {
+            File dir = iterator.next();
+            if (dir == null) {
+                return null;
+            }
+            // read document files
+            ExportedDocument xdoc = new ExportedDocumentImpl();
+            for (File file : dir.listFiles()) {
+                if (file.isFile()) {
+                    String name = file.getName();
+                    if (ExportConstants.DOCUMENT_FILE.equals(name)) {
+                        Document doc = loadXML(file);
+                        xdoc.setDocument(doc);
+                        Path relPath = computeRelativePath(dir);
+                        xdoc.setPath(relPath);
+                        reportList.add(relPath.toString());
+                    } else if (name.endsWith(".xml")) {
+                        xdoc.putDocument(
+                                FileUtils.getFileNameNoExt(file.getName()),
+                                loadXML(file));
+                    } else { // presume a blob
+                        xdoc.putBlob(file.getName(), new StreamingBlob(
+                                new FileSource(file)));
+                    }
+                }
+            }
+            return xdoc;
+        }
+        return null;
+    }
+
+    /*NXP-1688 Rux: the path was somehow left over when migrated from
+    core 1.3.4 to 1.4.0. Pull back.*/
+    private Path computeRelativePath(File file) {
+        /*NXP-2507 Rux: preserve directory structure with slashes instead OS name separator*/
+        String subPathS =
+            file.getAbsolutePath().substring(source.getAbsolutePath().length());
+        subPathS = subPathS.replace(File.separatorChar, '/');
+        return new Path(subPathS);
+    }
+
 }
\ No newline at end of file
index ee745926a36e61d7fdb3dab954bf6d7e8e0a5dc1..2b67aee62e2a39a6ce763358463e475a3a447773 100644 (file)
@@ -29,7 +29,6 @@ import org.collectionspace.services.client.MediaClient;
 import org.collectionspace.services.client.PayloadOutputPart;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
-import org.collectionspace.services.common.ClientType;
 import org.collectionspace.services.common.ResourceBase;
 import org.collectionspace.services.common.ServiceMain;
 import org.collectionspace.services.common.ServiceMessages;
@@ -104,7 +103,7 @@ public class MediaResource extends ResourceBase {
        }       
        
     //FIXME retrieve client type from configuration
-    final static ClientType CLIENT_TYPE = ServiceMain.getInstance().getClientType();
+//    final static ClientType CLIENT_TYPE = ServiceMain.getInstance().getClientType();
 
     @Override
     protected String getVersionString() {
index beed33cf2d04ad86696af482923e602479d4d109..ea7f3275785c10b3933c8cadd9a24b3b36d4e134 100644 (file)
@@ -25,13 +25,10 @@ package org.collectionspace.services.person.nuxeo;
 
 import java.util.Arrays;
 import java.util.List;
-import java.util.Map;
 
 import org.collectionspace.services.client.PersonAuthorityClient;
 import org.collectionspace.services.common.vocabulary.nuxeo.AuthorityItemDocumentModelHandler;
 import org.collectionspace.services.PersonJAXBSchema;
-import org.collectionspace.services.common.document.DocumentWrapper;
-import org.collectionspace.services.common.service.ObjectPartType;
 import org.collectionspace.services.person.PersonsCommon;
 import org.nuxeo.ecm.core.api.DocumentModel;
 
index fee7fedbe57b3fb7061df13449893572580723e8..2e9101f497e63c55b4a9caaf8660c311a761edf3 100644 (file)
@@ -7,7 +7,6 @@
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
-    <groupId>org.collectionspace.services</groupId>
     <artifactId>org.collectionspace.services.main</artifactId>
     <name>services.main</name>
     <packaging>pom</packaging>
     be built after the security module and common modules are built
     -->
     <modules>
+        <module>config</module>
         <module>common-api</module>
         <module>authentication</module>
+               <module>authorization-common</module>
         <module>authorization</module>
         <module>blob</module>
         <module>client</module>
index 07496cd9c48495e12c3182873452fd51d02f5512..5e618f7b14b697369eb3907518fe01905031e414 100644 (file)
@@ -7,12 +7,16 @@
     </parent>\r
     \r
     <modelVersion>4.0.0</modelVersion>\r
-    <groupId>org.collectionspace.services</groupId>\r
     <artifactId>org.collectionspace.services.relation.service</artifactId>\r
     <name>services.relation.service</name>\r
     <packaging>jar</packaging>\r
 \r
     <dependencies>\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.config</artifactId>\r
+            <version>${project.version}</version>\r
+        </dependency>\r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.common</artifactId>\r
index ebd2323fcf8cdab4a5582906b5a35f25944afff4..0405bbb8e3f1934b4b4e175aed30d66898fe7c4a 100644 (file)
@@ -33,17 +33,19 @@ import org.collectionspace.services.common.ResourceMap;
 import org.collectionspace.services.common.ServiceMain;
 import org.collectionspace.services.common.api.RefName;
 import org.collectionspace.services.common.api.Tools;
-import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl;
-import org.collectionspace.services.common.context.ServiceBindingUtils;
+
 import org.collectionspace.services.common.document.DocumentNotFoundException;
 import org.collectionspace.services.common.document.InvalidDocumentException;
 import org.collectionspace.services.common.relation.RelationJAXBSchema;
 import org.collectionspace.services.common.relation.nuxeo.RelationConstants;
+import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl;
+import org.collectionspace.services.common.context.ServiceBindingUtils;
 import org.collectionspace.services.common.context.ServiceContext;
 import org.collectionspace.services.common.repository.RepositoryClient;
 import org.collectionspace.services.common.repository.RepositoryClientFactory;
-import org.collectionspace.services.common.service.ServiceBindingType;
+
 import org.collectionspace.services.nuxeo.util.NuxeoUtils;
+
 import org.collectionspace.services.relation.RelationsCommon;
 import org.collectionspace.services.relation.RelationsCommonList;
 import org.collectionspace.services.relation.RelationsCommonList.RelationListItem;
@@ -52,14 +54,16 @@ import org.collectionspace.services.relation.RelationsCommonList.RelationListIte
 import org.collectionspace.services.client.PersonAuthorityClient;
 import org.collectionspace.services.client.OrgAuthorityClient;
 import org.collectionspace.services.client.LocationAuthorityClient;
-import org.collectionspace.services.client.TaxonomyAuthorityClient;
 import org.collectionspace.services.client.PlaceAuthorityClient;
+import org.collectionspace.services.client.TaxonomyAuthorityClient;
 
 import org.collectionspace.services.common.document.DocumentWrapper;
+import org.collectionspace.services.config.service.ServiceBindingType;
 import org.collectionspace.services.jaxb.AbstractCommonList;
 import org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandlerImpl;
 import org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl;
 import org.collectionspace.services.relation.RelationsDocListItem;
+
 import org.nuxeo.ecm.core.api.ClientException;
 import org.nuxeo.ecm.core.api.CoreSession;
 import org.nuxeo.ecm.core.api.DocumentModel;
index 54a899aec578a3d1ee3bf30bd12e5ee657279978..841650270d338e8bd22a974fe3c9145ef863fd39 100644 (file)
@@ -8,12 +8,16 @@
     </parent>\r
     \r
     <modelVersion>4.0.0</modelVersion>\r
-    <groupId>org.collectionspace.services</groupId>\r
     <artifactId>org.collectionspace.services.report.service</artifactId>\r
     <name>services.report.service</name>\r
     <packaging>jar</packaging>       \r
 \r
     <dependencies>\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.config</artifactId>\r
+            <version>${project.version}</version>\r
+        </dependency>\r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.authority.jaxb</artifactId>\r
index 3192d519df7929fd7f1be7a920019f41de921a36..79ed1e9680f1bf91ad8ec24e02bb1cbb216cf1a0 100644 (file)
  */
 package org.collectionspace.services.report;
 
-import net.sf.jasperreports.engine.JRException;
-import net.sf.jasperreports.engine.JasperExportManager;
-import net.sf.jasperreports.engine.JasperFillManager;
-import net.sf.jasperreports.engine.JasperPrint;
-
 import org.collectionspace.services.jaxb.AbstractCommonList;
-import org.collectionspace.services.jaxb.InvocableJAXBSchema;
 import org.collectionspace.services.report.nuxeo.ReportDocumentModelHandler;
-import org.collectionspace.services.ReportJAXBSchema;
 import org.collectionspace.services.client.IQueryManager;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.client.ReportClient;
 import org.collectionspace.services.common.ResourceBase;
-import org.collectionspace.services.common.ResourceMap;
-import org.collectionspace.services.common.ServiceMain;
 import org.collectionspace.services.common.ServiceMessages;
-import org.collectionspace.services.common.config.ConfigReader;
 import org.collectionspace.services.common.context.ServiceContext;
-import org.collectionspace.services.common.document.BadRequestException;
 import org.collectionspace.services.common.document.DocumentFilter;
 import org.collectionspace.services.common.document.DocumentHandler;
-import org.collectionspace.services.common.document.DocumentNotFoundException;
-import org.collectionspace.services.common.document.DocumentWrapper;
 import org.collectionspace.services.common.invocable.Invocable;
 import org.collectionspace.services.common.invocable.InvocationContext;
-import org.collectionspace.services.common.invocable.InvocationResults;
-import org.collectionspace.services.common.invocable.Invocable.InvocationError;
 import org.collectionspace.services.common.query.QueryManager;
-import org.collectionspace.services.common.security.UnauthorizedException;
 import org.collectionspace.services.common.storage.JDBCTools;
-import org.jboss.resteasy.spi.ResteasyProviderFactory;
-import org.nuxeo.ecm.core.api.DocumentModel;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.security.auth.login.LoginException;
-import javax.sql.DataSource;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
@@ -70,16 +48,8 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.util.HashMap;
-import java.util.List;
 
 @Path(ReportClient.SERVICE_PATH)
 @Consumes("application/xml")
index da78c16dc42af57dfe1f39df49ddec7b3325e956..6e6dbf030bcffadc38d5bde77ae254612ff81945 100644 (file)
@@ -41,13 +41,10 @@ import net.sf.jasperreports.engine.JasperFillManager;
 import net.sf.jasperreports.engine.JasperPrint;
 
 import org.collectionspace.services.ReportJAXBSchema;
-import org.collectionspace.services.report.ReportResource;
 import org.collectionspace.services.report.ReportsCommon;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
-import org.collectionspace.services.common.ResourceMap;
 import org.collectionspace.services.common.ServiceMain;
-import org.collectionspace.services.common.ServiceMessages;
 import org.collectionspace.services.common.config.ConfigReader;
 import org.collectionspace.services.common.context.ServiceContext;
 import org.collectionspace.services.common.document.BadRequestException;
index ea2efeb80920d301e3d95b9bc72ec07b30dbf984..34121f4c5074a4c4b20b86fc14164ce0f913e14d 100644 (file)
@@ -26,14 +26,15 @@ import java.util.List;
 import javax.sql.DataSource;\r
 \r
 import org.collectionspace.services.common.api.Tools;\r
-import org.collectionspace.services.common.service.ServiceBindingType;\r
 import org.collectionspace.services.common.init.IInitHandler;\r
 import org.collectionspace.services.common.init.InitHandler;\r
-import org.collectionspace.services.common.service.InitHandler.Params.Field;\r
-import org.collectionspace.services.common.service.InitHandler.Params.Property;\r
 import org.collectionspace.services.common.storage.DatabaseProductType;\r
 import org.collectionspace.services.common.storage.JDBCTools;\r
 \r
+import org.collectionspace.services.config.service.InitHandler.Params.Field;\r
+import org.collectionspace.services.config.service.InitHandler.Params.Property;\r
+import org.collectionspace.services.config.service.ServiceBindingType;\r
+\r
 import org.slf4j.Logger;\r
 import org.slf4j.LoggerFactory;\r
 \r
index 1a87ab7206201145e46dc33d49152c19dbb922fa..9b8ab53eecdcdebe83b6f11dba584389af99fb55 100644 (file)
@@ -8,12 +8,16 @@
     </parent>
     
     <modelVersion>4.0.0</modelVersion>
-    <groupId>org.collectionspace.services</groupId>
     <artifactId>org.collectionspace.services.servicegroup.service</artifactId>
     <name>services.servicegroup.service</name>
     <packaging>jar</packaging>       
 
     <dependencies>
+        <dependency>
+            <groupId>org.collectionspace.services</groupId>
+            <artifactId>org.collectionspace.services.config</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.common</artifactId>
index dcd5ea3694679baa7ddfe4b49544832603b57b4b..1e26f73a3960383464d1cec437e03423d509e3ce 100644 (file)
@@ -52,8 +52,8 @@ import org.collectionspace.services.common.document.DocumentWrapper;
 import org.collectionspace.services.common.query.QueryManager;
 import org.collectionspace.services.common.repository.RepositoryClient;
 import org.collectionspace.services.common.repository.RepositoryClientFactory;
-import org.collectionspace.services.common.service.ServiceBindingType;
-import org.collectionspace.services.common.service.ServiceObjectType;
+import org.collectionspace.services.config.service.ServiceBindingType;
+import org.collectionspace.services.config.service.ServiceObjectType;
 import org.collectionspace.services.nuxeo.client.java.CommonList;
 import org.collectionspace.services.nuxeo.util.NuxeoUtils;
 import org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler;
index 207321b810d1608b2ba050d4798bada0732632ba..ed56291beb6b97c9eb81d717581f86cfcab05704 100644 (file)
@@ -54,8 +54,8 @@ import org.collectionspace.services.common.document.DocumentWrapper;
 import org.collectionspace.services.common.query.QueryManager;
 import org.collectionspace.services.common.repository.RepositoryClient;
 import org.collectionspace.services.common.security.SecurityUtils;
-import org.collectionspace.services.common.service.ServiceBindingType;
-import org.collectionspace.services.common.service.ServiceObjectType;
+import org.collectionspace.services.config.service.ServiceBindingType;
+import org.collectionspace.services.config.service.ServiceObjectType;
 import org.collectionspace.services.servicegroup.ServicegroupsCommon;
 import org.nuxeo.ecm.core.api.DocumentModel;
 import org.nuxeo.ecm.core.api.DocumentModelList;