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