Merge branch 'develop' into remoting-4.0
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / editor / definedterm / operation / CreateTermVocabularyOperation.java
index 7d365453c4194097d5efaa317a12f49dbe206964..7911410a71c708154a8a57aae37894b852b5440e 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$\r
 /**\r
 * Copyright (C) 2009 EDIT\r
-* European Distributed Institute of Taxonomy \r
+* European Distributed Institute of Taxonomy\r
 * http://www.e-taxonomy.eu\r
-* \r
+*\r
 * The contents of this file are subject to the Mozilla Public License Version 1.1\r
 * See LICENSE.TXT at the top of this package for the full license terms.\r
 */\r
@@ -18,7 +18,7 @@ import org.eclipse.core.runtime.IStatus;
 import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
 import eu.etaxonomy.cdm.model.common.TermVocabulary;\r
 import eu.etaxonomy.taxeditor.editor.definedterm.input.TermEditorInput;\r
-import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;\r
+import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;\r
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
 \r
@@ -27,18 +27,18 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @date 21 Dec 2011\r
  *\r
  */\r
-public class CreateTermVocabularyOperation extends AbstractPostOperation {\r
+public class CreateTermVocabularyOperation extends AbstractPostTaxonOperation {\r
+\r
+       private final TermEditorInput definedEditorInput;\r
 \r
-       private TermEditorInput definedEditorInput;\r
-       \r
        /**\r
         * @param label\r
         * @param undoContext\r
         * @param postOperationEnabled\r
         */\r
        public CreateTermVocabularyOperation(String label,\r
-                       IUndoContext undoContext, \r
-                       TermEditorInput definedEditorInput, \r
+                       IUndoContext undoContext,\r
+                       TermEditorInput definedEditorInput,\r
                        IPostOperationEnabled postOperationEnabled) {\r
                super(label, undoContext, postOperationEnabled);\r
                this.definedEditorInput = definedEditorInput;\r
@@ -50,17 +50,17 @@ public class CreateTermVocabularyOperation extends AbstractPostOperation {
        @Override\r
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
                        throws ExecutionException {\r
-       \r
-               TermVocabulary termVocabulary = \r
+\r
+               TermVocabulary termVocabulary =\r
                                        TermVocabulary.NewInstance(definedEditorInput.getTermType(),\r
-                                               null, \r
-                                               "Untitled", \r
-                                               null, \r
-                                               null);          \r
-               \r
-               CdmStore.getService(IVocabularyService.class).save(termVocabulary);\r
+                                               null,\r
+                                               "Untitled",\r
+                                               null,\r
+                                               null);\r
+\r
+               termVocabulary = CdmStore.getService(IVocabularyService.class).save(termVocabulary);\r
                definedEditorInput.getVocabularies().add(termVocabulary);\r
-               \r
+\r
                return postExecute(termVocabulary);\r
        }\r
 \r