Revision 7b179f56
Added by Katja Luther about 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/DeleteTaxonBaseHandler.java | ||
---|---|---|
109 | 109 |
DeleteResult result = ((DeleteTaxonBaseOperation)operation).getResult(); |
110 | 110 |
if (result.isError()){ |
111 | 111 |
DeleteResultMessagingUtils.messageDialogWithDetails(result, Messages.DeleteDerivateOperation_DELETE_FAILED, TaxeditorEditorPlugin.PLUGIN_ID); |
112 |
} else { |
|
112 |
} else if (selectedElement instanceof Synonym){
|
|
113 | 113 |
this.editor.redraw(); |
114 |
if (!result.getUpdatedObjects().isEmpty()){
|
|
114 |
if (!result.getExceptions().isEmpty()){
|
|
115 | 115 |
DeleteResultMessagingUtils.messageDialogWithDetails(result, Messages.DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS, TaxeditorEditorPlugin.PLUGIN_ID); |
116 | 116 |
} |
117 |
} else if (selectedElement instanceof Taxon && !result.getExceptions().isEmpty()){ |
|
118 |
this.editor.redraw(); |
|
119 |
DeleteResultMessagingUtils.messageDialogWithDetails(result, Messages.DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS, TaxeditorEditorPlugin.PLUGIN_ID); |
|
117 | 120 |
} |
118 |
if (!result.getUpdatedObjects().isEmpty()){ |
|
119 |
DeleteResultMessagingUtils.messageDialogWithDetails(result, Messages.DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS, TaxeditorEditorPlugin.PLUGIN_ID); |
|
120 |
} |
|
121 | 121 |
|
122 | 122 |
|
123 | 123 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteMisapplicationOperation.java | ||
---|---|---|
19 | 19 |
import eu.etaxonomy.cdm.api.application.ICdmRepository; |
20 | 20 |
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled; |
21 | 21 |
import eu.etaxonomy.cdm.api.service.ITaxonService; |
22 |
import eu.etaxonomy.cdm.api.service.config.NameDeletionConfigurator; |
|
23 | 22 |
import eu.etaxonomy.cdm.api.service.config.TaxonBaseDeletionConfigurator; |
24 | 23 |
import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator; |
25 | 24 |
import eu.etaxonomy.cdm.model.reference.Reference; |
... | ... | |
86 | 85 |
controller = CdmStore.getCurrentApplicationConfiguration(); |
87 | 86 |
|
88 | 87 |
ITaxonService service = controller.getTaxonService(); |
89 |
TaxonDeletionConfigurator config = new TaxonDeletionConfigurator(); |
|
90 |
NameDeletionConfigurator nameConfig = new NameDeletionConfigurator(); |
|
91 |
nameConfig.setRemoveAllNameRelationships(true); |
|
92 |
config.setNameDeletionConfig(nameConfig); |
|
93 |
result = service.deleteTaxon(misapplication.getUuid(), config, null); |
|
88 |
|
|
89 |
result = service.deleteTaxon(misapplication.getUuid(), (TaxonDeletionConfigurator)configurator, null); |
|
94 | 90 |
monitor.worked(40); |
95 | 91 |
|
96 | 92 |
return postExecute(null); |
Also available in: Unified diff
fix #6308: fix correct deletion handling of synonyms and misapplications and the right messages when delete a synonym with not deletable name