Project

General

Profile

« Previous | Next » 

Revision 0fe2112f

Added by Patrick Plitzner almost 8 years ago

Implement taxon node container to be used in selection view and settings
window #5458

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/presenter/dbstatus/settings/SettingsPresenter.java
33 33
 */
34 34
public class SettingsPresenter {
35 35

  
36
    private Container classificationContainer;
37 36
    private Container distributionContainer;
38 37
    private Container distributionStatusContainer;
39 38
    private IVocabularyService vocabularyService;
......
53 52
        taxonNodeService = CdmSpringContextHelper.getTaxonNodeService();
54 53
        taxonNodeUuid = UUID.fromString(VaadinSession.getCurrent().getAttribute("taxonNodeUUID").toString());
55 54
        termUUID = UUID.fromString(VaadinSession.getCurrent().getAttribute("selectedTerm").toString());
56
        classificationContainer = new IndexedContainer(getClassificationList());
57 55
        distributionContainer = new IndexedContainer(getNamedAreaList());
58 56
        distributionStatusContainer = new IndexedContainer(getPresenceAbsenceVocabulary());
59 57
    }
60 58

  
61
    public TaxonNode getChosenClassification(){
59
    public TaxonNode getChosenTaxonNode(){
62 60
        return taxonNodeService.load(taxonNodeUuid);
63 61
    }
64 62

  
......
66 64
        return vocabularyService.load(termUUID);
67 65
    }
68 66

  
69
    public Container getClassificationContainer() {
70
        return classificationContainer;
71
    }
72
    public void setClassificationContainer(Container classificationContainer) {
73
        this.classificationContainer = classificationContainer;
74
    }
75 67
    public Container getDistributionContainer() {
76 68
        return distributionContainer;
77 69
    }
......
85 77
        this.distributionStatusContainer = distributionStatusContainer;
86 78
    }
87 79

  
88
    private List<TaxonNode> getClassificationList() {
89
        List<TaxonNode> classificationList = taxonNodeService.loadChildNodesOfTaxonNode(getChosenClassification(), null, true, null);
90
        classificationList.add(getChosenClassification());
91
        return classificationList;
92
    }
93

  
94

  
95 80
    private List<TermVocabulary<DefinedTermBase>> getNamedAreaList() {
96 81

  
97 82
        vocabularyService = CdmSpringContextHelper.getVocabularyService();

Also available in: Unified diff