1
|
/**
|
2
|
* Copyright (C) 2017 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.cdm.vaadin.view.distributionStatus.settings;
|
10
|
|
11
|
import java.util.Arrays;
|
12
|
import java.util.List;
|
13
|
|
14
|
import com.vaadin.data.Container;
|
15
|
import com.vaadin.data.util.IndexedContainer;
|
16
|
|
17
|
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
|
18
|
import eu.etaxonomy.cdm.model.common.TermType;
|
19
|
import eu.etaxonomy.cdm.vaadin.util.CdmSpringContextHelper;
|
20
|
|
21
|
/**
|
22
|
* @author a.mueller
|
23
|
* @date 22.10.2017
|
24
|
*
|
25
|
*/
|
26
|
public class DistributionStatusSettingsPresenter extends SettingsPresenterBase {
|
27
|
|
28
|
private Container distributionStatusContainer;
|
29
|
|
30
|
/**
|
31
|
* @param distributionStatusContainer
|
32
|
*/
|
33
|
public DistributionStatusSettingsPresenter() {
|
34
|
super();
|
35
|
distributionStatusContainer = new IndexedContainer(getPresenceAbsenceVocabulary());
|
36
|
}
|
37
|
|
38
|
private List<DefinedTermBase<?>> getPresenceAbsenceVocabulary(){
|
39
|
return CdmSpringContextHelper.getTermService().listByTermType(
|
40
|
TermType.PresenceAbsenceTerm, null, null, null, DESCRIPTION_INIT_STRATEGY);
|
41
|
}
|
42
|
|
43
|
|
44
|
public Container getDistributionStatusContainer() {
|
45
|
return distributionStatusContainer;
|
46
|
}
|
47
|
|
48
|
protected static final List<String> DESCRIPTION_INIT_STRATEGY = Arrays.asList(new String []{
|
49
|
"$",
|
50
|
"representations",
|
51
|
});
|
52
|
}
|