2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.ui
.section
.classification
;
12 import org
.eclipse
.jface
.wizard
.Wizard
;
13 import org
.eclipse
.swt
.widgets
.Display
;
15 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
16 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
17 import eu
.etaxonomy
.cdm
.model
.taxon
.Classification
;
18 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationshipType
;
19 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
20 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
29 public class CloneClassificationWizard
extends Wizard
{
31 private CloneClassificationWizardPage cloneClassificationWizardPage
;
33 private ConversationHolder conversationHolder
;
35 private CdmFormFactory formFactory
;
37 private String classificationName
;
39 private TaxonRelationshipType relationType
;
41 private Reference reference
;
43 public CloneClassificationWizard(Classification classification
) {
45 conversationHolder
= CdmStore
.createConversation();
46 formFactory
= new CdmFormFactory(Display
.getCurrent(), null);
47 cloneClassificationWizardPage
= new CloneClassificationWizardPage(formFactory
, conversationHolder
, classification
);
48 addPage(cloneClassificationWizardPage
);
53 public boolean canFinish() {
54 return cloneClassificationWizardPage
.getClassificationName()!=null
55 && cloneClassificationWizardPage
.getRelationType()!=null &&
56 cloneClassificationWizardPage
.getReference()!=null;
60 public boolean performFinish() {
61 classificationName
= cloneClassificationWizardPage
.getClassificationName();
62 relationType
= cloneClassificationWizardPage
.getRelationType();
63 reference
= cloneClassificationWizardPage
.getReference();
68 public String
getClassificationName(){
69 return classificationName
;
72 public TaxonRelationshipType
getRelationType(){
76 public Reference
getReference(){