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.Team;
|
14
|
import eu.etaxonomy.taxeditor.store.CdmStore;
|
15
|
import eu.etaxonomy.taxeditor.ui.section.agent.TeamWizardPage;
|
16
|
|
17
|
/**
|
18
|
* <p>NewTeamWizard class.</p>
|
19
|
*
|
20
|
* @author n.hoffmann
|
21
|
* @created Jun 1, 2010
|
22
|
* @version 1.0
|
23
|
*/
|
24
|
public class NewTeamWizard extends AbstractNewEntityWizard<Team> {
|
25
|
|
26
|
private boolean isNomenclaturalTeam = false;
|
27
|
|
28
|
public NewTeamWizard() {}
|
29
|
|
30
|
public NewTeamWizard(boolean b) {
|
31
|
setNomenclaturalTeam(b);
|
32
|
}
|
33
|
|
34
|
/** {@inheritDoc} */
|
35
|
@Override
|
36
|
public void addPages() {
|
37
|
addPage(new TeamWizardPage(formFactory, getConversationHolder(), getEntity(), isNomenclaturalTeam));
|
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
|
CdmStore.getService(IAgentService.class).merge(getEntity(), true);
|
53
|
|
54
|
}
|
55
|
|
56
|
@Override
|
57
|
protected String getEntityName() {
|
58
|
return "Team";
|
59
|
}
|
60
|
|
61
|
/**
|
62
|
* @return the isNomenclaturalTeam
|
63
|
*/
|
64
|
public boolean isNomenclaturalTeam() {
|
65
|
return isNomenclaturalTeam;
|
66
|
}
|
67
|
|
68
|
/**
|
69
|
* @param isNomenclaturalTeam the isNomenclaturalTeam to set
|
70
|
*/
|
71
|
public void setNomenclaturalTeam(boolean isNomenclaturalTeam) {
|
72
|
this.isNomenclaturalTeam = isNomenclaturalTeam;
|
73
|
}
|
74
|
}
|