Project

General

Profile

Download (1.07 KB) Statistics
| Branch: | Tag: | Revision:
1 9a0f58cd n.hoffmann
/**
2
* Copyright (C) 2007 EDIT
3 2e93b829 Cherian Mathew
* European Distributed Institute of Taxonomy
4 9a0f58cd n.hoffmann
* http://www.e-taxonomy.eu
5 2e93b829 Cherian Mathew
*
6 9a0f58cd n.hoffmann
* 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 f211dd28 n.hoffmann
package eu.etaxonomy.taxeditor.newWizard;
11 9a0f58cd n.hoffmann
12
import eu.etaxonomy.cdm.api.service.IAgentService;
13
import eu.etaxonomy.cdm.model.agent.Institution;
14
import eu.etaxonomy.taxeditor.store.CdmStore;
15 f211dd28 n.hoffmann
import eu.etaxonomy.taxeditor.ui.section.agent.InstitutionWizardPage;
16 9a0f58cd n.hoffmann
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 f211dd28 n.hoffmann
		addPage(new InstitutionWizardPage(formFactory, getConversationHolder(), getEntity()));
27 9a0f58cd n.hoffmann
	}
28 2e93b829 Cherian Mathew
29 9a0f58cd n.hoffmann
	@Override
30
	protected void saveEntity() {
31 d85cfdf3 Katja Luther
	    CdmStore.getService(IAgentService.class).merge(getEntity(), true);
32 9a0f58cd n.hoffmann
	}
33
34
	@Override
35
	protected Institution createNewEntity() {
36
		return Institution.NewInstance();
37
	}
38
39 38f1558f n.hoffmann
	@Override
40
	protected String getEntityName() {
41
		return "Institution";
42
	}
43
44 9a0f58cd n.hoffmann
}