From 2c8b364d6c6e931d09fe7e255feeb74e589781a8 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Wed, 16 Feb 2011 00:05:03 +0000 Subject: [PATCH] CSPACE-3574: Merging Plain Old XML payload work into trunk. --- .../nuxeo-platform-cs-objectexit/.classpath | 12 +- .../nuxeo-platform-cs-objectexit/.project | 12 +- services/objectexit/client/.classpath | 318 ++++++++++++++++- services/objectexit/client/.project | 19 +- .../services/client/ObjectExitClient.java | 37 +- .../services/client/ObjectExitProxy.java | 16 +- .../client/test/ObjectExitAuthRefsTest.java | 40 ++- .../client/test/ObjectExitServiceTest.java | 54 +-- services/objectexit/jaxb/.classpath | 37 +- services/objectexit/jaxb/.project | 10 +- .../.settings/org.maven.ide.eclipse.prefs | 8 +- services/objectexit/service/.classpath | 321 +++++++++++++++++- services/objectexit/service/.project | 21 +- services/objectexit/service/pom.xml | 7 +- .../objectexit/ObjectExitResource.java | 15 +- 15 files changed, 784 insertions(+), 143 deletions(-) diff --git a/services/objectexit/3rdparty/nuxeo-platform-cs-objectexit/.classpath b/services/objectexit/3rdparty/nuxeo-platform-cs-objectexit/.classpath index 199bbbbdb..6fd3b8551 100644 --- a/services/objectexit/3rdparty/nuxeo-platform-cs-objectexit/.classpath +++ b/services/objectexit/3rdparty/nuxeo-platform-cs-objectexit/.classpath @@ -1,8 +1,8 @@ - - - - - + + - + + + + \ No newline at end of file diff --git a/services/objectexit/3rdparty/nuxeo-platform-cs-objectexit/.project b/services/objectexit/3rdparty/nuxeo-platform-cs-objectexit/.project index e970c860b..98ab9ab98 100644 --- a/services/objectexit/3rdparty/nuxeo-platform-cs-objectexit/.project +++ b/services/objectexit/3rdparty/nuxeo-platform-cs-objectexit/.project @@ -1,23 +1,17 @@ - org.collectionspace.services.objectexit.3rdparty.nuxeo - - - + ObjectExit Nuxeo Document Type. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. + org.eclipse.jdt.core.javabuilder - - org.maven.ide.eclipse.maven2Builder - - org.eclipse.jdt.core.javanature org.maven.ide.eclipse.maven2Nature - + \ No newline at end of file diff --git a/services/objectexit/client/.classpath b/services/objectexit/client/.classpath index 425cd1620..d4414ae7b 100644 --- a/services/objectexit/client/.classpath +++ b/services/objectexit/client/.classpath @@ -1,10 +1,312 @@ - - - - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/services/objectexit/client/.project b/services/objectexit/client/.project index eeb7f188e..fa3bf136b 100644 --- a/services/objectexit/client/.project +++ b/services/objectexit/client/.project @@ -1,23 +1,28 @@ - org.collectionspace.services.objectexit.client - + NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. + org.collectionspace.services.3rdparty.nuxeo.quote-api + org.collectionspace.services.client + org.collectionspace.services.common + org.collectionspace.services.contact.client + org.collectionspace.services.contact.jaxb + org.collectionspace.services.hyperjaxb + org.collectionspace.services.jaxb + org.collectionspace.services.objectexit.jaxb + org.collectionspace.services.person.client + org.collectionspace.services.person.jaxb org.eclipse.jdt.core.javabuilder - - org.maven.ide.eclipse.maven2Builder - - org.eclipse.jdt.core.javanature org.maven.ide.eclipse.maven2Nature - + \ No newline at end of file diff --git a/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitClient.java b/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitClient.java index 8a21594d4..21b9991dd 100644 --- a/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitClient.java +++ b/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitClient.java @@ -26,8 +26,6 @@ import org.jboss.resteasy.client.ProxyFactory; import org.jboss.resteasy.plugins.providers.RegisterBuiltin; import org.jboss.resteasy.client.ClientResponse; import org.jboss.resteasy.client.core.executors.ApacheHttpClientExecutor; -import org.jboss.resteasy.plugins.providers.multipart.MultipartInput; -import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput; import org.jboss.resteasy.spi.ResteasyProviderFactory; /** @@ -38,22 +36,25 @@ import org.jboss.resteasy.spi.ResteasyProviderFactory; * */ public class ObjectExitClient extends AbstractServiceClientImpl { - - /* (non-Javadoc) - * @see org.collectionspace.services.client.AbstractServiceClientImpl#getServicePathComponent() - */ - public String getServicePathComponent() { - return "objectexit"; //Laramie20100824 was objectexits, but label was a mismatch. - } - /** - * - */ -// private static final ObjectExitClient instance = new ObjectExitClient(); + public static final String SERVICE_NAME = "objectexit"; + public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME; + public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT; + public static final String SERVICE_PAYLOAD_NAME = SERVICE_NAME; /** * */ private ObjectExitProxy objectexitProxy; + @Override + public String getServiceName() { + return SERVICE_NAME; + } + + @Override + public String getServicePathComponent() { + return SERVICE_PATH_COMPONENT; + } + /** * * Default constructor for ObjectExitClient class. @@ -115,7 +116,7 @@ public class ObjectExitClient extends AbstractServiceClientImpl { * @return * @see org.collectionspace.services.client.ObjectExitProxy#getObjectExit(java.lang.String) */ - public ClientResponse read(String csid) { + public ClientResponse read(String csid) { return objectexitProxy.read(csid); } @@ -124,8 +125,8 @@ public class ObjectExitClient extends AbstractServiceClientImpl { * @return * */ - public ClientResponse create(MultipartOutput multipart) { - return objectexitProxy.create(multipart); + public ClientResponse create(PoxPayloadOut xmlPayload) { + return objectexitProxy.create(xmlPayload.getBytes()); } /** @@ -133,8 +134,8 @@ public class ObjectExitClient extends AbstractServiceClientImpl { * @param objectexit * @return */ - public ClientResponse update(String csid, MultipartOutput multipart) { - return objectexitProxy.update(csid, multipart); + public ClientResponse update(String csid, PoxPayloadOut xmlPayload) { + return objectexitProxy.update(csid, xmlPayload.getBytes()); } diff --git a/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitProxy.java b/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitProxy.java index 485f02fa8..05f63b437 100644 --- a/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitProxy.java +++ b/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitProxy.java @@ -13,30 +13,28 @@ import javax.ws.rs.core.Response; import org.collectionspace.services.common.authorityref.AuthorityRefList; import org.collectionspace.services.jaxb.AbstractCommonList; import org.jboss.resteasy.client.ClientResponse; -import org.jboss.resteasy.plugins.providers.multipart.MultipartInput; -import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput; /** * @version $Revision: 2108 $ */ -@Path("/objectexit/") -@Produces({"multipart/mixed"}) -@Consumes({"multipart/mixed"}) +@Path(ObjectExitClient.SERVICE_PATH + "/") +@Produces({"application/xml"}) +@Consumes({"application/xml"}) public interface ObjectExitProxy extends CollectionSpaceProxy { //(C)reate @POST - ClientResponse create(MultipartOutput multipart); + ClientResponse create(byte[] xmlPayload); //(R)ead @GET @Path("/{csid}") - ClientResponse read(@PathParam("csid") String csid); + ClientResponse read(@PathParam("csid") String csid); //(U)pdate @PUT @Path("/{csid}") - ClientResponse update(@PathParam("csid") String csid, MultipartOutput multipart); + ClientResponse update(@PathParam("csid") String csid, byte[] xmlPayload); //(D)elete @DELETE @@ -45,12 +43,10 @@ public interface ObjectExitProxy extends CollectionSpaceProxy { // List @GET - @Produces({"application/xml"}) ClientResponse readList(); // List Authority References @GET - @Produces({"application/xml"}) @Path("/{csid}/authorityrefs/") ClientResponse getAuthorityRefs(@PathParam("csid") String csid); diff --git a/services/objectexit/client/src/test/java/org/collectionspace/services/client/test/ObjectExitAuthRefsTest.java b/services/objectexit/client/src/test/java/org/collectionspace/services/client/test/ObjectExitAuthRefsTest.java index a4d6df42b..9edd7371b 100644 --- a/services/objectexit/client/src/test/java/org/collectionspace/services/client/test/ObjectExitAuthRefsTest.java +++ b/services/objectexit/client/src/test/java/org/collectionspace/services/client/test/ObjectExitAuthRefsTest.java @@ -32,17 +32,19 @@ import javax.ws.rs.core.Response; import org.collectionspace.services.PersonJAXBSchema; import org.collectionspace.services.client.CollectionSpaceClient; +import org.collectionspace.services.client.ContactClient; import org.collectionspace.services.client.ObjectExitClient; +import org.collectionspace.services.client.PayloadOutputPart; import org.collectionspace.services.client.PersonAuthorityClient; import org.collectionspace.services.client.PersonAuthorityClientUtils; +import org.collectionspace.services.client.PoxPayloadIn; +import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.common.authorityref.AuthorityRefList; import org.collectionspace.services.jaxb.AbstractCommonList; import org.collectionspace.services.objectexit.ObjectexitCommon; import org.jboss.resteasy.client.ClientResponse; -import org.jboss.resteasy.plugins.providers.multipart.MultipartInput; -import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput; import org.jboss.resteasy.plugins.providers.multipart.OutputPart; import org.testng.Assert; import org.testng.annotations.AfterClass; @@ -60,7 +62,6 @@ public class ObjectExitAuthRefsTest extends BaseServiceTest { private final String CLASS_NAME = ObjectExitAuthRefsTest.class.getName(); private final Logger logger = LoggerFactory.getLogger(CLASS_NAME); - final String SERVICE_PATH_COMPONENT = "objectexit"; final String PERSON_AUTHORITY_NAME = "ObjectexitPersonAuth"; private String knownResourceId = null; private List objectexitIdsCreated = new ArrayList(); @@ -70,6 +71,16 @@ public class ObjectExitAuthRefsTest extends BaseServiceTest { private String exitDate = null; private String exitNumber = null; + @Override + public String getServicePathComponent() { + return ObjectExitClient.SERVICE_PATH_COMPONENT; + } + + @Override + protected String getServiceName() { + return ObjectExitClient.SERVICE_NAME; + } + @Override protected CollectionSpaceClient getClientInstance() { throw new UnsupportedOperationException(); //method not supported (or needed) in this test class @@ -80,12 +91,7 @@ public class ObjectExitAuthRefsTest extends BaseServiceTest { throw new UnsupportedOperationException(); //method not supported (or needed) in this test class } - @Override - public String getServicePathComponent() { - return SERVICE_PATH_COMPONENT; - } - - private MultipartOutput createObjectExitInstance(String depositorRefName, String exitNumber, String exitDate) { + private PoxPayloadOut createObjectExitInstance(String depositorRefName, String exitNumber, String exitDate) { this.exitDate = exitDate; this.exitNumber = exitNumber; this.depositorRefName = depositorRefName; @@ -94,9 +100,9 @@ public class ObjectExitAuthRefsTest extends BaseServiceTest { objectexit.setExitNumber(exitNumber); objectexit.setExitDate(exitDate); - MultipartOutput multipart = new MultipartOutput(); - OutputPart commonPart = multipart.addPart(objectexit, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", new ObjectExitClient().getCommonPartName()); + PoxPayloadOut multipart = new PoxPayloadOut(ObjectExitClient.SERVICE_PAYLOAD_NAME); + PayloadOutputPart commonPart = multipart.addPart(objectexit, MediaType.APPLICATION_XML_TYPE); + commonPart.setLabel(new ObjectExitClient().getCommonPartName()); logger.debug("to be created, objectexit common: " + objectAsXmlString(objectexit, ObjectexitCommon.class)); return multipart; } @@ -110,7 +116,7 @@ public class ObjectExitAuthRefsTest extends BaseServiceTest { // Create a new Loans In resource. One or more fields in this resource will be PersonAuthority // references, and will refer to Person resources by their refNames. ObjectExitClient objectexitClient = new ObjectExitClient(); - MultipartOutput multipart = createObjectExitInstance(depositorRefName, "exitNumber-" + identifier, "exitDate-" + identifier); + PoxPayloadOut multipart = createObjectExitInstance(depositorRefName, "exitNumber-" + identifier, "exitDate-" + identifier); ClientResponse res = objectexitClient.create(multipart); assertStatusCode(res, testName); if (knownResourceId == null) {// Store the ID returned from the first resource created for additional tests below. @@ -122,7 +128,7 @@ public class ObjectExitAuthRefsTest extends BaseServiceTest { protected void createPersonRefs() { PersonAuthorityClient personAuthClient = new PersonAuthorityClient(); // Create a temporary PersonAuthority resource, and its corresponding refName by which it can be identified. - MultipartOutput multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance(PERSON_AUTHORITY_NAME, PERSON_AUTHORITY_NAME, personAuthClient.getCommonPartName()); + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance(PERSON_AUTHORITY_NAME, PERSON_AUTHORITY_NAME, personAuthClient.getCommonPartName()); ClientResponse res = personAuthClient.create(multipart); assertStatusCode(res, "createPersonRefs (not a surefire test)"); personAuthCSID = extractId(res); @@ -145,7 +151,7 @@ public class ObjectExitAuthRefsTest extends BaseServiceTest { personInfo.put(PersonJAXBSchema.FORE_NAME, firstName); personInfo.put(PersonJAXBSchema.SUR_NAME, surName); personInfo.put(PersonJAXBSchema.SHORT_IDENTIFIER, shortId); - MultipartOutput multipart = PersonAuthorityClientUtils.createPersonInstance(personAuthCSID, authRefName, personInfo, personAuthClient.getItemCommonPartName()); + PoxPayloadOut multipart = PersonAuthorityClientUtils.createPersonInstance(personAuthCSID, authRefName, personInfo, personAuthClient.getItemCommonPartName()); ClientResponse res = personAuthClient.createItem(personAuthCSID, multipart); assertStatusCode(res, "createPerson (not a surefire test)"); return extractId(res); @@ -156,9 +162,9 @@ public class ObjectExitAuthRefsTest extends BaseServiceTest { logger.debug(testBanner(testName, CLASS_NAME)); testSetup(STATUS_OK, ServiceRequestType.READ); ObjectExitClient objectexitClient = new ObjectExitClient(); - ClientResponse res = objectexitClient.read(knownResourceId); + ClientResponse res = objectexitClient.read(knownResourceId); assertStatusCode(res, testName); - MultipartInput input = (MultipartInput) res.getEntity(); + PoxPayloadIn input = new PoxPayloadIn(res.getEntity()); ObjectexitCommon objectexit = (ObjectexitCommon) extractPart(input, objectexitClient.getCommonPartName(), ObjectexitCommon.class); Assert.assertNotNull(objectexit); logger.debug(objectAsXmlString(objectexit, ObjectexitCommon.class)); diff --git a/services/objectexit/client/src/test/java/org/collectionspace/services/client/test/ObjectExitServiceTest.java b/services/objectexit/client/src/test/java/org/collectionspace/services/client/test/ObjectExitServiceTest.java index c20aca5cc..de4564317 100644 --- a/services/objectexit/client/src/test/java/org/collectionspace/services/client/test/ObjectExitServiceTest.java +++ b/services/objectexit/client/src/test/java/org/collectionspace/services/client/test/ObjectExitServiceTest.java @@ -27,14 +27,16 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.collectionspace.services.client.CollectionSpaceClient; +import org.collectionspace.services.client.ContactClient; import org.collectionspace.services.client.ObjectExitClient; +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.objectexit.ObjectexitCommon; import org.jboss.resteasy.client.ClientResponse; -import org.jboss.resteasy.plugins.providers.multipart.MultipartInput; -import org.jboss.resteasy.plugins.providers.multipart.MultipartOutput; import org.jboss.resteasy.plugins.providers.multipart.OutputPart; import org.testng.Assert; import org.testng.annotations.Test; @@ -54,6 +56,16 @@ public class ObjectExitServiceTest extends AbstractServiceTestImpl { final String SERVICE_PATH_COMPONENT = "objectexit"; private String knownResourceId = null; + @Override + public String getServicePathComponent() { + return ObjectExitClient.SERVICE_PATH_COMPONENT; + } + + @Override + protected String getServiceName() { + return ObjectExitClient.SERVICE_NAME; + } + @Override protected CollectionSpaceClient getClientInstance() { return new ObjectExitClient(); @@ -70,7 +82,7 @@ public class ObjectExitServiceTest extends AbstractServiceTestImpl { logger.debug(testBanner(testName, CLASS_NAME)); setupCreate(); ObjectExitClient client = new ObjectExitClient(); - MultipartOutput multipart = createObjectExitInstance(createIdentifier()); + PoxPayloadOut multipart = createObjectExitInstance(createIdentifier()); ClientResponse res = client.create(multipart); assertStatusCode(res, testName); if (knownResourceId == null) { @@ -95,9 +107,9 @@ public class ObjectExitServiceTest extends AbstractServiceTestImpl { logger.debug(testBanner(testName, CLASS_NAME)); setupRead(); ObjectExitClient client = new ObjectExitClient(); - ClientResponse res = client.read(knownResourceId); + ClientResponse res = client.read(knownResourceId); assertStatusCode(res, testName); - MultipartInput input = (MultipartInput) res.getEntity(); + PoxPayloadIn input = new PoxPayloadIn(res.getEntity()); ObjectexitCommon objectexit = (ObjectexitCommon) extractPart(input, client.getCommonPartName(), ObjectexitCommon.class); Assert.assertNotNull(objectexit); } @@ -129,21 +141,21 @@ public class ObjectExitServiceTest extends AbstractServiceTestImpl { logger.debug(testBanner(testName, CLASS_NAME)); setupUpdate(); ObjectExitClient client = new ObjectExitClient(); - ClientResponse res = client.read(knownResourceId); + ClientResponse res = client.read(knownResourceId); assertStatusCode(res, testName); logger.debug("got object to update with ID: " + knownResourceId); - MultipartInput input = (MultipartInput) res.getEntity(); + PoxPayloadIn input = new PoxPayloadIn(res.getEntity()); ObjectexitCommon objectexit = (ObjectexitCommon) extractPart(input, client.getCommonPartName(), ObjectexitCommon.class); Assert.assertNotNull(objectexit); objectexit.setExitNumber("updated-" + objectexit.getExitNumber()); logger.debug("Object to be updated:"+objectAsXmlString(objectexit, ObjectexitCommon.class)); - MultipartOutput output = new MultipartOutput(); - OutputPart commonPart = output.addPart(objectexit, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", client.getCommonPartName()); + PoxPayloadOut output = new PoxPayloadOut(ObjectExitClient.SERVICE_PAYLOAD_NAME); + PayloadOutputPart commonPart = output.addPart(objectexit, MediaType.APPLICATION_XML_TYPE); + commonPart.setLabel(client.getCommonPartName()); res = client.update(knownResourceId, output); assertStatusCode(res, testName); - input = (MultipartInput) res.getEntity(); + input = new PoxPayloadIn(res.getEntity()); ObjectexitCommon updatedObjectExit = (ObjectexitCommon) extractPart(input, client.getCommonPartName(), ObjectexitCommon.class); Assert.assertNotNull(updatedObjectExit); } @@ -157,8 +169,8 @@ public class ObjectExitServiceTest extends AbstractServiceTestImpl { // Note: The ID used in this 'create' call may be arbitrary. // The only relevant ID may be the one used in update(), below. ObjectExitClient client = new ObjectExitClient(); - MultipartOutput multipart = createObjectExitInstance(NON_EXISTENT_ID); - ClientResponse res = client.update(NON_EXISTENT_ID, multipart); + PoxPayloadOut multipart = createObjectExitInstance(NON_EXISTENT_ID); + ClientResponse res = client.update(NON_EXISTENT_ID, multipart); assertStatusCode(res, testName); } @@ -183,7 +195,7 @@ public class ObjectExitServiceTest extends AbstractServiceTestImpl { logger.debug(testBanner(testName, CLASS_NAME)); setupReadNonExistent(); ObjectExitClient client = new ObjectExitClient(); - ClientResponse res = client.read(NON_EXISTENT_ID); + ClientResponse res = client.read(NON_EXISTENT_ID); assertStatusCode(res, testName); } @@ -242,20 +254,14 @@ public class ObjectExitServiceTest extends AbstractServiceTestImpl { // --------------------------------------------------------------- // Utility methods used by tests above // --------------------------------------------------------------- - - @Override - public String getServicePathComponent() { - return SERVICE_PATH_COMPONENT; - } - - private MultipartOutput createObjectExitInstance(String exitNumber) { + private PoxPayloadOut createObjectExitInstance(String exitNumber) { String identifier = "objectexitNumber-" + exitNumber; ObjectexitCommon objectexit = new ObjectexitCommon(); objectexit.setExitNumber(identifier); objectexit.setDepositor("urn:cspace:org.collectionspace.demo:orgauthority:name(TestOrgAuth):organization:name(Northern Climes Museum)'Northern Climes Museum'"); - MultipartOutput multipart = new MultipartOutput(); - OutputPart commonPart = multipart.addPart(objectexit, MediaType.APPLICATION_XML_TYPE); - commonPart.getHeaders().add("label", new ObjectExitClient().getCommonPartName()); + PoxPayloadOut multipart = new PoxPayloadOut(ObjectExitClient.SERVICE_PAYLOAD_NAME); + PayloadOutputPart commonPart = multipart.addPart(objectexit, MediaType.APPLICATION_XML_TYPE); + commonPart.setLabel(new ObjectExitClient().getCommonPartName()); if (logger.isDebugEnabled()) { logger.debug("to be created, objectexit common"); diff --git a/services/objectexit/jaxb/.classpath b/services/objectexit/jaxb/.classpath index 557f8a4e0..981c9add6 100644 --- a/services/objectexit/jaxb/.classpath +++ b/services/objectexit/jaxb/.classpath @@ -1,10 +1,31 @@ - - - - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/services/objectexit/jaxb/.project b/services/objectexit/jaxb/.project index 5c5aa24f2..9bbb9f3d5 100644 --- a/services/objectexit/jaxb/.project +++ b/services/objectexit/jaxb/.project @@ -1,23 +1,19 @@ - org.collectionspace.services.objectexit.jaxb - + NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. + org.collectionspace.services.jaxb org.eclipse.jdt.core.javabuilder - - org.maven.ide.eclipse.maven2Builder - - org.eclipse.jdt.core.javanature org.maven.ide.eclipse.maven2Nature - + \ No newline at end of file diff --git a/services/objectexit/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/objectexit/jaxb/.settings/org.maven.ide.eclipse.prefs index 67ae1645e..c9f07df5d 100644 --- a/services/objectexit/jaxb/.settings/org.maven.ide.eclipse.prefs +++ b/services/objectexit/jaxb/.settings/org.maven.ide.eclipse.prefs @@ -1,9 +1,9 @@ -#Tue Dec 21 10:04:27 PST 2010 +#Wed Jan 19 22:49:45 PST 2011 activeProfiles= eclipse.preferences.version=1 -fullBuildGoals=process-classes +fullBuildGoals=process-test-resources includeModules=false resolveWorkspaceProjects=true -resourceFilterGoals=process-classes -skipCompilerPlugin=false +resourceFilterGoals=process-resources resources\:testResources +skipCompilerPlugin=true version=1 diff --git a/services/objectexit/service/.classpath b/services/objectexit/service/.classpath index 425cd1620..740f9dd26 100644 --- a/services/objectexit/service/.classpath +++ b/services/objectexit/service/.classpath @@ -1,10 +1,315 @@ - - - - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/services/objectexit/service/.project b/services/objectexit/service/.project index a39e1854a..87d73e2b9 100644 --- a/services/objectexit/service/.project +++ b/services/objectexit/service/.project @@ -1,23 +1,30 @@ - org.collectionspace.services.objectexit.service - + NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. + org.collectionspace.services.3rdparty.nuxeo.quote-api + org.collectionspace.services.client + org.collectionspace.services.collectionobject.jaxb + org.collectionspace.services.common + org.collectionspace.services.contact.client + org.collectionspace.services.contact.jaxb + org.collectionspace.services.hyperjaxb + org.collectionspace.services.jaxb + org.collectionspace.services.objectexit.client + org.collectionspace.services.objectexit.jaxb + org.collectionspace.services.person.client + org.collectionspace.services.person.jaxb org.eclipse.jdt.core.javabuilder - - org.maven.ide.eclipse.maven2Builder - - org.eclipse.jdt.core.javanature org.maven.ide.eclipse.maven2Nature - + \ No newline at end of file diff --git a/services/objectexit/service/pom.xml b/services/objectexit/service/pom.xml index 204c2bcc0..34eb9dd13 100644 --- a/services/objectexit/service/pom.xml +++ b/services/objectexit/service/pom.xml @@ -19,6 +19,11 @@ org.collectionspace.services.common ${project.version} + + org.collectionspace.services + org.collectionspace.services.objectexit.client + ${project.version} + org.collectionspace.services org.collectionspace.services.objectexit.jaxb @@ -26,7 +31,7 @@ org.collectionspace.services - org.collectionspace.services.collectionobject.jaxb + org.collectionspace.services.collectionobject.jaxb ${project.version} diff --git a/services/objectexit/service/src/main/java/org/collectionspace/services/objectexit/ObjectExitResource.java b/services/objectexit/service/src/main/java/org/collectionspace/services/objectexit/ObjectExitResource.java index 113a9e5e5..3027f33ff 100644 --- a/services/objectexit/service/src/main/java/org/collectionspace/services/objectexit/ObjectExitResource.java +++ b/services/objectexit/service/src/main/java/org/collectionspace/services/objectexit/ObjectExitResource.java @@ -23,25 +23,22 @@ */ package org.collectionspace.services.objectexit; +import org.collectionspace.services.client.ObjectExitClient; import org.collectionspace.services.common.ResourceBase; -import org.collectionspace.services.common.ClientType; -import org.collectionspace.services.common.ServiceMain; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; -import javax.ws.rs.core.MultivaluedMap; -import java.util.List; -@Path("/objectexit") -@Consumes("multipart/mixed") -@Produces("multipart/mixed") +@Path(ObjectExitClient.SERVICE_PATH) +@Produces({"application/xml"}) +@Consumes({"application/xml"}) public class ObjectExitResource extends ResourceBase { @Override public String getServiceName(){ - return "objectexit"; - }; + return ObjectExitClient.SERVICE_NAME; + } @Override protected String getVersionString() { -- 2.47.3