]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5155: Fixed compilation problem in CollectionObjectAuthRefsTest class and...
authorRichard Millet <remillet@berkeley.edu>
Tue, 8 May 2012 18:32:35 +0000 (11:32 -0700)
committerRichard Millet <remillet@berkeley.edu>
Tue, 8 May 2012 18:32:35 +0000 (11:32 -0700)
services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectAuthRefsTest.java
services/organization/client/src/main/java/org/collectionspace/services/client/OrgAuthorityClientUtils.java
services/organization/jaxb/src/main/resources/organization_common.xsd

index 9df304abc249d2bcb45533bf296ade3475da45a5..d0e2a95dd6032ce3029b31dfb5c026c256621815 100644 (file)
@@ -53,6 +53,7 @@ import org.collectionspace.services.collectionobject.FieldCollectorList;
 import org.collectionspace.services.collectionobject.TitleGroup;
 import org.collectionspace.services.collectionobject.TitleGroupList;
 import org.collectionspace.services.jaxb.AbstractCommonList;
+import org.collectionspace.services.organization.OrgTermGroup;
 import org.collectionspace.services.person.PersonTermGroup;
 
 import org.jboss.resteasy.client.ClientResponse;
@@ -344,13 +345,18 @@ public class CollectionObjectAuthRefsTest extends BaseServiceTest<AbstractCommon
      */
     protected String createOrganization(String shortName, String foundingPlace, String shortIdentifier ) {
         Map<String, String> orgInfo = new HashMap<String,String>();
-        orgInfo.put(OrganizationJAXBSchema.SHORT_NAME, shortName);
         orgInfo.put(OrganizationJAXBSchema.FOUNDING_PLACE, foundingPlace);
         orgInfo.put(OrganizationJAXBSchema.SHORT_IDENTIFIER, shortIdentifier);
+        
+        List<OrgTermGroup> orgTerms = new ArrayList<OrgTermGroup>();
+        OrgTermGroup term = new OrgTermGroup();
+        term.setTermDisplayName(shortName);
+        term.setTermName(shortName);
+        orgTerms.add(term);
+        
         OrgAuthorityClient orgAuthClient = new OrgAuthorityClient();
        PoxPayloadOut multipart =
-               OrgAuthorityClientUtils.createOrganizationInstance(
-                               orgAuthRefName, orgInfo, orgAuthClient.getItemCommonPartName());
+               OrgAuthorityClientUtils.createOrganizationInstance(orgAuthRefName, orgInfo, orgTerms, orgAuthClient.getItemCommonPartName());
         ClientResponse<Response> res = orgAuthClient.createItem(orgAuthCSID, multipart);
         int statusCode = res.getStatus();
 
index e336b542465b61fe43c2b92e5190d36df80f0b63..13e9eb5369ddd5d9fdf524b76182205972fff8a8 100644 (file)
@@ -205,15 +205,15 @@ public class OrgAuthorityClientUtils {
      * @param headerLabel the header label\r
      * @return the multipart output\r
      */\r
-    public static PoxPayloadOut createOrganizationInstance(\r
-               String orgAuthRefName, Map<String, String> orgInfo,\r
-                List<OrgTermGroup> terms, String headerLabel){\r
-            final Map<String, List<String>> EMPTY_ORG_REPEATABLES_INFO =\r
-                new HashMap<String, List<String>>();\r
-            return createOrganizationInstance(orgAuthRefName,\r
-                    orgInfo, terms, EMPTY_ORG_REPEATABLES_INFO, headerLabel);\r
-    }\r
-\r
+       public static PoxPayloadOut createOrganizationInstance(\r
+                       String orgAuthRefName,\r
+                       Map<String,     String> orgInfo,\r
+                       List<OrgTermGroup> terms,\r
+                       String headerLabel) {\r
+               final Map<String, List<String>> EMPTY_ORG_REPEATABLES_INFO = new HashMap<String, List<String>>();\r
+               return createOrganizationInstance(orgAuthRefName, orgInfo, terms,\r
+                               EMPTY_ORG_REPEATABLES_INFO, headerLabel);\r
+       }\r
 \r
     /**\r
      * Creates the organization instance.\r
index 90941ec0b96a7211c48005e903c82987ac8076f9..56752982127c4d6bbc1f53f8eae3e16ebecc3158 100644 (file)
@@ -19,6 +19,7 @@
             <xs:sequence>
                 <!--  Common identifier -->
                 <xs:element name="csid" type="xs:string" />
+                
                 <!--  Organization Information Group -->
                 <xs:element name="inAuthority" type="xs:string" />
                 <xs:element name="shortIdentifier" type="xs:string"/>