]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5564: Cleaning up some pom issues and added a new CO client method to create...
authorRichard Millet <remillet@berkeley.edu>
Sat, 12 Jan 2013 01:52:44 +0000 (17:52 -0800)
committerRichard Millet <remillet@berkeley.edu>
Sat, 12 Jan 2013 01:52:44 +0000 (17:52 -0800)
services/blob/client/pom.xml
services/collectionobject/client/pom.xml
services/collectionobject/client/src/main/java/org/collectionspace/services/client/CollectionObjectFactory.java

index 323fb8fdcf817be018195ad8a5e7605668eb6d4a..7d6ee47918617fc89d7d3f6d327376289d6991c7 100644 (file)
@@ -9,7 +9,6 @@
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
-    <groupId>org.collectionspace.services</groupId>
     <artifactId>org.collectionspace.services.blob.client</artifactId>
     <name>services.blob.client</name>
     
index 0ce7e76178ed8d3ca74c36322d06a2bf58560f94..2a532a5aa1031a0c913ffc1198974bee55391331 100644 (file)
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.organization.client</artifactId>\r
             <version>${project.version}</version>\r
-        </dependency>\r
-        <dependency>\r
-            <groupId>org.collectionspace.services</groupId>\r
-            <artifactId>org.collectionspace.services.person.client</artifactId>\r
-            <version>${project.version}</version>\r
+            <scope>test</scope>\r
         </dependency>\r
         <!-- External dependencies -->\r
         <dependency>\r
index 498546f6a6499bbe1f83ef902dbde4034c056c41..2af0aa313b8603c8beb3c2de2a59ecbd62636706 100644 (file)
@@ -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;
     }