From 5a75f057a8107f1eb047909037b91ba9225bf3bd Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Wed, 2 May 2012 18:12:21 -0700 Subject: [PATCH] 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.) --- .../nuxeo/AuthorityItemDocumentModelHandler.java | 9 ++++++++- .../services/client/test/PersonAuthorityServiceTest.java | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) 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