Project

General

Profile

Download (1.38 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2014 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
package eu.etaxonomy.taxeditor.newWizard;
10

    
11
import eu.etaxonomy.cdm.api.service.IVocabularyService;
12
import eu.etaxonomy.cdm.model.common.TermType;
13
import eu.etaxonomy.cdm.model.common.TermVocabulary;
14
import eu.etaxonomy.taxeditor.store.CdmStore;
15

    
16
/**
17
 * @author pplitzner
18
 * @date 11.03.2014
19
 *
20
 */
21
public class NewFeatureVocabularyWizard  extends AbstractNewEntityWizard<TermVocabulary> {
22

    
23
    private VocabularyWizardPage vocabularyPage;
24

    
25
    @Override
26
    public void addPages() {
27
        vocabularyPage = new VocabularyWizardPage(formFactory, getConversationHolder(), getEntity());
28
        addPage(vocabularyPage);
29
    }
30

    
31
    @Override
32
    protected TermVocabulary createNewEntity() {
33
        return TermVocabulary.NewInstance(TermType.Feature);
34
    }
35

    
36
    @Override
37
    protected void saveEntity() {
38
       CdmStore.getService(IVocabularyService.class).merge(getEntity(),true);
39

    
40
    }
41

    
42
    @Override
43
    public void setEntity(TermVocabulary entity) {
44
        super.setEntity(entity);
45
        vocabularyPage.getDetailElement().setEntity(entity);
46
    }
47

    
48
    @Override
49
    protected String getEntityName() {
50
        return "Vocabulary";
51
    }
52
}
(10-10/27)