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