merging in latest changes from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / name / NameRelationshipWizard.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.taxeditor.ui.section.name;
12
13 import org.eclipse.jface.wizard.Wizard;
14
15 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
16 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
17 import eu.etaxonomy.cdm.model.name.NameRelationship;
18 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
19
20 /**
21 * <p>NameRelationshipWizard class.</p>
22 *
23 * @author n.hoffmann
24 * @created Jun 1, 2010
25 * @version 1.0
26 */
27 public class NameRelationshipWizard extends Wizard implements IConversationEnabled{
28
29 private static NameRelationshipDetailSection callingSection;
30
31 /**
32 * <p>Constructor for NameRelationshipWizard.</p>
33 *
34 * @param callingSection a {@link eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection} object.
35 */
36 public NameRelationshipWizard(NameRelationshipDetailSection callingSection) {
37 NameRelationshipWizard.callingSection = callingSection;
38 }
39
40 private NameRelationshipWizardPage page;
41
42 /** {@inheritDoc} */
43 @Override
44 public void addPages() {
45 page = new NameRelationshipWizardPage(callingSection);
46
47 addPage(page);
48 }
49
50 /* (non-Javadoc)
51 * @see org.eclipse.jface.wizard.Wizard#performFinish()
52 */
53 /** {@inheritDoc} */
54 @Override
55 public boolean performFinish() {
56 return page.isPageComplete();
57 }
58
59
60
61 /**
62 * <p>getNameRelationship</p>
63 *
64 * @return a {@link eu.etaxonomy.cdm.model.name.NameRelationship} object.
65 */
66 public NameRelationship getNameRelationship() {
67 return page.getNameRelationship();
68 }
69
70 /**
71 * <p>getConversationHolder</p>
72 *
73 * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
74 */
75 public ConversationHolder getConversationHolder() {
76 return callingSection.getConversationHolder();
77 }
78
79 /** {@inheritDoc} */
80 public void update(CdmDataChangeMap changeEvents) {}
81 }