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
.IReferenceService
;
14 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
15 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceFactory
;
16 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
17 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceWizardPage
;
20 * <p>NewReferenceWizard class.</p>
23 * @created Jun 1, 2010
26 public class NewReferenceWizard
extends AbstractNewEntityWizard
<Reference
> {
28 private ReferenceWizardPage referencePage
;
32 public void addPages() {
33 // TODO disabling external service wizard page for now
34 // addPage(new ExternalReferenceServiceWizardPage(formFactory, getConversationHolder(), entity));
35 referencePage
= new ReferenceWizardPage(formFactory
, getConversationHolder(), getEntity());
36 addPage(referencePage
);
41 protected Reference
createNewEntity() {
42 return ReferenceFactory
.newGeneric();
47 protected void saveEntity() {
48 CdmStore
.getService(IReferenceService
.class).saveOrUpdate(getEntity());
53 public void setEntity(Reference entity
) {
54 super.setEntity(entity
);
55 referencePage
.getDetailElement().setEntity(entity
);
59 protected String
getEntityName() {