]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
DRYD-567: Allow change to a term's short ID on PUT requests using the forceRefnameUpd...
authorRichard Millet <remillet@gmail.com>
Fri, 18 Jan 2019 19:48:37 +0000 (11:48 -0800)
committerRichard Millet <remillet@gmail.com>
Fri, 18 Jan 2019 19:48:37 +0000 (11:48 -0800)
services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java

index 1c6327f05f36e4c39c12661104ce996e52895a06..3963b8ce4d49abe6734bfe346facfed3e83ad998 100644 (file)
@@ -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<AICommon>
 
         return unQObjectProperties;
     }
-
+    
     /**
      * Filters out selected values supplied in an update request.
      * 
@@ -1229,7 +1227,9 @@ public abstract class AuthorityItemDocumentModelHandler<AICommon>
         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);
         }
     }