]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-3780 including XmlReplay test of Relations in nightly run
authorLaramie Crocker <laramie@berkeley.edu>
Sun, 17 Apr 2011 05:21:04 +0000 (05:21 +0000)
committerLaramie Crocker <laramie@berkeley.edu>
Sun, 17 Apr 2011 05:21:04 +0000 (05:21 +0000)
services/IntegrationTests/src/test/resources/test-data/xmlreplay/xml-replay-master.xml
services/authority/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java
services/common/src/main/java/org/collectionspace/services/common/ResourceBase.java

index af2ff30ace4a65bd6acc4ca86bb0795e61465f6f..19568b721aad87eda083c56617ff0a8f880deca5 100755 (executable)
     <!--<run controlFile="acquisitions/acquisitions.xml" testGroup="testList" />-->\r
 \r
     <!--<run controlFile="./organization.xml" testGroup="organization" />-->\r
-\r
+    \r
+    \r
+    <!-- ============================================= -->\r
+    <!-- XmlReplay now compatible with POX payloads.\r
+         File below this line have been ported. -->\r
+    <!-- ============================================= -->\r
+    \r
+    <run controlFile="person/person.xml" testGroup="updatePerson" />\r
+    <run controlFile="relation/relation.xml" testGroup="makeRelations" />\r
+    \r
 </xmlReplayMaster>\r
 \r
index 64820ef538150df3c52b0a4d713bef7b78b8bc0c..db893dcd2ccd82b85fbcc86d2ac72e99bdd73227 100644 (file)
@@ -234,7 +234,7 @@ public abstract class AuthorityItemDocumentModelHandler<AICommon, AICommonList>
         RelationsCommonList relationsCommonListBody = (RelationsCommonList) part.getBody();
 
         ServiceContext ctx = getServiceContext();
-        MultivaluedMap queryParams = ctx.getQueryParamsPtr();
+        MultivaluedMap queryParams = ctx.getQueryParams();
        String predicate = RelationshipType.HAS_BROADER.value();
         queryParams.putSingle(IRelationsManager.PREDICATE_QP, predicate);
         queryParams.putSingle(IRelationsManager.SUBJECT_QP, null);
@@ -244,7 +244,7 @@ public abstract class AuthorityItemDocumentModelHandler<AICommon, AICommonList>
 
         RelationsCommonList childList = (new RelationResource()).getList(ctx.getUriInfo());    //magically knows all query params because they are in the context.
         for (RelationsCommonList.RelationListItem childListItem : childList.getRelationListItem()) {
-            System.out.println("    childListItem: " + childListItem);
+           // System.out.println("    childListItem: " + childListItem);
             //todo: if not found in update list, remove from system
             //todo: if update list item not found in child list, add to system.
         }
@@ -255,7 +255,7 @@ public abstract class AuthorityItemDocumentModelHandler<AICommon, AICommonList>
 
         RelationsCommonList parentList = (new RelationResource()).getList(ctx.getUriInfo());
         for (RelationsCommonList.RelationListItem parentListItem : parentList.getRelationListItem()) {
-            System.out.println("    parentListItem: " + parentListItem);
+           // System.out.println("    parentListItem: " + parentListItem);
             //todo: if num-parents > 1 then complain.
             //todo: if not found in update list, remove from system
             //todo: if update list item not found in parent list, add to system.
@@ -268,6 +268,8 @@ public abstract class AuthorityItemDocumentModelHandler<AICommon, AICommonList>
             rc.setDocumentId2(item.getObjectCsid());
             rc.setRelationshipType(item.getPredicate());
             //todo: is an enum:  rc.setPredicate(item.getPredicate());
+            rc.setDocumentType1(item.getSubject().getType());
+            rc.setDocumentType2(item.getObject().getType());
 
             PoxPayloadOut payloadOut = new PoxPayloadOut(RelationClient.SERVICE_PAYLOAD_NAME);
             PayloadOutputPart outputPart = new PayloadOutputPart(RelationClient.SERVICE_COMMONPART_NAME, rc);
index b1554cb9e9c1c6afb41ee7a065e4aec45df1f857..6027625a34635fcd4ffd71dfb520721898ae4850 100644 (file)
@@ -99,7 +99,7 @@ extends AbstractMultiPartCollectionSpaceResourceImpl {
                String xmlPayload) {\r
         try {\r
                PoxPayloadIn input = new PoxPayloadIn(xmlPayload);\r
-            System.out.println("\r\n\r\n==============================\r\nxmlPayload:\r\n"+xmlPayload);\r
+            //System.out.println("\r\n\r\n==============================\r\nxmlPayload:\r\n"+xmlPayload);\r
                ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(input);\r
             return create(input, ctx);\r
         } catch (Exception e) {\r