Merge branch 'hotfix/5.45.1'
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / newWizard / NewAmplificationWizard.java
1 /**
2 * Copyright (C) 2014 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
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.
8 */
9 package eu.etaxonomy.taxeditor.newWizard;
10
11 import eu.etaxonomy.cdm.api.service.molecular.IAmplificationService;
12 import eu.etaxonomy.cdm.model.molecular.Amplification;
13 import eu.etaxonomy.taxeditor.store.CdmStore;
14
15 /**
16 * @author pplitzner
17 * @date 11.03.2014
18 *
19 */
20 public class NewAmplificationWizard extends AbstractNewEntityWizard<Amplification> {
21
22 private AmplificationGeneralWizardPage amplificationGeneralPage;
23
24 /** {@inheritDoc} */
25 @Override
26 public void addPages() {
27 amplificationGeneralPage = new AmplificationGeneralWizardPage(formFactory, getEntity());
28 addPage(amplificationGeneralPage);
29 }
30
31 /** {@inheritDoc} */
32 @Override
33 protected Amplification createNewEntity() {
34 return Amplification.NewInstance();
35 }
36
37 /** {@inheritDoc} */
38 @Override
39 protected void saveEntity() {
40 CdmStore.getService(IAmplificationService.class).merge(getEntity(), true);
41
42 }
43
44 /** {@inheritDoc} */
45 @Override
46 public void setEntity(Amplification entity) {
47 super.setEntity(entity);
48 amplificationGeneralPage.getDetailElement().setEntity(entity);
49 }
50
51 @Override
52 protected String getEntityName() {
53 return "Amplification";
54 }
55 }