improve messaging for deleteResult
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / view / descriptive / operation / MoveDescriptionToOtherTaxonOperation.java
index 84146211ed2a6fa33ece6486d62908b6a143b5d2..1a04b047cc568120fd57bf35534136d4dc6fd4ea 100644 (file)
@@ -17,6 +17,8 @@ import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 
+import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.IDescriptionService;
 import eu.etaxonomy.cdm.model.common.Annotation;
@@ -89,7 +91,13 @@ public class MoveDescriptionToOtherTaxonOperation extends
                annotation.setAnnotationType(AnnotationType.TECHNICAL());
                description.addAnnotation(annotation);
                newAcceptedTaxonNode.getTaxon().addDescription(description);
-               CdmStore.getService(IDescriptionService.class).saveOrUpdate(description);
+               if (CdmApplicationState.getCurrentAppConfig() instanceof CdmApplicationRemoteController) {
+            CdmStore.getService(IDescriptionService.class).merge(description);
+        } else {
+            CdmStore.getService(IDescriptionService.class).saveOrUpdate(description);
+        }
+
+       //      CdmStore.getService(IDescriptionService.class).moveTaxonDescription(description.getUuid(), newAcceptedTaxonNode.getTaxon().getUuid());
                monitor.worked(40);
 
                return postExecute(description);