ref #8398 adapting taxeditor to changes in NameRelationship
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / name / NameRelationshipWizard.java
index 19bd9898a35ee598607b5a8afa3167761bf2df74..92e5786deb87c9a192e9965949c1d7ecdb184ebb 100644 (file)
@@ -1,20 +1,14 @@
-// $Id$
 /**
 * Copyright (C) 2007 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.
 */
 
 package eu.etaxonomy.taxeditor.ui.section.name;
 
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
 import org.eclipse.jface.wizard.Wizard;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
@@ -23,8 +17,6 @@ import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.name.NameRelationship;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
-import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
-import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * <p>NameRelationshipWizard class.</p>
@@ -33,14 +25,14 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @created Jun 1, 2010
  * @version 1.0
  */
-public class NameRelationshipWizard extends Wizard implements IConversationEnabled, ICdmEntitySessionEnabled{
+public class NameRelationshipWizard extends Wizard implements IConversationEnabled{
 
        private static NameRelationshipDetailSection callingSection;
-       
-       private ICdmEntitySession cdmEntitySession;
+
+       //private ICdmEntitySession cdmEntitySession;
     private ICdmEntitySession previousCdmEntitySession;
     private CdmBase rootElement;
-       
+
        /**
         * <p>Constructor for NameRelationshipWizard.</p>
         *
@@ -49,23 +41,18 @@ public class NameRelationshipWizard extends Wizard implements IConversationEnabl
        public NameRelationshipWizard(NameRelationshipDetailSection callingSection) {
                NameRelationshipWizard.callingSection = callingSection;
                rootElement = callingSection.getEntity();
-               if (CdmStore.isActive()) {
-            previousCdmEntitySession = CdmStore.getCurrentSessionManager().getActiveSession();
-            cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
-            cdmEntitySession.bind();
-        }
        }
-               
+
        private NameRelationshipWizardPage page;
 
        /** {@inheritDoc} */
        @Override
        public void addPages() {
-               page = new NameRelationshipWizardPage(callingSection); 
-               
+               page = new NameRelationshipWizardPage(callingSection, callingSection.getFormFactory());
+
                addPage(page);
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.jface.wizard.Wizard#performFinish()
         */
@@ -78,12 +65,7 @@ public class NameRelationshipWizard extends Wizard implements IConversationEnabl
        @Override
     public void dispose() {
         super.dispose();
-        if(cdmEntitySession != null) {
-            cdmEntitySession.dispose();
-        }
-        if(previousCdmEntitySession!=null){
-            previousCdmEntitySession.bind();
-        }
+
     }
 
        /**
@@ -100,25 +82,14 @@ public class NameRelationshipWizard extends Wizard implements IConversationEnabl
         *
         * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
         */
-       public ConversationHolder getConversationHolder() {
+       @Override
+    public ConversationHolder getConversationHolder() {
                return callingSection.getConversationHolder();
        }
 
        /** {@inheritDoc} */
-       public void update(CdmDataChangeMap changeEvents) {}
-
-        @Override
-           public ICdmEntitySession getCdmEntitySession() {
-               return cdmEntitySession;
-           }
-
-           @Override
-           public java.util.Collection<CdmBase> getRootEntities() {
-               return Collections.singleton(rootElement);
-           }
-
-           @Override
-           public Map<Object, List<String>> getPropertyPathsMap() {
-               return null;
-           }
+       @Override
+    public void update(CdmDataChangeMap changeEvents) {}
+
+
 }