public interface IXDataSourceOptions
XItem
, usually by custom widgets that extend XSelect
. By
default, the user can choose one of the available data sources for a select item in the Designer, but only when the
data source has not got any parameters. By implementing this interface, the user may select data sources with a
certain amount of parameters.Modifier and Type | Method and Description |
---|---|
Map<String,List<org.apache.commons.lang3.Range<Integer>>> |
getAllowedDataSourceParameterCount()
Use this method to indicate how many parameters each data source type must have in order to be selectable.
|
Map<String,List<org.apache.commons.lang3.Range<Integer>>> getAllowedDataSourceParameterCount()
@Override public Map<String, List<Range<Integer>>> getAllowedDataSourceParameterCount() { final Map<String, List<Range<Integer>>> ranges = new HashMap<>(); ranges.put(EDatasource.CSV.name(), Arrays.asList(Range.is(0))); ranges.put(EDatasource.DB.name(), Arrays.asList(Range.is(0))); ranges.put(EDatasource.PLUGIN.name(), Arrays.asList(Range.is(0))); return ranges; }
null
is returned, the defaults (which may change) are used. When a key for a data source
type is missing or is mapped to null
, no data sources of that type are selectable.Copyright © 2021 XIMA MEDIA GmbH. All rights reserved.