From 9eb7f9bb3cc2394d4b0df4e8af8463a70f927233 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Fri, 11 Jan 2013 17:52:44 -0800 Subject: [PATCH] CSPACE-5564: Cleaning up some pom issues and added a new CO client method to create an instance of the CollectionObjectsCommon class. --- services/blob/client/pom.xml | 1 - services/collectionobject/client/pom.xml | 6 +----- .../services/client/CollectionObjectFactory.java | 15 ++++++++++++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/services/blob/client/pom.xml b/services/blob/client/pom.xml index 323fb8fdc..7d6ee4791 100644 --- a/services/blob/client/pom.xml +++ b/services/blob/client/pom.xml @@ -9,7 +9,6 @@ 4.0.0 - org.collectionspace.services org.collectionspace.services.blob.client services.blob.client diff --git a/services/collectionobject/client/pom.xml b/services/collectionobject/client/pom.xml index 0ce7e7617..2a532a5aa 100644 --- a/services/collectionobject/client/pom.xml +++ b/services/collectionobject/client/pom.xml @@ -55,11 +55,7 @@ org.collectionspace.services org.collectionspace.services.organization.client ${project.version} - - - org.collectionspace.services - org.collectionspace.services.person.client - ${project.version} + test diff --git a/services/collectionobject/client/src/main/java/org/collectionspace/services/client/CollectionObjectFactory.java b/services/collectionobject/client/src/main/java/org/collectionspace/services/client/CollectionObjectFactory.java index 498546f6a..2af0aa313 100644 --- a/services/collectionobject/client/src/main/java/org/collectionspace/services/client/CollectionObjectFactory.java +++ b/services/collectionobject/client/src/main/java/org/collectionspace/services/client/CollectionObjectFactory.java @@ -24,7 +24,6 @@ package org.collectionspace.services.client; -import javax.ws.rs.core.MediaType; import org.collectionspace.services.client.PayloadOutputPart; import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.collectionobject.CollectionobjectsCommon; @@ -55,6 +54,15 @@ public class CollectionObjectFactory { * @return */ + public static PoxPayloadOut createCollectionObjectInstance(String commonPartName, + CollectionobjectsCommon collectionObjectCommon) { + + PoxPayloadOut multipart = new PoxPayloadOut(getServicePathComponent()); + PayloadOutputPart commonPart = + multipart.addPart(commonPartName, collectionObjectCommon); + + return multipart; + } /** * Creates the collection object instance. * @@ -71,13 +79,14 @@ public class CollectionObjectFactory { PoxPayloadOut multipart = new PoxPayloadOut(getServicePathComponent()); PayloadOutputPart commonPart = - multipart.addPart(collectionObjectCommon, MediaType.APPLICATION_XML_TYPE); + multipart.addPart(commonPartName, collectionObjectCommon); commonPart.setLabel(commonPartName); if (conh != null) { - PayloadOutputPart nhPart = multipart.addPart(conh, MediaType.APPLICATION_XML_TYPE); + PayloadOutputPart nhPart = multipart.addPart(nhPartName, conh); nhPart.setLabel(nhPartName); } + return multipart; } -- 2.47.3