From: Aron Roberts Date: Mon, 14 Dec 2009 21:11:28 +0000 (+0000) Subject: CSPACE-114: A basic Contact service is now integrated with the main services project... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=3f26fe506548d9bb0f15534e7fe2a99b30376e74;p=tmp%2Fjakarta-migration.git CSPACE-114: A basic Contact service is now integrated with the main services project. The service's document types must be imported via 'ant deploy' for tests to run successfully. The service currently implements only a subset of three fields of the Address Information group of the Contact Information Schema, awaiting further definition of that schema. Because contact info appears to be relevant solely in the context of Person or Organization, this service may later be restricted to use only in those contacts, and its public REST interface may be removed. --- diff --git a/services/JaxRsServiceProvider/pom.xml b/services/JaxRsServiceProvider/pom.xml index 1b3fe8dd3..c702b73e3 100644 --- a/services/JaxRsServiceProvider/pom.xml +++ b/services/JaxRsServiceProvider/pom.xml @@ -47,6 +47,11 @@ org.collectionspace.services.dimension.service 1.0 + + org.collectionspace.services + org.collectionspace.services.contact.service + 1.0 + org.collectionspace.services org.collectionspace.services.acquisition.service diff --git a/services/JaxRsServiceProvider/src/main/java/org/collectionspace/services/jaxrs/CollectionSpaceJaxRsApplication.java b/services/JaxRsServiceProvider/src/main/java/org/collectionspace/services/jaxrs/CollectionSpaceJaxRsApplication.java index b1b272696..f84d7d666 100644 --- a/services/JaxRsServiceProvider/src/main/java/org/collectionspace/services/jaxrs/CollectionSpaceJaxRsApplication.java +++ b/services/JaxRsServiceProvider/src/main/java/org/collectionspace/services/jaxrs/CollectionSpaceJaxRsApplication.java @@ -1,3 +1,26 @@ +/** + * 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 © 2009 Regents of the University of California + * + * 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.jaxrs; import org.collectionspace.services.account.AccountResource; @@ -7,6 +30,7 @@ import org.collectionspace.services.intake.IntakeResource; import org.collectionspace.services.relation.NewRelationResource; import org.collectionspace.services.acquisition.AcquisitionResource; import org.collectionspace.services.dimension.DimensionResource; +import org.collectionspace.services.contact.ContactResource; import org.collectionspace.services.vocabulary.VocabularyResource; @@ -16,6 +40,14 @@ import javax.ws.rs.core.Application; import java.util.HashSet; import java.util.Set; +/** + * CollectionSpaceJaxRsApplication, the root application + * for enumerating Resource classes in the Services Layer, + * which in turn respond to and route REST-based requests. + * + * $LastChangedRevision$ + * $LastChangedDate$ + */ public class CollectionSpaceJaxRsApplication extends Application { @@ -31,6 +63,7 @@ public class CollectionSpaceJaxRsApplication extends Application { singletons.add(new NewRelationResource()); singletons.add(new VocabularyResource()); singletons.add(new DimensionResource()); + singletons.add(new ContactResource()); // singletons.add(new QueryResource()); // singletons.add(new DomainIdentifierResource()); diff --git a/services/build.xml b/services/build.xml index e27881dc2..e36b150ba 100644 --- a/services/build.xml +++ b/services/build.xml @@ -123,6 +123,7 @@ + @@ -131,7 +132,8 @@ description="undeploy services from ${jboss.server.cspace}"> - + + diff --git a/services/common/src/main/config/tenant-bindings.xml b/services/common/src/main/config/tenant-bindings.xml index dbfee3c81..c56a3805e 100644 --- a/services/common/src/main/config/tenant-bindings.xml +++ b/services/common/src/main/config/tenant-bindings.xml @@ -2,15 +2,13 @@ - + @@ -107,9 +105,11 @@ - + nuxeo-java - + nuxeo-java - + + + + nuxeo-java + + + + + + + + + + + + + + + + - + diff --git a/services/contact/3rdparty/nuxeo-platform-cs-contact/src/main/resources/schemas/dimensions_common.xsd b/services/contact/3rdparty/nuxeo-platform-cs-contact/src/main/resources/schemas/contacts_common.xsd similarity index 100% rename from services/contact/3rdparty/nuxeo-platform-cs-contact/src/main/resources/schemas/dimensions_common.xsd rename to services/contact/3rdparty/nuxeo-platform-cs-contact/src/main/resources/schemas/contacts_common.xsd diff --git a/services/contact/service/src/main/java/org/collectionspace/services/contact/ContactResource.java b/services/contact/service/src/main/java/org/collectionspace/services/contact/ContactResource.java index 3dcd55daf..2bfca676e 100644 --- a/services/contact/service/src/main/java/org/collectionspace/services/contact/ContactResource.java +++ b/services/contact/service/src/main/java/org/collectionspace/services/contact/ContactResource.java @@ -38,9 +38,6 @@ import javax.ws.rs.core.UriBuilder; import javax.ws.rs.core.UriInfo; import org.collectionspace.services.common.AbstractCollectionSpaceResource; -import org.collectionspace.services.contact.ContactsCommonList.*; - -import org.collectionspace.services.contact.nuxeo.ContactHandlerFactory; import org.collectionspace.services.common.ClientType; import org.collectionspace.services.common.ServiceMain; import org.collectionspace.services.common.context.MultipartServiceContext; @@ -48,6 +45,9 @@ import org.collectionspace.services.common.context.MultipartServiceContextFactor import org.collectionspace.services.common.context.ServiceContext; import org.collectionspace.services.common.document.DocumentNotFoundException; import org.collectionspace.services.common.document.DocumentHandler; + +import org.collectionspace.services.contact.nuxeo.ContactHandlerFactory; + import org.jboss.resteasy.plugins.providers.multipart.MultipartInput; import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput; import org.jboss.resteasy.util.HttpResponseCodes; diff --git a/services/pom.xml b/services/pom.xml index 3f96ea312..98a2e96c7 100644 --- a/services/pom.xml +++ b/services/pom.xml @@ -16,7 +16,7 @@ authentication common - account + relation acquisition @@ -25,6 +25,7 @@ collectionobject intake dimension + contact JaxRsServiceProvider client sdk