automated build configuration is on its way
[taxeditor.git] / 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.apache.log4j.Logger;
14 import org.eclipse.jface.wizard.Wizard;
15
16 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
17 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
18 import eu.etaxonomy.cdm.model.name.NameRelationship;
19 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
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 /**
33 * <p>Constructor for NameRelationshipWizard.</p>
34 *
35 * @param callingSection a {@link eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection} object.
36 */
37 public NameRelationshipWizard(NameRelationshipDetailSection callingSection) {
38 this.callingSection = callingSection;
39 }
40
41 private static final Logger logger = Logger
42 .getLogger(NameRelationshipWizard.class);
43
44 private NameRelationshipWizardPage page;
45
46 /** {@inheritDoc} */
47 @Override
48 public void addPages() {
49 page = new NameRelationshipWizardPage(callingSection);
50
51 addPage(page);
52 }
53
54 /* (non-Javadoc)
55 * @see org.eclipse.jface.wizard.Wizard#performFinish()
56 */
57 /** {@inheritDoc} */
58 @Override
59 public boolean performFinish() {
60 return page.isPageComplete();
61 }
62
63
64
65 /**
66 * <p>getNameRelationship</p>
67 *
68 * @return a {@link eu.etaxonomy.cdm.model.name.NameRelationship} object.
69 */
70 public NameRelationship getNameRelationship() {
71 return page.getNameRelationship();
72 }
73
74 /**
75 * <p>getConversationHolder</p>
76 *
77 * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
78 */
79 public ConversationHolder getConversationHolder() {
80 return callingSection.getConversationHolder();
81 }
82
83 /** {@inheritDoc} */
84 public void update(CdmDataChangeMap changeEvents) {}
85 }