Project

General

Profile

Download (1.39 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.IGroupService;
13
import eu.etaxonomy.cdm.model.common.Group;
14
import eu.etaxonomy.taxeditor.store.CdmStore;
15
import eu.etaxonomy.taxeditor.ui.section.group.GroupDetailWizardPage;
16

    
17
/**
18
 * @author n.hoffmann
19
 * @created Mar 10, 2011
20
 * @version 1.0
21
 */
22
public class NewGroupWizard extends AbstractNewEntityWizard<Group> {
23

    
24
	private GroupDetailWizardPage groupPage;
25

    
26
	/* (non-Javadoc)
27
	 * @see org.eclipse.jface.wizard.Wizard#addPages()
28
	 */
29
	@Override
30
	public void addPages() {
31
		groupPage = new GroupDetailWizardPage(formFactory, getConversationHolder(), getEntity());
32
		super.addPage(groupPage);
33
	}
34

    
35
	/* (non-Javadoc)
36
	 * @see eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard#saveEntity()
37
	 */
38
	@Override
39
	protected void saveEntity() {
40
	    CdmStore.getService(IGroupService.class).merge(getEntity(), true);
41
	   
42
	}
43

    
44
	/* (non-Javadoc)
45
	 * @see eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard#createNewEntity()
46
	 */
47
	@Override
48
	protected Group createNewEntity() {
49
		return Group.NewInstance();
50
	}
51

    
52
	@Override
53
	protected String getEntityName() {
54
		return "Group";
55
	}
56

    
57
}
(12-12/27)