Project

General

Profile

Download (1.14 KB) Statistics
| Branch: | Tag: | Revision:
1 729887cf n.hoffmann
/**
2
* Copyright (C) 2007 EDIT
3 2e93b829 Cherian Mathew
* European Distributed Institute of Taxonomy
4 729887cf n.hoffmann
* http://www.e-taxonomy.eu
5 2e93b829 Cherian Mathew
*
6 729887cf 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 729887cf n.hoffmann
12 db5e366d n.hoffmann
import eu.etaxonomy.cdm.api.service.IAgentService;
13 729887cf n.hoffmann
import eu.etaxonomy.cdm.model.agent.Person;
14
import eu.etaxonomy.taxeditor.store.CdmStore;
15 f211dd28 n.hoffmann
import eu.etaxonomy.taxeditor.ui.section.agent.PersonWizardPage;
16 729887cf n.hoffmann
17
/**
18 3be6ef3e n.hoffmann
 * <p>NewPersonWizard class.</p>
19
 *
20 729887cf n.hoffmann
 * @author n.hoffmann
21
 * @created Jun 1, 2010
22
 * @version 1.0
23
 */
24
public class NewPersonWizard extends AbstractNewEntityWizard<Person> {
25
26 3be6ef3e n.hoffmann
	/** {@inheritDoc} */
27 729887cf n.hoffmann
	@Override
28
	public void addPages() {
29 f211dd28 n.hoffmann
		addPage(new PersonWizardPage(formFactory, getConversationHolder(), getEntity()));
30 729887cf n.hoffmann
	}
31 2e93b829 Cherian Mathew
32 3be6ef3e n.hoffmann
	/** {@inheritDoc} */
33 729887cf n.hoffmann
	@Override
34
	protected Person createNewEntity() {
35
		return Person.NewTitledInstance("");
36
	}
37
38 3be6ef3e n.hoffmann
	/** {@inheritDoc} */
39 729887cf n.hoffmann
	@Override
40
	protected void saveEntity() {
41 d85cfdf3 Katja Luther
	    CdmStore.getService(IAgentService.class).merge(getEntity(), true);
42 729887cf n.hoffmann
	}
43 38f1558f n.hoffmann
44
	@Override
45
	protected String getEntityName() {
46
		return "Person";
47
	}
48 729887cf n.hoffmann
}