From: Aron Roberts Date: Thu, 8 Jul 2010 03:43:26 +0000 (+0000) Subject: CSPACE-1692,CSPACE-2330: OrgAuthorityClientUtils.createOrgAuthorityInstance() now... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=693f1ef117bf2ef95c6c389c2f727fefe91b218e;p=tmp%2Fjakarta-migration.git CSPACE-1692,CSPACE-2330: OrgAuthorityClientUtils.createOrgAuthorityInstance() now correctly sets refName for OrgAuthority. --- 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 1459ae28b..4f7411fb5 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 @@ -90,7 +90,8 @@ public class OrgAuthorityClientUtils { } /** - * @param csid the id of the PersonAuthority + * @param inAuthority the ID of the parent OrgAuthority + * @param csid the ID of the Organization * @param client if null, creates a new client * @return */ @@ -136,6 +137,7 @@ public class OrgAuthorityClientUtils { orgAuthority.setDisplayName(displayName); orgAuthority.setShortIdentifier(shortIdentifier); String refName = createOrgAuthRefName(shortIdentifier, displayName); + orgAuthority.setRefName(refName); orgAuthority.setVocabType("OrgAuthority"); MultipartOutput multipart = new MultipartOutput(); OutputPart commonPart = multipart.addPart(orgAuthority, MediaType.APPLICATION_XML_TYPE); diff --git a/services/organization/client/src/test/java/org/collectionspace/services/client/test/OrgAuthorityServiceTest.java b/services/organization/client/src/test/java/org/collectionspace/services/client/test/OrgAuthorityServiceTest.java index d6527eb5f..ad5942210 100644 --- a/services/organization/client/src/test/java/org/collectionspace/services/client/test/OrgAuthorityServiceTest.java +++ b/services/organization/client/src/test/java/org/collectionspace/services/client/test/OrgAuthorityServiceTest.java @@ -508,7 +508,7 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl { @Test(dataProvider="testName", dataProviderClass=AbstractServiceTestImpl.class, groups = {"read"}, dependsOnGroups = {"create"}) public void readByName(String testName) throws Exception { - readInternal(testName, null, knownResourceShortIdentifer); + readInternal(testName, null, knownResourceShortIdentifer); } protected void readInternal(String testName, String CSID, String shortId) {