Project

General

Profile

« Previous | Next » 

Revision 49d3c2dd

Added by Katja Luther over 1 year ago

ref #10186: remove conversation holder

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/AbstractNewEntityWizardParentChild.java
14 14
import org.eclipse.jface.wizard.Wizard;
15 15
import org.eclipse.swt.widgets.Display;
16 16

  
17
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
18
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
19 17
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
20 18
import eu.etaxonomy.taxeditor.store.CdmStore;
21 19
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
......
26 24
 * @created Jun 1, 2010
27 25
 * @version 1.0
28 26
 */
29
public abstract class AbstractNewEntityWizardParentChild<T> extends Wizard implements
30
		IConversationEnabled {
31

  
32
	private ConversationHolder conversation;
27
public abstract class AbstractNewEntityWizardParentChild<T> extends Wizard {
33 28

  
34 29
	protected CdmFormFactory formFactory;
35 30

  
......
58 53
	        return true;
59 54
	    }
60 55
		saveEntity();
61

  
62
		conversation.commit();
63
		conversation.close();
64
		conversation = null;
65

  
66 56
		finished = true;
67 57
		return true;
68 58
	}
......
92 82
	/** {@inheritDoc} */
93 83
	public void init(IWorkbench workbench, IStructuredSelection selection) {
94 84
	    formFactory = new CdmFormFactory(Display.getCurrent(), null);
95
	    conversation = CdmStore.createConversation();
96 85
	    this.selection = selection;
97 86

  
98 87
	    createParentEntity();
......
100 89

  
101 90
	}
102 91

  
103

  
104

  
105 92
	protected abstract void createParentEntity();
106 93

  
107
	@Override
108
    public ConversationHolder getConversationHolder() {
109
		return conversation;
110
	}
111

  
112
	/** {@inheritDoc} */
113
	@Override
114
    public void update(CdmDataChangeMap changeEvents) {}
115

  
116 94
	public IStructuredSelection getSelection() {
117 95
		return selection;
118 96
	}

Also available in: Unified diff