Merge branch 'hotfix/5.45.1'
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / name / NameRelationshipWizard.java
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.model.common.CdmBase;
15 import eu.etaxonomy.cdm.model.name.NameRelationship;
16 import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
17
18 /**
19 * <p>NameRelationshipWizard class.</p>
20 *
21 * @author n.hoffmann
22 * @created Jun 1, 2010
23 * @version 1.0
24 */
25 public class NameRelationshipWizard extends Wizard {
26
27 private static NameRelationshipDetailSection callingSection;
28
29 //private ICdmEntitySession cdmEntitySession;
30 private ICdmEntitySession previousCdmEntitySession;
31 private CdmBase rootElement;
32
33 /**
34 * <p>Constructor for NameRelationshipWizard.</p>
35 *
36 * @param callingSection a {@link eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection} object.
37 */
38 public NameRelationshipWizard(NameRelationshipDetailSection callingSection) {
39 NameRelationshipWizard.callingSection = callingSection;
40 rootElement = callingSection.getEntity();
41 }
42
43 private NameRelationshipWizardPage page;
44
45 /** {@inheritDoc} */
46 @Override
47 public void addPages() {
48 page = new NameRelationshipWizardPage(callingSection, callingSection.getFormFactory());
49
50 addPage(page);
51 }
52
53 /* (non-Javadoc)
54 * @see org.eclipse.jface.wizard.Wizard#performFinish()
55 */
56 /** {@inheritDoc} */
57 @Override
58 public boolean performFinish() {
59 return page.isPageComplete();
60 }
61
62 @Override
63 public void dispose() {
64 super.dispose();
65
66 }
67
68 /**
69 * <p>getNameRelationship</p>
70 *
71 * @return a {@link eu.etaxonomy.cdm.model.name.NameRelationship} object.
72 */
73 public NameRelationship getNameRelationship() {
74 return page.getNameRelationship();
75 }
76 }