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
.newWizard
;
12 import eu
.etaxonomy
.cdm
.api
.service
.ITaxonService
;
13 import eu
.etaxonomy
.cdm
.model
.name
.TaxonNameFactory
;
14 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
15 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
16 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameWizardPage
;
17 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonWizardPage
;
25 public class NewTaxonWizard
extends AbstractNewEntityWizard
<Taxon
> {
29 public void addPages() {
30 addPage(new TaxonWizardPage(formFactory
, getConversationHolder(), getEntity()));
31 addPage(new NonViralNameWizardPage(formFactory
, getConversationHolder(), getEntity().getName()));
36 protected Taxon
createNewEntity() {
37 return Taxon
.NewInstance(TaxonNameFactory
.NewNonViralInstance(null), null);
42 protected void saveEntity() {
44 CdmStore
.getService(ITaxonService
.class).save(getEntity());
49 public void setEntity(Taxon entity
) {
50 super.setEntity(entity
);
54 protected String
getEntityName() {