Revision b162c633
Added by Katja Luther about 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteMisapplicationOperation.java | ||
---|---|---|
14 | 14 |
import org.eclipse.core.runtime.IAdaptable; |
15 | 15 |
import org.eclipse.core.runtime.IProgressMonitor; |
16 | 16 |
import org.eclipse.core.runtime.IStatus; |
17 |
import org.eclipse.ui.IWorkbenchPage; |
|
17 | 18 |
|
18 | 19 |
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration; |
20 |
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled; |
|
19 | 21 |
import eu.etaxonomy.cdm.api.service.ITaxonService; |
20 | 22 |
import eu.etaxonomy.cdm.api.service.config.NameDeletionConfigurator; |
23 |
import eu.etaxonomy.cdm.api.service.config.TaxonBaseDeletionConfigurator; |
|
21 | 24 |
import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator; |
22 | 25 |
import eu.etaxonomy.cdm.model.reference.Reference; |
23 | 26 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
24 | 27 |
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType; |
25 |
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation; |
|
26 | 28 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
29 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled; |
|
27 | 30 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
28 | 31 |
|
29 | 32 |
/** |
... | ... | |
32 | 35 |
* @author p.ciardelli |
33 | 36 |
* @created 16.01.2009 |
34 | 37 |
*/ |
35 |
public class DeleteMisapplicationOperation extends AbstractPostTaxonOperation {
|
|
38 |
public class DeleteMisapplicationOperation extends DeleteTaxonBaseOperation {
|
|
36 | 39 |
|
37 | 40 |
private final Taxon misapplication; |
38 | 41 |
|
... | ... | |
49 | 52 |
* @param misapplication a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object. |
50 | 53 |
* @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object. |
51 | 54 |
*/ |
52 |
public DeleteMisapplicationOperation(String label, IUndoContext undoContext, |
|
53 |
Taxon taxon, Taxon misapplication, IPostOperationEnabled postOperationEnabled) {
|
|
54 |
super(label, undoContext, taxon, postOperationEnabled); |
|
55 |
|
|
55 |
public DeleteMisapplicationOperation(String label, IUndoContext undoContext, TaxonBaseDeletionConfigurator configurator,IWorkbenchPage activePage,
|
|
56 |
Taxon taxon, Taxon misapplication, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled,ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
|
|
57 |
//super(label, undoContext, taxon, postOperationEnabled);
|
|
58 |
super(label, undoContext, configurator, activePage, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled); |
|
56 | 59 |
this.misapplication = misapplication; |
60 |
this.element = taxon; |
|
57 | 61 |
} |
58 | 62 |
|
59 | 63 |
/* (non-Javadoc) |
... | ... | |
86 | 90 |
NameDeletionConfigurator nameConfig = new NameDeletionConfigurator(); |
87 | 91 |
nameConfig.setRemoveAllNameRelationships(true); |
88 | 92 |
config.setNameDeletionConfig(nameConfig); |
89 |
service.deleteTaxon(misapplication.getUuid(), config, null); |
|
93 |
result = service.deleteTaxon(misapplication.getUuid(), config, null);
|
|
90 | 94 |
monitor.worked(40); |
91 | 95 |
|
92 | 96 |
return postExecute(null); |
... | ... | |
106 | 110 |
|
107 | 111 |
element.addMisappliedName(misapplication, citation, microcitation); |
108 | 112 |
|
113 |
|
|
109 | 114 |
return postExecute(misapplication); |
110 | 115 |
} |
111 | 116 |
} |
Also available in: Unified diff
changes in misapplicationDeletionOperation