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
.IReferenceService
;
13 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
14 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceFactory
;
15 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
16 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceWizardPage
;
19 * <p>NewReferenceWizard class.</p>
22 * @created Jun 1, 2010
25 public class NewReferenceWizard
extends AbstractNewEntityWizard
<Reference
> {
27 private ReferenceWizardPage referencePage
;
31 public void addPages() {
32 // TODO disabling external service wizard page for now
33 // addPage(new ExternalReferenceServiceWizardPage(formFactory, getConversationHolder(), entity));
34 referencePage
= new ReferenceWizardPage(formFactory
, getConversationHolder(), getEntity());
35 addPage(referencePage
);
40 protected Reference
createNewEntity() {
41 return ReferenceFactory
.newGeneric();
46 protected void saveEntity() {
47 CdmStore
.getService(IReferenceService
.class).save(getEntity());
52 public void setEntity(Reference entity
) {
53 super.setEntity(entity
);
54 referencePage
.getDetailElement().setEntity(entity
);
58 protected String
getEntityName() {