+++ /dev/null
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.navigation.navigator.operation;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.IUndoContext;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
-import eu.etaxonomy.cdm.api.service.IClassificationService;
-import eu.etaxonomy.cdm.model.taxon.Classification;
-import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
-import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
-/**
- * <p>EditTaxonomicTreeOperation class.</p>
- *
- * @author n.hoffmann
- * @created Jul 12, 2010
- * @version 1.0
- */
-public class EditClassificationOperation extends AbstractPersistentPostOperation {
- private final Classification classification;
-
- /**
- * <p>Constructor for EditTaxonomicTreeOperation.</p>
- *
- * @param label a {@link java.lang.String} object.
- * @param undoContext a {@link org.eclipse.core.commands.operations.IUndoContext} object.
- * @param classification a {@link eu.etaxonomy.cdm.model.taxon.TaxonomicTree} object.
- * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
- * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
- */
- public EditClassificationOperation(String label, IUndoContext undoContext, Classification classification,
- IPostOperationEnabled postOperationEnabled,
- IConversationEnabled conversationEnabled,
- ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
- super(label, undoContext, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
-
- this.classification = classification;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
- @Override
- public IStatus execute(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- bind();
-
- CdmStore.getService(IClassificationService.class).save(classification);
-
- monitor.worked(40);
-
- return postExecute(classification);
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
- @Override
- public IStatus redo(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
- /** {@inheritDoc} */
- @Override
- public IStatus undo(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- return null;
- }
-}