Project

General

Profile

Download (1.14 KB) Statistics
| Branch: | Tag: | Revision:
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.Person;
14
import eu.etaxonomy.taxeditor.store.CdmStore;
15
import eu.etaxonomy.taxeditor.ui.section.agent.PersonWizardPage;
16

    
17
/**
18
 * <p>NewPersonWizard class.</p>
19
 *
20
 * @author n.hoffmann
21
 * @created Jun 1, 2010
22
 * @version 1.0
23
 */
24
public class NewPersonWizard extends AbstractNewEntityWizard<Person> {
25

    
26
	/** {@inheritDoc} */
27
	@Override
28
	public void addPages() {
29
		addPage(new PersonWizardPage(formFactory, getConversationHolder(), getEntity()));
30
	}
31

    
32
	/** {@inheritDoc} */
33
	@Override
34
	protected Person createNewEntity() {
35
		return Person.NewTitledInstance("");
36
	}
37

    
38
	/** {@inheritDoc} */
39
	@Override
40
	protected void saveEntity() {
41
	    CdmStore.getService(IAgentService.class).merge(getEntity(), true);
42
	}
43

    
44
	@Override
45
	protected String getEntityName() {
46
		return "Person";
47
	}
48
}
(15-15/26)