added a readme file
[taxeditor.git] / taxeditor-store / src / main / java / eu / etaxonomy / taxeditor / operations / SaveClassificationOperation.java
index 76c72b8209392df72eeddf83f4b6592822ad1d27..5cb7a5597b35bffb13462c26ae1995dd3bb71d8b 100644 (file)
@@ -17,9 +17,9 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
-import eu.etaxonomy.cdm.model.reference.ReferenceBase;
+import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
-import eu.etaxonomy.cdm.model.taxon.TaxonomicTree;
+import eu.etaxonomy.cdm.model.taxon.Classification;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
@@ -31,7 +31,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class SaveClassificationOperation extends AbstractPersistentPostOperation {
 
-       private TaxonomicTree classification;
+       private Classification classification;
        
        /**
         * <p>Constructor for SaveClassificationOperation.</p>
@@ -42,7 +42,7 @@ public class SaveClassificationOperation extends AbstractPersistentPostOperation
         * @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operations.IPostOperationEnabled} object.
         * @param conversationEnabled a {@link eu.etaxonomy.cdm.api.conversation.IConversationEnabled} object.
         */
-       public SaveClassificationOperation(String label, IUndoContext undoContext, TaxonomicTree classification,
+       public SaveClassificationOperation(String label, IUndoContext undoContext, Classification classification,
                        IPostOperationEnabled postOperationEnabled,
                        IConversationEnabled conversationEnabled) {
                super(label, undoContext, postOperationEnabled, conversationEnabled);
@@ -62,12 +62,12 @@ public class SaveClassificationOperation extends AbstractPersistentPostOperation
                monitor.worked(20);
                
                if(classification.getReference() == null){
-                       ReferenceBase reference = ReferenceFactory.newGeneric();
+                       Reference reference = ReferenceFactory.newGeneric();
                        reference.setTitleCache(classification.getTitleCache());
                        classification.setReference(reference);
                }
                
-               CdmStore.getTaxonTreeService().saveOrUpdate(classification);
+               CdmStore.getClassificationService().saveOrUpdate(classification);
                
                monitor.worked(40);