Project

General

Profile

Download (2.39 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

    
10
package eu.etaxonomy.taxeditor.ui.section.name;
11

    
12
import org.eclipse.jface.wizard.Wizard;
13

    
14
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
15
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
16
import eu.etaxonomy.cdm.model.common.CdmBase;
17
import eu.etaxonomy.cdm.model.name.NameRelationship;
18
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
19
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
20

    
21
/**
22
 * <p>NameRelationshipWizard class.</p>
23
 *
24
 * @author n.hoffmann
25
 * @created Jun 1, 2010
26
 * @version 1.0
27
 */
28
public class NameRelationshipWizard extends Wizard implements IConversationEnabled{
29

    
30
	private static NameRelationshipDetailSection callingSection;
31

    
32
	//private ICdmEntitySession cdmEntitySession;
33
    private ICdmEntitySession previousCdmEntitySession;
34
    private CdmBase rootElement;
35

    
36
	/**
37
	 * <p>Constructor for NameRelationshipWizard.</p>
38
	 *
39
	 * @param callingSection a {@link eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection} object.
40
	 */
41
	public NameRelationshipWizard(NameRelationshipDetailSection callingSection) {
42
		NameRelationshipWizard.callingSection = callingSection;
43
		rootElement = callingSection.getEntity();
44
	}
45

    
46
	private NameRelationshipWizardPage page;
47

    
48
	/** {@inheritDoc} */
49
	@Override
50
	public void addPages() {
51
		page = new NameRelationshipWizardPage(callingSection);
52

    
53
		addPage(page);
54
	}
55

    
56
	/* (non-Javadoc)
57
	 * @see org.eclipse.jface.wizard.Wizard#performFinish()
58
	 */
59
	/** {@inheritDoc} */
60
	@Override
61
	public boolean performFinish() {
62
		return page.isPageComplete();
63
	}
64

    
65
	@Override
66
    public void dispose() {
67
        super.dispose();
68

    
69
    }
70

    
71
	/**
72
	 * <p>getNameRelationship</p>
73
	 *
74
	 * @return a {@link eu.etaxonomy.cdm.model.name.NameRelationship} object.
75
	 */
76
	public NameRelationship getNameRelationship() {
77
		return page.getNameRelationship();
78
	}
79

    
80
	/**
81
	 * <p>getConversationHolder</p>
82
	 *
83
	 * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
84
	 */
85
	@Override
86
    public ConversationHolder getConversationHolder() {
87
		return callingSection.getConversationHolder();
88
	}
89

    
90
	/** {@inheritDoc} */
91
	@Override
92
    public void update(CdmDataChangeMap changeEvents) {}
93

    
94

    
95
}
(10-10/21)