Revision 44bc51cb
Added by Katja Luther about 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/StatusComboBoxDataProvider.java | ||
---|---|---|
14 | 14 |
import java.util.List; |
15 | 15 |
import java.util.UUID; |
16 | 16 |
|
17 |
import org.apache.commons.lang.StringUtils; |
|
17 | 18 |
import org.eclipse.nebula.widgets.nattable.edit.editor.IComboBoxDataProvider; |
18 | 19 |
|
19 | 20 |
import eu.etaxonomy.cdm.model.common.DefinedTermBase; |
... | ... | |
52 | 53 |
noneTerm.addRepresentation(Representation.NewInstance(" - ", " ", " ", CdmStore.getDefaultLanguage())); |
53 | 54 |
inputAll.add(noneTerm); |
54 | 55 |
String statusString = PreferencesUtil.getStringValue(PreferencePredicate.AvailableDistributionStatus.getKey()); |
55 |
String [] statusArray = statusString.split(";"); |
|
56 |
List<UUID> uuidList = new ArrayList(); |
|
57 |
for (String status: statusArray){ |
|
58 |
uuidList.add(UUID.fromString(status)); |
|
59 |
} |
|
56 |
List<PresenceAbsenceTerm> inputList; |
|
57 |
if (!StringUtils.isBlank(statusString)){ |
|
58 |
|
|
59 |
String [] statusArray = statusString.split(";"); |
|
60 |
List<UUID> uuidList = new ArrayList(); |
|
61 |
for (String status: statusArray){ |
|
62 |
uuidList.add(UUID.fromString(status)); |
|
63 |
} |
|
64 |
|
|
65 |
inputList = CdmStore.getTermManager().getTerms(uuidList, PresenceAbsenceTerm.class); |
|
66 |
}else{ |
|
60 | 67 |
|
61 |
List<PresenceAbsenceTerm> inputList = CdmStore.getTermManager().getTerms(uuidList, PresenceAbsenceTerm.class); |
|
62 |
if (uuidList.isEmpty()){ |
|
63 | 68 |
inputList = CdmStore.getTermManager().getPreferredTerms(PresenceAbsenceTerm.class); |
64 | 69 |
} |
65 | 70 |
Comparator<DefinedTermBase> comp = new OrderedTermComparator<>(); |
Also available in: Unified diff
minor