From: Richard Millet Date: Fri, 18 Jan 2019 19:48:37 +0000 (-0800) Subject: DRYD-567: Allow change to a term's short ID on PUT requests using the forceRefnameUpd... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=e7b4f44db013480cd26712fc346780df3cb16f35;p=tmp%2Fjakarta-migration.git DRYD-567: Allow change to a term's short ID on PUT requests using the forceRefnameUpdates query param. --- 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 1c6327f05..3963b8ce4 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 @@ -30,8 +30,6 @@ import org.collectionspace.services.client.PoxPayloadIn; import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.client.RelationClient; import org.collectionspace.services.client.workflow.WorkflowClient; -import org.collectionspace.services.common.ServiceMain; -import org.collectionspace.services.common.UriTemplateRegistry; import org.collectionspace.services.common.api.RefName; import org.collectionspace.services.common.api.Tools; import org.collectionspace.services.common.authorityref.AuthorityRefDocList; @@ -1211,7 +1209,7 @@ public abstract class AuthorityItemDocumentModelHandler return unQObjectProperties; } - + /** * Filters out selected values supplied in an update request. * @@ -1229,7 +1227,9 @@ public abstract class AuthorityItemDocumentModelHandler if (partMeta.getLabel().equalsIgnoreCase(commonPartLabel)) { objectProps.remove(AuthorityItemJAXBSchema.IN_AUTHORITY); objectProps.remove(AuthorityItemJAXBSchema.CSID); - objectProps.remove(AuthorityJAXBSchema.SHORT_IDENTIFIER); + if (getServiceContext().shouldForceUpdateRefnameReferences() == false) { + objectProps.remove(AuthorityJAXBSchema.SHORT_IDENTIFIER); + } objectProps.remove(AuthorityItemJAXBSchema.REF_NAME); } }