X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/blobdiff_plain/be497f38c5dd0e2ffccb31c0991eb3083d177a93..7d7c55628912da9ba6196645caefc1575a3e7a0d:/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateTermVocabularyOperation.java diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateTermVocabularyOperation.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateTermVocabularyOperation.java index 7d365453c..7911410a7 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateTermVocabularyOperation.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateTermVocabularyOperation.java @@ -1,9 +1,9 @@ // $Id$ /** * Copyright (C) 2009 EDIT -* European Distributed Institute of Taxonomy +* 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. */ @@ -18,7 +18,7 @@ import org.eclipse.core.runtime.IStatus; import eu.etaxonomy.cdm.api.service.IVocabularyService; import eu.etaxonomy.cdm.model.common.TermVocabulary; import eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput; -import eu.etaxonomy.taxeditor.operation.AbstractPostOperation; +import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation; import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; import eu.etaxonomy.taxeditor.store.CdmStore; @@ -27,18 +27,18 @@ import eu.etaxonomy.taxeditor.store.CdmStore; * @date 21 Dec 2011 * */ -public class CreateTermVocabularyOperation extends AbstractPostOperation { +public class CreateTermVocabularyOperation extends AbstractPostTaxonOperation { + + private final TermEditorInput definedEditorInput; - private TermEditorInput definedEditorInput; - /** * @param label * @param undoContext * @param postOperationEnabled */ public CreateTermVocabularyOperation(String label, - IUndoContext undoContext, - TermEditorInput definedEditorInput, + IUndoContext undoContext, + TermEditorInput definedEditorInput, IPostOperationEnabled postOperationEnabled) { super(label, undoContext, postOperationEnabled); this.definedEditorInput = definedEditorInput; @@ -50,17 +50,17 @@ public class CreateTermVocabularyOperation extends AbstractPostOperation { @Override public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { - - TermVocabulary termVocabulary = + + TermVocabulary termVocabulary = TermVocabulary.NewInstance(definedEditorInput.getTermType(), - null, - "Untitled", - null, - null); - - CdmStore.getService(IVocabularyService.class).save(termVocabulary); + null, + "Untitled", + null, + null); + + termVocabulary = CdmStore.getService(IVocabularyService.class).save(termVocabulary); definedEditorInput.getVocabularies().add(termVocabulary); - + return postExecute(termVocabulary); }