3 * Copyright (C) 2014 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.
10 package eu
.etaxonomy
.taxeditor
.newWizard
;
12 import eu
.etaxonomy
.cdm
.api
.service
.molecular
.IAmplificationService
;
13 import eu
.etaxonomy
.cdm
.model
.molecular
.Amplification
;
14 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
21 public class NewAmplificationWizard
extends AbstractNewEntityWizard
<Amplification
> {
23 private AmplificationGeneralWizardPage amplificationGeneralPage
;
27 public void addPages() {
28 amplificationGeneralPage
= new AmplificationGeneralWizardPage(formFactory
, getConversationHolder(), getEntity());
29 addPage(amplificationGeneralPage
);
34 protected Amplification
createNewEntity() {
35 return Amplification
.NewInstance();
40 protected void saveEntity() {
41 if(CdmStore
.getCurrentSessionManager().isRemoting()) {
42 CdmStore
.getService(IAmplificationService
.class).merge(getEntity(), true);
44 CdmStore
.getService(IAmplificationService
.class).save(getEntity());
50 public void setEntity(Amplification entity
) {
51 super.setEntity(entity
);
52 amplificationGeneralPage
.getDetailElement().setEntity(entity
);
56 protected String
getEntityName() {
57 return "Amplification";