From: Ray Lee Date: Thu, 25 Jul 2019 18:36:44 +0000 (-0700) Subject: DRYD-617: Add osteology procedure. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=46b003de54bd39693e7b2c546a28b6dba3f43130;p=tmp%2Fjakarta-migration.git DRYD-617: Add osteology procedure. --- diff --git a/services/JaxRsServiceProvider/pom.xml b/services/JaxRsServiceProvider/pom.xml index cc6274ad5..bdc59aeb0 100644 --- a/services/JaxRsServiceProvider/pom.xml +++ b/services/JaxRsServiceProvider/pom.xml @@ -257,6 +257,11 @@ org.collectionspace.services.exhibition.service ${project.version} + + org.collectionspace.services + org.collectionspace.services.osteology.service + ${project.version} + org.collectionspace.services org.collectionspace.services.conditioncheck.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 2b9115943..842f17a3d 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 @@ -60,6 +60,7 @@ import org.collectionspace.services.person.PersonAuthorityResource; import org.collectionspace.services.citation.CitationAuthorityResource; import org.collectionspace.services.claim.ClaimResource; import org.collectionspace.services.exhibition.ExhibitionResource; +import org.collectionspace.services.osteology.OsteologyResource; import org.collectionspace.services.conditioncheck.ConditioncheckResource; import org.collectionspace.services.conservation.ConservationResource; import org.collectionspace.services.authorization.PermissionResource; @@ -74,7 +75,7 @@ import java.util.Set; //import org.collectionspace.services.common.FileUtils; import org.collectionspace.services.authorization.RoleResource; -import org.collectionspace.services.common.NuxeoBasedResource; +import org.collectionspace.services.common.NuxeoBasedResource; import org.collectionspace.services.common.ResourceMap; import org.collectionspace.services.common.ResourceMapHolder; import org.collectionspace.services.common.ResourceMapImpl; @@ -94,16 +95,16 @@ public class CollectionSpaceJaxRsApplication extends Application implements ResourceMapHolder { private Set singletons = new HashSet(); - private Set> empty = new HashSet>(); + private Set> empty = new HashSet>(); private ResourceMap resourceMap = new ResourceMapImpl(); private ServletContext servletContext = null; - public CollectionSpaceJaxRsApplication() { + public CollectionSpaceJaxRsApplication() { // // Instantiate all our JaxRS resources // singletons.add(new SecurityInterceptor()); - + singletons.add(new AccountResource()); singletons.add(new TenantResource()); singletons.add(new RoleResource()); @@ -134,9 +135,10 @@ public class CollectionSpaceJaxRsApplication extends Application addResourceToMapAndSingletons(new LoaninResource()); addResourceToMapAndSingletons(new LoanoutResource()); addResourceToMapAndSingletons(new ExhibitionResource()); + addResourceToMapAndSingletons(new OsteologyResource()); addResourceToMapAndSingletons(new ConditioncheckResource()); addResourceToMapAndSingletons(new ConservationResource()); - addResourceToMapAndSingletons(new UocResource()); + addResourceToMapAndSingletons(new UocResource()); addResourceToMapAndSingletons(new ValuationcontrolResource()); addResourceToMapAndSingletons(new ObjectExitResource()); addResourceToMapAndSingletons(new BatchResource()); @@ -150,19 +152,19 @@ public class CollectionSpaceJaxRsApplication extends Application addResourceToMapAndSingletons(new PublicItemResource()); singletons.add(new IDResource()); - + /* singletons.add(new WorkflowResource()); */ // singletons.add(new DomainIdentifierResource()); // singletons.add(new PingResource()); } - + private void addResourceToMapAndSingletons(NuxeoBasedResource resource) { singletons.add(resource); resourceMap.put(resource.getServiceName(), resource); } - + @Override public Set> getClasses() { return empty; @@ -177,14 +179,13 @@ public class CollectionSpaceJaxRsApplication extends Application public ResourceMap getResourceMap() { return resourceMap; } - + public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } - + public ServletContext getServletContext() { return this.servletContext; } } - diff --git a/services/build.xml b/services/build.xml index bddaaedd6..38d71e2b3 100644 --- a/services/build.xml +++ b/services/build.xml @@ -173,6 +173,7 @@ + @@ -222,6 +223,7 @@ + @@ -283,6 +285,7 @@ + @@ -324,9 +327,9 @@ ---> +--> - + @@ -335,7 +338,7 @@ - diff --git a/services/osteology/3rdparty/build.xml b/services/osteology/3rdparty/build.xml new file mode 100644 index 000000000..7226cec27 --- /dev/null +++ b/services/osteology/3rdparty/build.xml @@ -0,0 +1,130 @@ + + + osteology service 3rdparty + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/services/osteology/3rdparty/nuxeo-platform-cs-osteology/build.xml b/services/osteology/3rdparty/nuxeo-platform-cs-osteology/build.xml new file mode 100644 index 000000000..d2fb47238 --- /dev/null +++ b/services/osteology/3rdparty/nuxeo-platform-cs-osteology/build.xml @@ -0,0 +1,161 @@ + + + + osteology nuxeo document type + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/services/osteology/3rdparty/nuxeo-platform-cs-osteology/pom.xml b/services/osteology/3rdparty/nuxeo-platform-cs-osteology/pom.xml new file mode 100644 index 000000000..3d66e286b --- /dev/null +++ b/services/osteology/3rdparty/nuxeo-platform-cs-osteology/pom.xml @@ -0,0 +1,54 @@ + + + + org.collectionspace.services + org.collectionspace.services.osteology.3rdparty + 5.2-SNAPSHOT + + + 4.0.0 + org.collectionspace.services.osteology.3rdparty.nuxeo + services.osteology.3rdparty.nuxeo + jar + + Osteology Nuxeo Document Type + + + + osteology + Osteology + osteology_common + cs_default + + + + + + src/main/resources + true + + + ../../../../3rdparty/nuxeo/nuxeo-doctype/src/main/resources + true + + + + + org.apache.maven.plugins + maven-jar-plugin + + + target/classes/META-INF/MANIFEST.MF + + ${eclipseVersion} + 2 + + + + + + + + diff --git a/services/osteology/3rdparty/nuxeo-platform-cs-osteology/src/main/resources/OSGI-INF/README.txt b/services/osteology/3rdparty/nuxeo-platform-cs-osteology/src/main/resources/OSGI-INF/README.txt new file mode 100644 index 000000000..5f304de86 --- /dev/null +++ b/services/osteology/3rdparty/nuxeo-platform-cs-osteology/src/main/resources/OSGI-INF/README.txt @@ -0,0 +1,16 @@ +Files formerly located in this directory are no longer needed +------------------------------------------------------------- + +In CollectionSpace versions 4.0 and higher, changes were introduced +which streamline and simplify the process through which you configure +fields in CollectionSpace's main record types. + +In most cases now, you will typically change the behavior of existing fields, +or create extension schemas to add new fields specific to your museum and/or +community of practice, merely by editing simpler XML-based configuration +files within CollectionSpace's Application layer. + +Services layer files that were formerly located in this directory and +other, similar directories - which you previously needed to manually +create or edit - are now generated automatically from your configuration +in the Application layer. diff --git a/services/osteology/3rdparty/nuxeo-platform-cs-osteology/src/main/resources/schemas/README.txt b/services/osteology/3rdparty/nuxeo-platform-cs-osteology/src/main/resources/schemas/README.txt new file mode 100644 index 000000000..5f304de86 --- /dev/null +++ b/services/osteology/3rdparty/nuxeo-platform-cs-osteology/src/main/resources/schemas/README.txt @@ -0,0 +1,16 @@ +Files formerly located in this directory are no longer needed +------------------------------------------------------------- + +In CollectionSpace versions 4.0 and higher, changes were introduced +which streamline and simplify the process through which you configure +fields in CollectionSpace's main record types. + +In most cases now, you will typically change the behavior of existing fields, +or create extension schemas to add new fields specific to your museum and/or +community of practice, merely by editing simpler XML-based configuration +files within CollectionSpace's Application layer. + +Services layer files that were formerly located in this directory and +other, similar directories - which you previously needed to manually +create or edit - are now generated automatically from your configuration +in the Application layer. diff --git a/services/osteology/3rdparty/pom.xml b/services/osteology/3rdparty/pom.xml new file mode 100644 index 000000000..11428960b --- /dev/null +++ b/services/osteology/3rdparty/pom.xml @@ -0,0 +1,24 @@ + + + org.collectionspace.services.osteology + org.collectionspace.services + 5.2-SNAPSHOT + + + 4.0.0 + org.collectionspace.services.osteology.3rdparty + services.osteology.3rdparty + pom + + + 3rd party build for osteology service + + + + + + diff --git a/services/osteology/build.xml b/services/osteology/build.xml new file mode 100644 index 000000000..565f2bf84 --- /dev/null +++ b/services/osteology/build.xml @@ -0,0 +1,124 @@ + + + + osteology service + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/services/osteology/client/pom.xml b/services/osteology/client/pom.xml new file mode 100644 index 000000000..ab2614843 --- /dev/null +++ b/services/osteology/client/pom.xml @@ -0,0 +1,92 @@ + + + + org.collectionspace.services + org.collectionspace.services.osteology + 5.2-SNAPSHOT + + + 4.0.0 + org.collectionspace.services.osteology.client + services.osteology.client + + + + + org.slf4j + slf4j-api + test + + + org.slf4j + slf4j-log4j12 + test + + + + org.collectionspace.services + org.collectionspace.services.authority.jaxb + true + ${project.version} + + + org.collectionspace.services + org.collectionspace.services.jaxb + ${project.version} + + + org.collectionspace.services + org.collectionspace.services.common + true + + + org.collectionspace.services + org.collectionspace.services.client + ${project.version} + + + org.collectionspace.services + org.collectionspace.services.osteology.jaxb + ${project.version} + + + org.collectionspace.services + org.collectionspace.services.person.client + ${project.version} + + + + org.testng + testng + + + org.jboss.resteasy + resteasy-jaxrs + + + + tjws + webserver + + + + + org.jboss.resteasy + resteasy-jaxb-provider + + + org.jboss.resteasy + resteasy-multipart-provider + + + commons-httpclient + commons-httpclient + + + + + collectionspace-services-osteology-client + + diff --git a/services/osteology/client/src/main/java/org/collectionspace/services/client/OsteologyClient.java b/services/osteology/client/src/main/java/org/collectionspace/services/client/OsteologyClient.java new file mode 100644 index 000000000..202c733f5 --- /dev/null +++ b/services/osteology/client/src/main/java/org/collectionspace/services/client/OsteologyClient.java @@ -0,0 +1,55 @@ +/** + * 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 (c) 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 + */ +package org.collectionspace.services.client; + +import org.collectionspace.services.osteology.OsteologyCommon; + +/** + * OsteologyClient.java + */ +public class OsteologyClient extends AbstractCommonListPoxServiceClientImpl { + + public static final String SERVICE_NAME = "osteology"; + public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME; + public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT; + public static final String SERVICE_PATH_PROXY = SERVICE_PATH + "/"; + public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME; + + public OsteologyClient() throws Exception { + super(); + } + + public OsteologyClient(String clientPropertiesFilename) throws Exception { + super(clientPropertiesFilename); + } + + @Override + public String getServicePathComponent() { + return SERVICE_PATH_COMPONENT; + } + + @Override + public String getServiceName() { + return SERVICE_NAME; + } + + @Override + public Class getProxyClass() { + return OsteologyProxy.class; + } + +} diff --git a/services/osteology/client/src/main/java/org/collectionspace/services/client/OsteologyProxy.java b/services/osteology/client/src/main/java/org/collectionspace/services/client/OsteologyProxy.java new file mode 100644 index 000000000..9405d0f46 --- /dev/null +++ b/services/osteology/client/src/main/java/org/collectionspace/services/client/OsteologyProxy.java @@ -0,0 +1,30 @@ +/** + * This document is a part of the source code and related artifacts + * for CollectionSpace, an open source collections management system + * for museums and related institutions: + * + * http://www.collectionspace.org + * http://wiki.collectionspace.org + * + * Copyright (c) 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 + */ +package org.collectionspace.services.client; + +import javax.ws.rs.Consumes; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; + +/** + * OsteologyProxy.java + */ +@Path(OsteologyClient.SERVICE_PATH_PROXY) +@Produces({"application/xml"}) +@Consumes({"application/xml"}) +public interface OsteologyProxy extends CollectionSpaceCommonListPoxProxy { +} diff --git a/services/osteology/client/src/test/java/org/collectionspace/services/client/test/OsteologyServiceTest.java b/services/osteology/client/src/test/java/org/collectionspace/services/client/test/OsteologyServiceTest.java new file mode 100644 index 000000000..f71acb0cb --- /dev/null +++ b/services/osteology/client/src/test/java/org/collectionspace/services/client/test/OsteologyServiceTest.java @@ -0,0 +1,683 @@ +/** + * 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.client.test; + +//import java.util.ArrayList; +import java.util.List; +import javax.ws.rs.core.Response; + +import org.collectionspace.services.client.AbstractCommonListUtils; +import org.collectionspace.services.client.CollectionSpaceClient; +import org.collectionspace.services.client.OsteologyClient; +import org.collectionspace.services.client.PayloadInputPart; +import org.collectionspace.services.client.PayloadOutputPart; +import org.collectionspace.services.client.PoxPayloadIn; +import org.collectionspace.services.client.PoxPayloadOut; +import org.collectionspace.services.jaxb.AbstractCommonList; +import org.collectionspace.services.osteology.OsteologyCommon; + +import org.testng.Assert; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * OsteologyServiceTest, carries out tests against a + * deployed and running Osteology Service. + */ +public class OsteologyServiceTest extends AbstractPoxServiceTestImpl { + + /** The logger. */ + private final String CLASS_NAME = OsteologyServiceTest.class.getName(); + private final Logger logger = LoggerFactory.getLogger(CLASS_NAME); + // Instance variables specific to this test. + /** The service path component. */ + final String SERVICE_NAME = "osteology"; + final String SERVICE_PATH_COMPONENT = "osteology"; + + /* (non-Javadoc) + * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance() + */ + @Override + protected CollectionSpaceClient getClientInstance() throws Exception { + return new OsteologyClient(); + } + + @Override + protected CollectionSpaceClient getClientInstance(String clientPropertiesFilename) throws Exception { + return new OsteologyClient(clientPropertiesFilename); + } + + /* (non-Javadoc) + * @see org.collectionspace.services.client.test.BaseServiceTest#getAbstractCommonList(org.jboss.resteasy.client.ClientResponse) + */ + @Override + protected AbstractCommonList getCommonList(Response response) { + return response.readEntity(AbstractCommonList.class); + } + + // --------------------------------------------------------------- + // CRUD tests : CREATE tests + // --------------------------------------------------------------- + + // Success outcomes + + /* (non-Javadoc) + * @see org.collectionspace.services.client.test.ServiceTest#create(java.lang.String) + */ + @Override + // @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class) + public void create(String testName) throws Exception { + // Perform setup, such as initializing the type of service request + // (e.g. CREATE, DELETE), its valid and expected status codes, and + // its associated HTTP method name (e.g. POST, DELETE). + setupCreate(); + + // Submit the request to the service and store the response. + OsteologyClient client = new OsteologyClient(); + String identifier = createIdentifier(); + PoxPayloadOut multipart = createOsteologyInstance(identifier); + String newID = null; + Response res = client.create(multipart); + try { + int statusCode = res.getStatus(); + + // Check the status code of the response: does it match + // the expected response(s)? + // + // Specifically: + // Does it fall within the set of valid status codes? + // Does it exactly match the expected status code? + if (logger.isDebugEnabled()) { + logger.debug(testName + ": status = " + statusCode); + } + Assert.assertTrue(testRequestType.isValidStatusCode(statusCode), + invalidStatusCodeMessage(testRequestType, statusCode)); + Assert.assertEquals(statusCode, testExpectedStatusCode); + + newID = extractId(res); + } finally { + res.close(); + } + + // Store the ID returned from the first resource created + // for additional tests below. + if (knownResourceId == null) { + knownResourceId = newID; + if (logger.isDebugEnabled()) { + logger.debug(testName + ": knownResourceId=" + knownResourceId); + } + } + + // Store the IDs from every resource created by tests, + // so they can be deleted after tests have been run. + allResourceIdsCreated.add(newID); + } + + /* (non-Javadoc) + * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createList(java.lang.String) + */ + @Override + // @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class, + // dependsOnMethods = {"create"}) + public void createList(String testName) throws Exception { + for (int i = 0; i < 3; i++) { + create(testName); + } + } + + + /* + @Override + @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class, + dependsOnMethods = {"create", "testSubmitRequest"}) + public void createWithEmptyEntityBody(String testName) throws Exception { + + if (logger.isDebugEnabled()) { + logger.debug(testBanner(testName, CLASS_NAME)); + } + // Perform setup. + setupCreateWithEmptyEntityBody(); + + // Submit the request to the service and store the response. + String method = REQUEST_TYPE.httpMethodName(); + String url = getServiceRootURL(); + String mediaType = MediaType.APPLICATION_XML; + final String entity = ""; + int statusCode = submitRequest(method, url, mediaType, entity); + + // Check the status code of the response: does it match + // the expected response(s)? + if(logger.isDebugEnabled()){ + logger.debug("createWithEmptyEntityBody url=" + url + + " status=" + statusCode); + } + Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode), + invalidStatusCodeMessage(REQUEST_TYPE, statusCode)); + Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); + } + + @Override + @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class, + dependsOnMethods = {"create", "testSubmitRequest"}) + public void createWithMalformedXml(String testName) throws Exception { + + if (logger.isDebugEnabled()) { + logger.debug(testBanner(testName, CLASS_NAME)); + } + // Perform setup. + setupCreateWithMalformedXml(testName, logger); + + // Submit the request to the service and store the response. + String method = REQUEST_TYPE.httpMethodName(); + String url = getServiceRootURL(); + String mediaType = MediaType.APPLICATION_XML; + final String entity = MALFORMED_XML_DATA; // Constant from base class. + int statusCode = submitRequest(method, url, mediaType, entity); + + // Check the status code of the response: does it match + // the expected response(s)? + if(logger.isDebugEnabled()){ + logger.debug(testName + ": url=" + url + + " status=" + statusCode); + } + Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode), + invalidStatusCodeMessage(REQUEST_TYPE, statusCode)); + Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); + } + + @Override + @Test(dataProvider="testName", dataProviderClass=AbstractServiceTest.class, + dependsOnMethods = {"create", "testSubmitRequest"}) + public void createWithWrongXmlSchema(String testName) throws Exception { + + if (logger.isDebugEnabled()) { + logger.debug(testBanner(testName, CLASS_NAME)); + } + // Perform setup. + setupCreateWithWrongXmlSchema(testName, logger); + + // Submit the request to the service and store the response. + String method = REQUEST_TYPE.httpMethodName(); + String url = getServiceRootURL(); + String mediaType = MediaType.APPLICATION_XML; + final String entity = WRONG_XML_SCHEMA_DATA; + int statusCode = submitRequest(method, url, mediaType, entity); + + // Check the status code of the response: does it match + // the expected response(s)? + if(logger.isDebugEnabled()){ + logger.debug(testName + ": url=" + url + + " status=" + statusCode); + } + Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode), + invalidStatusCodeMessage(REQUEST_TYPE, statusCode)); + Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE); + } + */ + + // --------------------------------------------------------------- + // CRUD tests : READ tests + // --------------------------------------------------------------- + + // Success outcomes + + /* (non-Javadoc) + * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#read(java.lang.String) + */ + @Override + // @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class, + // dependsOnMethods = {"create"}) + public void read(String testName) throws Exception { + // Perform setup. + setupRead(); + + // Submit the request to the service and store the response. + OsteologyClient client = new OsteologyClient(); + Response res = client.read(knownResourceId); + PoxPayloadIn input = null; + try { + assertStatusCode(res, testName); + input = new PoxPayloadIn(res.readEntity(String.class)); + } finally { + if (res != null) { + res.close(); + } + } + + // Get the common part of the response and verify that it is not null. + PayloadInputPart payloadInputPart = input.getPart(client.getCommonPartName()); + OsteologyCommon osteologyCommon = null; + if (payloadInputPart != null) { + osteologyCommon = (OsteologyCommon) payloadInputPart.getBody(); + } + Assert.assertNotNull(osteologyCommon); + + // Check selected fields. + + // Check the values of fields containing Unicode UTF-8 (non-Latin-1) characters. + String note = osteologyCommon.getNotesOnElementInventory(); + + if (logger.isDebugEnabled()) { + logger.debug("UTF-8 data sent=" + getUTF8DataFragment() + "\n" + + "UTF-8 data received=" + note); + } + + Assert.assertEquals(note, getUTF8DataFragment(), + "UTF-8 data retrieved '" + note + + "' does not match expected data '" + getUTF8DataFragment()); + } + + // Failure outcomes + + /* (non-Javadoc) + * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readNonExistent(java.lang.String) + */ + @Override + // @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class, + // dependsOnMethods = {"read"}) + public void readNonExistent(String testName) throws Exception { + // Perform setup. + setupReadNonExistent(); + + // Submit the request to the service and store the response. + OsteologyClient client = new OsteologyClient(); + Response res = client.read(NON_EXISTENT_ID); + try { + int statusCode = res.getStatus(); + + // Check the status code of the response: does it match + // the expected response(s)? + if (logger.isDebugEnabled()) { + logger.debug(testName + ": status = " + statusCode); + } + Assert.assertTrue(testRequestType.isValidStatusCode(statusCode), + invalidStatusCodeMessage(testRequestType, statusCode)); + Assert.assertEquals(statusCode, testExpectedStatusCode); + } finally { + res.close(); + } + } + + // --------------------------------------------------------------- + // CRUD tests : READ_LIST tests + // --------------------------------------------------------------- + + // Success outcomes + + /* (non-Javadoc) + * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readList(java.lang.String) + */ + @Override + // @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class, + // dependsOnMethods = {"createList", "read"}) + public void readList(String testName) throws Exception { + // Perform setup. + setupReadList(); + + // Submit the request to the service and store the response. + AbstractCommonList list = null; + OsteologyClient client = new OsteologyClient(); + Response res = client.readList(); + try { + assertStatusCode(res, testName); + int statusCode = res.getStatus(); + + // Check the status code of the response: does it match + // the expected response(s)? + if (logger.isDebugEnabled()) { + logger.debug(testName + ": status = " + statusCode); + } + Assert.assertTrue(testRequestType.isValidStatusCode(statusCode), + invalidStatusCodeMessage(testRequestType, statusCode)); + Assert.assertEquals(statusCode, testExpectedStatusCode); + + list = res.readEntity(getCommonListType()); + } finally { + if (res != null) { + res.close(); + } + } + + // Optionally output additional data about list members for debugging. + boolean iterateThroughList = true; + if(iterateThroughList && logger.isDebugEnabled()){ + AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName); + } + + } + + // Failure outcomes + // None at present. + + // --------------------------------------------------------------- + // CRUD tests : UPDATE tests + // --------------------------------------------------------------- + + // Success outcomes + + /* (non-Javadoc) + * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#update(java.lang.String) + */ + @Override + // @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class, + // dependsOnMethods = {"read"}) + public void update(String testName) throws Exception { + // Perform setup. + setupRead(); + + // Retrieve the contents of a resource to update. + OsteologyClient client = new OsteologyClient(); + Response res = client.read(knownResourceId); + PoxPayloadIn input = null; + try { + assertStatusCode(res, testName); + input = new PoxPayloadIn(res.readEntity(String.class)); + if (logger.isDebugEnabled()) { + logger.debug("got object to update with ID: " + knownResourceId); + } + } finally { + if (res != null) { + res.close(); + } + } + + // Extract the common part from the response. + PayloadInputPart payloadInputPart = input.getPart(client.getCommonPartName()); + OsteologyCommon osteologyCommon = null; + if (payloadInputPart != null) { + osteologyCommon = (OsteologyCommon) payloadInputPart.getBody(); + } + Assert.assertNotNull(osteologyCommon); + + // Update the content of this resource. + osteologyCommon.setInventoryID("updated-" + osteologyCommon.getInventoryID()); + + String note = osteologyCommon.getNotesOnElementInventory(); + osteologyCommon.setNotesOnElementInventory("updated-note-" + note); + + if (logger.isDebugEnabled()) { + logger.debug("to be updated object"); + logger.debug(objectAsXmlString(osteologyCommon, OsteologyCommon.class)); + } + + setupUpdate(); + + // Submit the updated common part in an update request to the service + // and store the response. + PoxPayloadOut output = new PoxPayloadOut(this.getServicePathComponent()); + PayloadOutputPart commonPart = output.addPart(client.getCommonPartName(), osteologyCommon); + res = client.update(knownResourceId, output); + try { + assertStatusCode(res, testName); + int statusCode = res.getStatus(); + // Check the status code of the response: does it match the expected response(s)? + if (logger.isDebugEnabled()) { + logger.debug(testName + ": status = " + statusCode); + } + Assert.assertTrue(testRequestType.isValidStatusCode(statusCode), + invalidStatusCodeMessage(testRequestType, statusCode)); + Assert.assertEquals(statusCode, testExpectedStatusCode); + input = new PoxPayloadIn(res.readEntity(String.class)); + } finally { + if (res != null) { + res.close(); + } + } + + // Extract the updated common part from the response. + payloadInputPart = input.getPart(client.getCommonPartName()); + OsteologyCommon updatedOsteologyCommon = null; + if (payloadInputPart != null) { + updatedOsteologyCommon = (OsteologyCommon) payloadInputPart.getBody(); + } + Assert.assertNotNull(updatedOsteologyCommon); + + // Check selected fields in the updated common part. + Assert.assertEquals(updatedOsteologyCommon.getInventoryID(), + osteologyCommon.getInventoryID(), + "Data in updated object did not match submitted data."); + + // Check the values of fields containing Unicode UTF-8 (non-Latin-1) characters. + String originalNote = osteologyCommon.getNotesOnElementInventory(); + String updatedNote = updatedOsteologyCommon.getNotesOnElementInventory(); + + Assert.assertEquals(updatedNote, originalNote, + "Data in updated object did not match submitted data."); + + if(logger.isDebugEnabled()){ + logger.debug("UTF-8 data sent=" + originalNote + "\n" + + "UTF-8 data received=" + updatedNote); + } + Assert.assertTrue(updatedNote.contains(getUTF8DataFragment()), + "UTF-8 data retrieved '" + updatedNote + + "' does not match expected data '" + getUTF8DataFragment()); + } + + @Override + // @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class, + // dependsOnMethods = {"update", "testSubmitRequest"}) + public void updateNonExistent(String testName) throws Exception { + // Perform setup. + setupUpdateNonExistent(); + + // Submit the request to the service and store the response. + // Note: The ID used in this 'create' call may be arbitrary. + // The only relevant ID may be the one used in update(), below. + OsteologyClient client = new OsteologyClient(); + PoxPayloadOut multipart = createOsteologyInstance(NON_EXISTENT_ID); + Response res = client.update(NON_EXISTENT_ID, multipart); + try { + int statusCode = res.getStatus(); + + // Check the status code of the response: does it match + // the expected response(s)? + if (logger.isDebugEnabled()) { + logger.debug(testName + ": status = " + statusCode); + } + Assert.assertTrue(testRequestType.isValidStatusCode(statusCode), + invalidStatusCodeMessage(testRequestType, statusCode)); + Assert.assertEquals(statusCode, testExpectedStatusCode); + } finally { + res.close(); + } + } + + // --------------------------------------------------------------- + // CRUD tests : DELETE tests + // --------------------------------------------------------------- + + // Success outcomes + + /* (non-Javadoc) + * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#delete(java.lang.String) + */ + @Override + // @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class, + // dependsOnMethods = {"create", "readList", "testSubmitRequest", "update"}) + public void delete(String testName) throws Exception { + // Perform setup. + setupDelete(); + + // Submit the request to the service and store the response. + OsteologyClient client = new OsteologyClient(); + Response res = client.delete(knownResourceId); + try { + int statusCode = res.getStatus(); + + // Check the status code of the response: does it match + // the expected response(s)? + if (logger.isDebugEnabled()) { + logger.debug(testName + ": status = " + statusCode); + } + Assert.assertTrue(testRequestType.isValidStatusCode(statusCode), + invalidStatusCodeMessage(testRequestType, statusCode)); + Assert.assertEquals(statusCode, testExpectedStatusCode); + } finally { + res.close(); + } + } + + // Failure outcomes + + /* (non-Javadoc) + * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#deleteNonExistent(java.lang.String) + */ + @Override + // @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class, + // dependsOnMethods = {"delete"}) + public void deleteNonExistent(String testName) throws Exception { + // Perform setup. + setupDeleteNonExistent(); + + // Submit the request to the service and store the response. + OsteologyClient client = new OsteologyClient(); + Response res = client.delete(NON_EXISTENT_ID); + try { + int statusCode = res.getStatus(); + + // Check the status code of the response: does it match + // the expected response(s)? + if (logger.isDebugEnabled()) { + logger.debug(testName + ": status = " + statusCode); + } + Assert.assertTrue(testRequestType.isValidStatusCode(statusCode), + invalidStatusCodeMessage(testRequestType, statusCode)); + Assert.assertEquals(statusCode, testExpectedStatusCode); + } finally { + res.close(); + } + } + + // --------------------------------------------------------------- + // Utility tests : tests of code used in tests above + // --------------------------------------------------------------- + + /** + * Tests the code for manually submitting data that is used by several + * of the methods above. + */ + // @Test(dependsOnMethods = {"create", "read"}) + public void testSubmitRequest() { + + // Expected status code: 200 OK + final int EXPECTED_STATUS = Response.Status.OK.getStatusCode(); + + // Submit the request to the service and store the response. + String method = ServiceRequestType.READ.httpMethodName(); + String url = getResourceURL(knownResourceId); + int statusCode = submitRequest(method, url); + + // Check the status code of the response: does it match + // the expected response(s)? + if (logger.isDebugEnabled()) { + logger.debug("testSubmitRequest: url=" + url + + " status=" + statusCode); + } + Assert.assertEquals(statusCode, EXPECTED_STATUS); + + } + + // --------------------------------------------------------------- + // Utility methods used by tests above + // --------------------------------------------------------------- + + @Override + public String getServiceName() { + return SERVICE_NAME; + } + + /* (non-Javadoc) + * @see org.collectionspace.services.client.test.BaseServiceTest#getServicePathComponent() + */ + @Override + public String getServicePathComponent() { + return SERVICE_PATH_COMPONENT; + } + + @Override + protected PoxPayloadOut createInstance(String identifier) throws Exception { + return createOsteologyInstance(identifier); + } + + /** + * Creates the osteology instance. + * + * @param identifier the identifier + * @return the multipart output + */ + //private PoxPayloadOut createOsteologyInstance(String identifier) { + // return createOsteologyInstance("osteologyNumber-" + identifier); + //} + + /** + * Creates the osteology instance. + * + * @param osteologyNumber the osteology number + * @return the multipart output + * @throws Exception + */ + private PoxPayloadOut createOsteologyInstance(String osteologyNumber) throws Exception { + + OsteologyCommon osteologyCommon = new OsteologyCommon(); + osteologyCommon.setInventoryID(osteologyNumber); + osteologyCommon.setNotesOnElementInventory(getUTF8DataFragment()); + + PoxPayloadOut multipart = new PoxPayloadOut(this.getServicePathComponent()); + PayloadOutputPart commonPart = + multipart.addPart(new OsteologyClient().getCommonPartName(), osteologyCommon); + + if (logger.isDebugEnabled()) { + logger.debug("to be created, osteology common"); + logger.debug(objectAsXmlString(osteologyCommon, OsteologyCommon.class)); + } + + return multipart; + } + + @Override + public void CRUDTests(String testName) { + // TODO Auto-generated method stub + + } + + @Override + protected PoxPayloadOut createInstance(String commonPartName, + String identifier) throws Exception { + PoxPayloadOut result = createOsteologyInstance(identifier); + return result; + } + + @Override + protected OsteologyCommon updateInstance(OsteologyCommon commonPartObject) { + // TODO Auto-generated method stub + return null; + } + + @Override + protected void compareUpdatedInstances(OsteologyCommon original, + OsteologyCommon updated) throws Exception { + // TODO Auto-generated method stub + + } +} diff --git a/services/osteology/client/src/test/resources/log4j.properties b/services/osteology/client/src/test/resources/log4j.properties new file mode 100644 index 000000000..148a3e865 --- /dev/null +++ b/services/osteology/client/src/test/resources/log4j.properties @@ -0,0 +1,23 @@ +log4j.rootLogger=debug, stdout, R + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout + +# Pattern to output the caller's file name and line number. +log4j.appender.stdout.layout.ConversionPattern=%d %-5p [%t] [%c:%L] %m%n + +log4j.appender.R=org.apache.log4j.RollingFileAppender +log4j.appender.R.File=target/test-client.log + +log4j.appender.R.MaxFileSize=100KB +# Keep one backup file +log4j.appender.R.MaxBackupIndex=1 + +log4j.appender.R.layout=org.apache.log4j.PatternLayout +log4j.appender.R.layout.ConversionPattern=%d %-5p [%t] [%c:%L] %m%n + +#packages +log4j.logger.org.collectionspace=DEBUG +log4j.logger.org.apache=INFO +log4j.logger.httpclient=INFO +log4j.logger.org.jboss.resteasy=INFO diff --git a/services/osteology/jaxb/pom.xml b/services/osteology/jaxb/pom.xml new file mode 100644 index 000000000..7fbc3cdd3 --- /dev/null +++ b/services/osteology/jaxb/pom.xml @@ -0,0 +1,33 @@ + + + + org.collectionspace.services.osteology + org.collectionspace.services + 5.2-SNAPSHOT + + + 4.0.0 + org.collectionspace.services.osteology.jaxb + services.osteology.jaxb + + + + org.collectionspace.services + org.collectionspace.services.jaxb + ${project.version} + + + + + collectionspace-services-osteology-jaxb + install + + + org.jvnet.jaxb2.maven2 + maven-jaxb2-plugin + + + + diff --git a/services/osteology/jaxb/src/main/java/org/collectionspace/services/OsteologyJAXBSchema.java b/services/osteology/jaxb/src/main/java/org/collectionspace/services/OsteologyJAXBSchema.java new file mode 100644 index 000000000..3a220658c --- /dev/null +++ b/services/osteology/jaxb/src/main/java/org/collectionspace/services/OsteologyJAXBSchema.java @@ -0,0 +1,8 @@ +/** + * + */ +package org.collectionspace.services; + +public interface OsteologyJAXBSchema { + final static String OSTEOLOGY_NUMBER = "osteologyNumber"; +} diff --git a/services/osteology/jaxb/src/main/java/org/collectionspace/services/OsteologyListItemJAXBSchema.java b/services/osteology/jaxb/src/main/java/org/collectionspace/services/OsteologyListItemJAXBSchema.java new file mode 100644 index 000000000..9f6311bc6 --- /dev/null +++ b/services/osteology/jaxb/src/main/java/org/collectionspace/services/OsteologyListItemJAXBSchema.java @@ -0,0 +1,7 @@ +package org.collectionspace.services; + +public interface OsteologyListItemJAXBSchema { + final static String OSTEOLOGY_NUMBER = "osteologyNumber"; + final static String CSID = "csid"; + final static String URI = "url"; +} diff --git a/services/osteology/jaxb/src/main/resources/osteology-common.xsd b/services/osteology/jaxb/src/main/resources/osteology-common.xsd new file mode 100644 index 000000000..5f6ca87d8 --- /dev/null +++ b/services/osteology/jaxb/src/main/resources/osteology-common.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + diff --git a/services/osteology/pom.xml b/services/osteology/pom.xml new file mode 100644 index 000000000..5635b39da --- /dev/null +++ b/services/osteology/pom.xml @@ -0,0 +1,22 @@ + + + + + org.collectionspace.services + org.collectionspace.services.main + 5.2-SNAPSHOT + + + 4.0.0 + org.collectionspace.services.osteology + services.osteology + pom + + + jaxb + service + 3rdparty + client + + + diff --git a/services/osteology/service/pom.xml b/services/osteology/service/pom.xml new file mode 100644 index 000000000..90f0cf0ac --- /dev/null +++ b/services/osteology/service/pom.xml @@ -0,0 +1,94 @@ + + + + + org.collectionspace.services + org.collectionspace.services.osteology + 5.2-SNAPSHOT + + + 4.0.0 + org.collectionspace.services.osteology.service + services.osteology.service + jar + + + + org.collectionspace.services + org.collectionspace.services.common + + + org.collectionspace.services + org.collectionspace.services.osteology.jaxb + ${project.version} + + + org.collectionspace.services + org.collectionspace.services.osteology.client + ${project.version} + + + org.collectionspace.services + org.collectionspace.services.collectionobject.jaxb + ${project.version} + + + + junit + junit + test + + + org.testng + testng + + + + + + javax.security + jaas + 1.0.01 + provided + + + + + + org.jboss.resteasy + resteasy-jaxrs + + + tjws + webserver + + + + + org.jboss.resteasy + resteasy-jaxb-provider + + + org.jboss.resteasy + resteasy-multipart-provider + + + + + + org.nuxeo.ecm.core + nuxeo-core-api + + + jboss-remoting + jboss + + + + + + + + collectionspace-services-osteology + + diff --git a/services/osteology/service/src/main/java/org/collectionspace/services/osteology/OsteologyResource.java b/services/osteology/service/src/main/java/org/collectionspace/services/osteology/OsteologyResource.java new file mode 100644 index 000000000..fe19d4bb6 --- /dev/null +++ b/services/osteology/service/src/main/java/org/collectionspace/services/osteology/OsteologyResource.java @@ -0,0 +1,58 @@ +/** + * 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 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.osteology; + +import org.collectionspace.services.client.OsteologyClient; +import org.collectionspace.services.common.NuxeoBasedResource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.ws.rs.Consumes; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; + +@Path(OsteologyClient.SERVICE_PATH) +@Consumes("application/xml") +@Produces("application/xml") +public class OsteologyResource extends NuxeoBasedResource { + + final Logger logger = LoggerFactory.getLogger(OsteologyResource.class); + + @Override + protected String getVersionString() { + final String lastChangeRevision = "$LastChangedRevision$"; + return lastChangeRevision; + } + + @Override + public String getServiceName() { + return OsteologyClient.SERVICE_NAME; + } + + @Override + public Class getCommonPartClass() { + return OsteologyCommon.class; + } +} + diff --git a/services/osteology/service/src/main/java/org/collectionspace/services/osteology/nuxeo/OsteologyConstants.java b/services/osteology/service/src/main/java/org/collectionspace/services/osteology/nuxeo/OsteologyConstants.java new file mode 100644 index 000000000..f742599ec --- /dev/null +++ b/services/osteology/service/src/main/java/org/collectionspace/services/osteology/nuxeo/OsteologyConstants.java @@ -0,0 +1,35 @@ +/** + * 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 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.osteology.nuxeo; + +/** + * OsteologyConstants specifies constants for the Osteology service + * + */ +public class OsteologyConstants { + + public final static String NUXEO_DOCTYPE = "Osteology"; + public final static String NUXEO_SCHEMA_NAME = "osteology"; + public final static String NUXEO_DC_TITLE = "CollectionSpace-Osteology"; +} diff --git a/services/osteology/service/src/main/java/org/collectionspace/services/osteology/nuxeo/OsteologyDocumentModelHandler.java b/services/osteology/service/src/main/java/org/collectionspace/services/osteology/nuxeo/OsteologyDocumentModelHandler.java new file mode 100644 index 000000000..021a9cebb --- /dev/null +++ b/services/osteology/service/src/main/java/org/collectionspace/services/osteology/nuxeo/OsteologyDocumentModelHandler.java @@ -0,0 +1,33 @@ +/** + * 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 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.osteology.nuxeo; + +import org.collectionspace.services.osteology.OsteologyCommon; +import org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler; + +/** OsteologyDocumentModelHandler + */ +public class OsteologyDocumentModelHandler + extends NuxeoDocumentModelHandler { +} diff --git a/services/osteology/service/src/main/java/org/collectionspace/services/osteology/nuxeo/OsteologyValidatorHandler.java b/services/osteology/service/src/main/java/org/collectionspace/services/osteology/nuxeo/OsteologyValidatorHandler.java new file mode 100644 index 000000000..5ca867e91 --- /dev/null +++ b/services/osteology/service/src/main/java/org/collectionspace/services/osteology/nuxeo/OsteologyValidatorHandler.java @@ -0,0 +1,18 @@ +package org.collectionspace.services.osteology.nuxeo; + +import org.collectionspace.services.common.context.ServiceContext; +import org.collectionspace.services.common.document.InvalidDocumentException; +import org.collectionspace.services.common.document.ValidatorHandler; +import org.collectionspace.services.common.document.DocumentHandler.Action; + +public class OsteologyValidatorHandler implements ValidatorHandler { + + @Override + public void validate(Action action, ServiceContext ctx) + throws InvalidDocumentException { + // TODO Auto-generated method stub + System.out.println("OsteologyValidatorHandler executed."); + + } + +} diff --git a/services/osteology/service/src/test/java/org/collectionspace/services/test/OsteologyServiceTest.java b/services/osteology/service/src/test/java/org/collectionspace/services/test/OsteologyServiceTest.java new file mode 100644 index 000000000..3a0a8afda --- /dev/null +++ b/services/osteology/service/src/test/java/org/collectionspace/services/test/OsteologyServiceTest.java @@ -0,0 +1,11 @@ +package org.collectionspace.services.test; + +//import org.collectionspace.services.osteology.Osteology; +//import org.collectionspace.services.osteology.OsteologyList; + +/** + * Placeholder for server-side testing of Osteology service code. + */ +public class OsteologyServiceTest { + //empty +} diff --git a/services/osteology/service/src/test/resources/log4j.xml b/services/osteology/service/src/test/resources/log4j.xml new file mode 100644 index 000000000..3869b526d --- /dev/null +++ b/services/osteology/service/src/test/resources/log4j.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/services/pom.xml b/services/pom.xml index a6ede44a5..3172cdd55 100644 --- a/services/pom.xml +++ b/services/pom.xml @@ -68,6 +68,7 @@ loanout claim exhibition + osteology conditioncheck conservation valuationcontrol