From: Richard Millet Date: Tue, 8 May 2012 18:32:35 +0000 (-0700) Subject: CSPACE-5155: Fixed compilation problem in CollectionObjectAuthRefsTest class and... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=a76dc87ea6834b0a73466b85d205c1996853e90e;p=tmp%2Fjakarta-migration.git CSPACE-5155: Fixed compilation problem in CollectionObjectAuthRefsTest class and updated it to use a term list as well. --- diff --git a/services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectAuthRefsTest.java b/services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectAuthRefsTest.java index 9df304abc..d0e2a95dd 100644 --- a/services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectAuthRefsTest.java +++ b/services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectAuthRefsTest.java @@ -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 orgInfo = new HashMap(); - orgInfo.put(OrganizationJAXBSchema.SHORT_NAME, shortName); orgInfo.put(OrganizationJAXBSchema.FOUNDING_PLACE, foundingPlace); orgInfo.put(OrganizationJAXBSchema.SHORT_IDENTIFIER, shortIdentifier); + + List orgTerms = new ArrayList(); + 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 res = orgAuthClient.createItem(orgAuthCSID, multipart); int statusCode = res.getStatus(); diff --git a/services/organization/client/src/main/java/org/collectionspace/services/client/OrgAuthorityClientUtils.java b/services/organization/client/src/main/java/org/collectionspace/services/client/OrgAuthorityClientUtils.java index e336b5424..13e9eb536 100644 --- a/services/organization/client/src/main/java/org/collectionspace/services/client/OrgAuthorityClientUtils.java +++ b/services/organization/client/src/main/java/org/collectionspace/services/client/OrgAuthorityClientUtils.java @@ -205,15 +205,15 @@ public class OrgAuthorityClientUtils { * @param headerLabel the header label * @return the multipart output */ - public static PoxPayloadOut createOrganizationInstance( - String orgAuthRefName, Map orgInfo, - List terms, String headerLabel){ - final Map> EMPTY_ORG_REPEATABLES_INFO = - new HashMap>(); - return createOrganizationInstance(orgAuthRefName, - orgInfo, terms, EMPTY_ORG_REPEATABLES_INFO, headerLabel); - } - + public static PoxPayloadOut createOrganizationInstance( + String orgAuthRefName, + Map orgInfo, + List terms, + String headerLabel) { + final Map> EMPTY_ORG_REPEATABLES_INFO = new HashMap>(); + return createOrganizationInstance(orgAuthRefName, orgInfo, terms, + EMPTY_ORG_REPEATABLES_INFO, headerLabel); + } /** * Creates the organization instance. diff --git a/services/organization/jaxb/src/main/resources/organization_common.xsd b/services/organization/jaxb/src/main/resources/organization_common.xsd index 90941ec0b..567529821 100644 --- a/services/organization/jaxb/src/main/resources/organization_common.xsd +++ b/services/organization/jaxb/src/main/resources/organization_common.xsd @@ -19,6 +19,7 @@ +