Project

General

Profile

Download (1.81 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2018 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.taxeditor.termtree.e4.operation;
10

    
11
import java.util.UUID;
12

    
13
import org.eclipse.core.commands.ExecutionException;
14
import org.eclipse.core.runtime.IAdaptable;
15
import org.eclipse.core.runtime.IProgressMonitor;
16
import org.eclipse.core.runtime.IStatus;
17

    
18
import eu.etaxonomy.cdm.api.service.ITermTreeService;
19
import eu.etaxonomy.cdm.model.term.TermTree;
20
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
21
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
22
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
23
import eu.etaxonomy.taxeditor.store.CdmStore;
24
import eu.etaxonomy.taxeditor.store.StoreUtil;
25

    
26
/**
27
 * @author pplitzner
28
 * @since Apr 30, 2018
29
 *
30
 */
31
public class RemoveFeatureTreeOperation extends AbstractPostOperation<TermTree>{
32

    
33

    
34

    
35
    public RemoveFeatureTreeOperation(UUID elementUUID,
36
            IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
37
        super("Remove Feature Tree", elementUUID, StoreUtil.getUndoContext(), postOperationEnabled, cdmEntitySessionEnabled);
38
    }
39

    
40
    @Override
41
    public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
42
        CdmStore.getService(ITermTreeService.class).delete(elementUuid);
43
        return postExecute(null);
44
    }
45

    
46
    @Override
47
    public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
48
        return null;
49
    }
50

    
51
    @Override
52
    public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
53
        return null;
54
    }
55

    
56
}
(6-6/6)