Revert some changes to allow compilation. Needs to be fixed ASAP
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / newWizard / NewTeamWizard.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.taxeditor.newWizard;
12
13 import eu.etaxonomy.cdm.api.service.IAgentService;
14 import eu.etaxonomy.cdm.model.agent.Team;
15 import eu.etaxonomy.taxeditor.store.CdmStore;
16 import eu.etaxonomy.taxeditor.ui.section.agent.TeamWizardPage;
17
18 /**
19 * <p>NewTeamWizard class.</p>
20 *
21 * @author n.hoffmann
22 * @created Jun 1, 2010
23 * @version 1.0
24 */
25 public class NewTeamWizard extends AbstractNewEntityWizard<Team> {
26
27
28 public NewTeamWizard() {}
29
30 public NewTeamWizard(boolean b) {
31 //FIXME somethings needs to be done here
32 }
33
34 /** {@inheritDoc} */
35 @Override
36 public void addPages() {
37 addPage(new TeamWizardPage(formFactory, getConversationHolder(), getEntity()));
38 }
39
40 /* (non-Javadoc)
41 * @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#createNewEntity()
42 */
43 /** {@inheritDoc} */
44 @Override
45 protected Team createNewEntity() {
46 return Team.NewInstance();
47 }
48
49 /** {@inheritDoc} */
50 @Override
51 protected void saveEntity() {
52 if(CdmStore.getCurrentSessionManager().isRemoting()) {
53 CdmStore.getService(IAgentService.class).merge(getEntity(), true);
54 } else {
55 CdmStore.getService(IAgentService.class).save(getEntity());
56 }
57 }
58
59 @Override
60 protected String getEntityName() {
61 return "Team";
62 }
63 }