From: Aron Roberts Date: Thu, 3 May 2012 01:12:21 +0000 (-0700) Subject: CSPACE-5119,CSPACE-5135,CSPACE-5138,CSPACE-5132: Reverted name of field in lists... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=5a75f057a8107f1eb047909037b91ba9225bf3bd;p=tmp%2Fjakarta-migration.git CSPACE-5119,CSPACE-5135,CSPACE-5138,CSPACE-5132: Reverted name of field in lists of authority items to displayName from termDisplayName, for (short-term) backwards compatibility, per CSPACE-5132. (These list items will change significantly as of CSPACE-5134.) --- diff --git a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java index c440b5a09..fb58dcd1a 100644 --- a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java +++ b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java @@ -167,7 +167,14 @@ public abstract class AuthorityItemDocumentModelHandler ListResultField field; if (!hasDisplayName) { field = new ListResultField(); - field.setElement(AuthorityItemJAXBSchema.TERM_DISPLAY_NAME); + // Per CSPACE-5132, the name of this element remains 'displayName' + // for backwards compatibility, although its value is obtained + // from the termDisplayName field. + // + // In CSPACE-5134, these list results will change substantially + // to return display names for both the preferred term and for + // each non-preferred term (if any). + field.setElement(AuthorityItemJAXBSchema.DISPLAY_NAME); field.setXpath(NuxeoUtils.getPrimaryXPathPropertyName( authorityItemCommonSchemaName, getItemTermInfoGroupXPathBase(), AuthorityItemJAXBSchema.TERM_DISPLAY_NAME)); list.add(field); diff --git a/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServiceTest.java b/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServiceTest.java index a85a86160..5f234d5a8 100644 --- a/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServiceTest.java +++ b/services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServiceTest.java @@ -824,8 +824,11 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest