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.IPrimerService;
|
13
|
import eu.etaxonomy.cdm.model.molecular.Primer;
|
14
|
import eu.etaxonomy.taxeditor.store.CdmStore;
|
15
|
|
16
|
/**
|
17
|
* @author pplitzner
|
18
|
* @date 11.03.2014
|
19
|
*
|
20
|
*/
|
21
|
public class NewPrimerWizard extends AbstractNewEntityWizard<Primer> {
|
22
|
|
23
|
private PrimerWizardPage primerPage;
|
24
|
|
25
|
/** {@inheritDoc} */
|
26
|
@Override
|
27
|
public void addPages() {
|
28
|
primerPage = new PrimerWizardPage(formFactory, getConversationHolder(), getEntity());
|
29
|
addPage(primerPage);
|
30
|
}
|
31
|
|
32
|
/** {@inheritDoc} */
|
33
|
@Override
|
34
|
protected Primer createNewEntity() {
|
35
|
return Primer.NewInstance("");
|
36
|
}
|
37
|
|
38
|
/** {@inheritDoc} */
|
39
|
@Override
|
40
|
protected void saveEntity() {
|
41
|
CdmStore.getService(IPrimerService.class).saveOrUpdate(getEntity());
|
42
|
}
|
43
|
|
44
|
/** {@inheritDoc} */
|
45
|
@Override
|
46
|
public void setEntity(Primer entity) {
|
47
|
super.setEntity(entity);
|
48
|
primerPage.getDetailElement().setEntity(entity);
|
49
|
}
|
50
|
|
51
|
@Override
|
52
|
protected String getEntityName() {
|
53
|
return "Primer";
|
54
|
}
|
55
|
}
|