ref #6190 removing svn property place holder in first line of code - java files
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / newWizard / NewInstitutionWizard.java
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.Institution;
14 import eu.etaxonomy.taxeditor.store.CdmStore;
15 import eu.etaxonomy.taxeditor.ui.section.agent.InstitutionWizardPage;
16
17 /**
18 * @author n.hoffmann
19 * @created Dec 15, 2010
20 * @version 1.0
21 */
22 public class NewInstitutionWizard extends AbstractNewEntityWizard<Institution> {
23
24 /* (non-Javadoc)
25 * @see org.eclipse.jface.wizard.Wizard#addPages()
26 */
27 @Override
28 public void addPages() {
29 addPage(new InstitutionWizardPage(formFactory, getConversationHolder(), getEntity()));
30 }
31
32 /* (non-Javadoc)
33 * @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#saveEntity()
34 */
35 @Override
36 protected void saveEntity() {
37 CdmStore.getService(IAgentService.class).merge(getEntity(), true);
38 }
39
40 /* (non-Javadoc)
41 * @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#createNewEntity()
42 */
43 @Override
44 protected Institution createNewEntity() {
45 return Institution.NewInstance();
46 }
47
48 @Override
49 protected String getEntityName() {
50 return "Institution";
51 }
52
53 }