3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.taxeditor
.newWizard
;
13 import eu
.etaxonomy
.cdm
.api
.service
.ITaxonService
;
14 import eu
.etaxonomy
.cdm
.model
.name
.NonViralName
;
15 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
16 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
17 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameWizardPage
;
18 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonWizardPage
;
26 public class NewTaxonWizard
extends AbstractNewEntityWizard
<Taxon
> {
30 public void addPages() {
31 addPage(new TaxonWizardPage(formFactory
, getConversationHolder(), getEntity()));
32 addPage(new NonViralNameWizardPage(formFactory
, getConversationHolder(), (NonViralName
) getEntity().getName()));
37 protected Taxon
createNewEntity() {
38 return Taxon
.NewInstance(NonViralName
.NewInstance(null), null);
43 protected void saveEntity() {
44 CdmStore
.getService(ITaxonService
.class).save(getEntity());
49 public void setEntity(Taxon entity
) {
50 super.setEntity(entity
);
54 protected String
getEntityName() {