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
.IClassificationService
;
14 import eu
.etaxonomy
.cdm
.model
.taxon
.Classification
;
15 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
16 import eu
.etaxonomy
.taxeditor
.ui
.section
.classification
.ClassificationWizardPage
;
19 * <p>ClassificationWizard class.</p>
26 public class NewClassificationWizard
extends AbstractNewEntityWizard
<Classification
> {
28 private ClassificationWizardPage classificationWizardPage
;
31 * @see eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard#setEntity(java.lang.Object)
34 public void setEntity(Classification entity
) {
35 setWindowTitle("Edit Classification");
36 entity
= CdmStore
.getService(IClassificationService
.class).load(entity
.getUuid());
37 super.setEntity(entity
);
41 public void addPages() {
42 classificationWizardPage
= new ClassificationWizardPage(formFactory
, getConversationHolder(), getEntity());
43 addPage(classificationWizardPage
);
47 protected void saveEntity() {
48 CdmStore
.getService(IClassificationService
.class).saveOrUpdate(getEntity());
52 protected Classification
createNewEntity() {
53 return Classification
.NewInstance(null);