From a3acd053393c0b827b370dc89aea701d42e8f297 Mon Sep 17 00:00:00 2001 From: Patrick Schmitz Date: Tue, 13 Dec 2011 03:48:45 +0000 Subject: [PATCH] CSPACE-4629 displayName change propagation was not working for termList items. Also, at least one case (loanout status), the term was not configured. There are probably more cases of missing termRef configuration. Filing that as a separate bug. --- .../nuxeo/AuthorityItemDocumentModelHandler.java | 8 +++++--- .../config/services/tenants/tenant-bindings-proto.xml | 5 +---- .../nuxeo/VocabularyItemDocumentModelHandler.java | 6 ++++++ 3 files changed, 12 insertions(+), 7 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 2b449d651..a4365e1e7 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 @@ -260,6 +260,10 @@ public abstract class AuthorityItemDocumentModelHandler docModel.setProperty(authorityItemCommonSchemaName, AuthorityItemJAXBSchema.REF_NAME, updatedRefName); return updatedRefName; } + + protected String getRefPropName() { + return ServiceBindingUtils.AUTH_REF_PROP; + } /** * Checks to see if the refName has changed, and if so, @@ -276,9 +280,7 @@ public abstract class AuthorityItemDocumentModelHandler } ServiceContext ctx = getServiceContext(); RepositoryClient repoClient = getRepositoryClient(ctx); - // FIXME HACK - this should be defined for each handler, as with - // AuthorityResource.getRefPropName() - String refNameProp = ServiceBindingUtils.AUTH_REF_PROP; + String refNameProp = getRefPropName(); int nUpdated = RefNameServiceUtils.updateAuthorityRefDocs(ctx, repoClient, this.getRepositorySession(), oldRefNameOnUpdate, newRefNameOnUpdate, refNameProp); diff --git a/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml b/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml index b3cef545f..19218d77b 100644 --- a/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml +++ b/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml @@ -922,13 +922,10 @@ termRef loanPurpose - - diff --git a/services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/nuxeo/VocabularyItemDocumentModelHandler.java b/services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/nuxeo/VocabularyItemDocumentModelHandler.java index 66e04b602..c941ce5c5 100644 --- a/services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/nuxeo/VocabularyItemDocumentModelHandler.java +++ b/services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/nuxeo/VocabularyItemDocumentModelHandler.java @@ -24,6 +24,7 @@ package org.collectionspace.services.vocabulary.nuxeo; import org.collectionspace.services.client.VocabularyClient; +import org.collectionspace.services.common.context.ServiceBindingUtils; import org.collectionspace.services.common.vocabulary.nuxeo.AuthorityItemDocumentModelHandler; import org.collectionspace.services.vocabulary.VocabularyitemsCommon; @@ -47,6 +48,11 @@ public class VocabularyItemDocumentModelHandler return VocabularyClient.SERVICE_PATH_COMPONENT; // CSPACE-3932 } + @Override + protected String getRefPropName() { + return ServiceBindingUtils.TERM_REF_PROP; + } + /** * getQProperty converts the given property to qualified schema property * @param prop -- 2.47.3