Search in sources :

Example 1 with WanDisableEffects

use of org.ovirt.engine.core.common.console.ConsoleOptions.WanDisableEffects in project ovirt-engine by oVirt.

the class AsyncDataProvider method getWANDisableEffects.

public void getWANDisableEffects(AsyncQuery<List<WanDisableEffects>> aQuery) {
    aQuery.converterCallback = source -> {
        if (source == null) {
            return new ArrayList<>();
        }
        List<WanDisableEffects> res = new ArrayList<>();
        String fromDb = (String) source;
        for (String value : fromDb.split(",")) {
            // $NON-NLS-1$
            if (value == null) {
                continue;
            }
            String trimmedValue = value.trim();
            if ("".equals(trimmedValue)) {
                continue;
            }
            res.add(WanDisableEffects.fromString(trimmedValue));
        }
        return res;
    };
    getConfigFromCache(new GetConfigurationValueParameters(ConfigValues.WANDisableEffects, getDefaultConfigurationVersion()), aQuery);
}
Also used : WanDisableEffects(org.ovirt.engine.core.common.console.ConsoleOptions.WanDisableEffects) GetConfigurationValueParameters(org.ovirt.engine.core.common.queries.GetConfigurationValueParameters) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 WanDisableEffects (org.ovirt.engine.core.common.console.ConsoleOptions.WanDisableEffects)1 GetConfigurationValueParameters (org.ovirt.engine.core.common.queries.GetConfigurationValueParameters)1