4 package eu
.etaxonomy
.taxeditor
.newWizard
;
6 import eu
.etaxonomy
.cdm
.api
.service
.IPolytomousKeyService
;
7 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKey
;
8 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
14 public class NewPolytomousKeyWizard
extends AbstractNewEntityWizard
<PolytomousKey
> {
16 private PolytomousKeyWizardPage polytomousKeyPage
;
19 public void addPages() {
20 polytomousKeyPage
= new PolytomousKeyWizardPage(formFactory
, getConversationHolder(), getEntity());
21 super.addPage(polytomousKeyPage
);
24 public String
getPolytomousKeyName() {
25 return polytomousKeyPage
.getPolytomousKeyName();
29 * @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#saveEntity()
32 protected void saveEntity() {
33 if(!polytomousKeyPage
.getPolytomousKeyName().equals("")) {
34 CdmStore
.getService(IPolytomousKeyService
.class).merge(getEntity());
39 * @see eu.etaxonomy.taxeditor.editor.newWizard.AbstractNewEntityWizard#createNewEntity()
42 protected PolytomousKey
createNewEntity() {
43 PolytomousKey pkey
= PolytomousKey
.NewInstance();
44 pkey
.setTitleCache("");
49 protected String
getEntityName() {
50 return "Polytomous Key";