1
|
/**
|
2
|
* Copyright (C) 2007 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
|
|
10
|
package eu.etaxonomy.taxeditor.newWizard;
|
11
|
|
12
|
import eu.etaxonomy.cdm.api.service.IAgentService;
|
13
|
import eu.etaxonomy.cdm.model.agent.Institution;
|
14
|
import eu.etaxonomy.taxeditor.store.CdmStore;
|
15
|
import eu.etaxonomy.taxeditor.ui.section.agent.InstitutionWizardPage;
|
16
|
|
17
|
/**
|
18
|
* @author n.hoffmann
|
19
|
* @created Dec 15, 2010
|
20
|
* @version 1.0
|
21
|
*/
|
22
|
public class NewInstitutionWizard extends AbstractNewEntityWizard<Institution> {
|
23
|
|
24
|
@Override
|
25
|
public void addPages() {
|
26
|
addPage(new InstitutionWizardPage(formFactory, getConversationHolder(), getEntity()));
|
27
|
}
|
28
|
|
29
|
@Override
|
30
|
protected void saveEntity() {
|
31
|
CdmStore.getService(IAgentService.class).merge(getEntity(), true);
|
32
|
}
|
33
|
|
34
|
@Override
|
35
|
protected Institution createNewEntity() {
|
36
|
return Institution.NewInstance();
|
37
|
}
|
38
|
|
39
|
@Override
|
40
|
protected String getEntityName() {
|
41
|
return "Institution";
|
42
|
}
|
43
|
|
44
|
}
|