Project

General

Profile

Download (1.78 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 org.eclipse.core.commands.ExecutionException;
12
import org.eclipse.core.runtime.IAdaptable;
13
import org.eclipse.core.runtime.IProgressMonitor;
14
import org.eclipse.core.runtime.IStatus;
15

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

    
24
/**
25
 * @author pplitzner
26
 * @since Apr 30, 2018
27
 */
28
public class CreateFeatureTreeOperation extends AbstractPostOperation<TermTree>{
29

    
30
    public CreateFeatureTreeOperation(TermTree element,
31
            IPostOperationEnabled postOperationEnabled, ICdmEntitySessionEnabled<TermTree> cdmEntitySessionEnabled) {
32
        super("Create Feature Tree", StoreUtil.getUndoContext(), element, postOperationEnabled, cdmEntitySessionEnabled);
33
    }
34

    
35
    @Override
36
    public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
37
        CdmStore.getService(ITermTreeService.class).save(element);
38
        return postExecute(element);
39
    }
40

    
41
    @Override
42
    public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
43
        return null;
44
    }
45

    
46
    @Override
47
    public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
48
        return null;
49
    }
50
}
(3-3/6)