Project

General

Profile

« Previous | Next » 

Revision bdd76634

Added by Patrick Plitzner almost 4 years ago

Rename vocabulary wizard

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewFeatureVocabularyWizard.java
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
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewVocabularyWizard.java
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 NewVocabularyWizard  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
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TermVocabularySelectionDialog.java
16 16
import eu.etaxonomy.cdm.api.service.IVocabularyService;
17 17
import eu.etaxonomy.cdm.model.common.TermVocabulary;
18 18
import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
19
import eu.etaxonomy.taxeditor.newWizard.NewVocabularyWizard;
19
import eu.etaxonomy.taxeditor.newWizard.NewFeatureVocabularyWizard;
20 20
import eu.etaxonomy.taxeditor.store.CdmStore;
21 21

  
22 22
/**
......
68 68

  
69 69
	@Override
70 70
	protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {
71
        return new NewVocabularyWizard();
71
        return new NewFeatureVocabularyWizard();
72 72
	}
73 73

  
74 74
}

Also available in: Unified diff