3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.operations
;
13 import org
.eclipse
.core
.commands
.ExecutionException
;
14 import org
.eclipse
.core
.commands
.operations
.IUndoContext
;
15 import org
.eclipse
.core
.runtime
.IAdaptable
;
16 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
17 import org
.eclipse
.core
.runtime
.IStatus
;
19 import eu
.etaxonomy
.cdm
.api
.conversation
.IConversationEnabled
;
20 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonomicTree
;
21 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
24 * <p>EditTaxonomicTreeOperation class.</p>
27 * @created Jul 12, 2010
30 public class EditTaxonomicTreeOperation
extends AbstractPersistentPostOperation
{
31 private TaxonomicTree classification
;
34 * <p>Constructor for EditTaxonomicTreeOperation.</p>
36 * @param label a {@link java.lang.String} object.
37 * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
38 * @param classification a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
39 * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operations.IPostOperationEnabled} object.
40 * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
42 public EditTaxonomicTreeOperation(String label
, IUndoContext undoContext
, TaxonomicTree classification
,
43 IPostOperationEnabled postOperationEnabled
,
44 IConversationEnabled conversationEnabled
) {
45 super(label
, undoContext
, postOperationEnabled
, conversationEnabled
);
47 this.classification
= classification
;
51 * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
55 public IStatus
execute(IProgressMonitor monitor
, IAdaptable info
)
56 throws ExecutionException
{
59 CdmStore
.getTaxonTreeService().save(classification
);
63 return postExecute(classification
);
68 * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
72 public IStatus
redo(IProgressMonitor monitor
, IAdaptable info
)
73 throws ExecutionException
{
74 // TODO Auto-generated method stub
79 * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
83 public IStatus
undo(IProgressMonitor monitor
, IAdaptable info
)
84 throws ExecutionException
{
85 // TODO Auto-generated method stub