use of org.ovirt.engine.core.common.queries.QueryParametersBase in project ovirt-engine by oVirt.
the class AsyncDataProvider method getRoleList.
public void getRoleList(AsyncQuery<List<Role>> aQuery) {
aQuery.converterCallback = new ListConverter<>();
Frontend.getInstance().runQuery(QueryType.GetAllRoles, new QueryParametersBase(), aQuery);
}
use of org.ovirt.engine.core.common.queries.QueryParametersBase in project ovirt-engine by oVirt.
the class AsyncDataProvider method getClusterList.
public void getClusterList(AsyncQuery aQuery, boolean doRefresh) {
aQuery.converterCallback = new SortListByNameConverter<>();
Frontend.getInstance().runQuery(QueryType.GetAllClusters, doRefresh ? new QueryParametersBase() : new QueryParametersBase().withoutRefresh(), aQuery);
}
use of org.ovirt.engine.core.common.queries.QueryParametersBase in project ovirt-engine by oVirt.
the class AsyncDataProvider method cacheConfigValues.
/**
* Cache configuration values [raw (not converted) values from vdc_options table].
*/
private void cacheConfigValues(AsyncQuery<Map<KeyValuePairCompat<ConfigValues, String>, Object>> aQuery) {
aQuery.converterCallback = returnValue -> {
if (returnValue != null) {
cachedConfigValuesPreConvert.putAll((HashMap<KeyValuePairCompat<ConfigValues, String>, Object>) returnValue);
}
return cachedConfigValuesPreConvert;
};
Frontend.getInstance().runQuery(QueryType.GetConfigurationValues, new QueryParametersBase(), aQuery);
}
use of org.ovirt.engine.core.common.queries.QueryParametersBase in project ovirt-engine by oVirt.
the class AsyncDataProvider method initMigrationPolicies.
private void initMigrationPolicies() {
AsyncQuery<Map<Version, List<MigrationPolicy>>> aQuery = new AsyncQuery<>(returnValue -> migrationPoliciesByVersion = returnValue);
aQuery.converterCallback = returnValue -> {
if (returnValue == null) {
return new HashMap<>();
}
Map<Version, List<MigrationPolicy>> policiesByVersion = (Map<Version, List<MigrationPolicy>>) returnValue;
for (List<MigrationPolicy> policies : policiesByVersion.values()) {
Collections.sort(policies, Comparator.comparing((MigrationPolicy m) -> !NoMigrationPolicy.ID.equals(m.getId())).thenComparing(MigrationPolicy::getName));
}
return policiesByVersion;
};
Frontend.getInstance().runQuery(QueryType.GetAllMigrationPolicies, new QueryParametersBase(), aQuery);
}
use of org.ovirt.engine.core.common.queries.QueryParametersBase in project ovirt-engine by oVirt.
the class AsyncDataProvider method getIsPasswordDelegationPossible.
public void getIsPasswordDelegationPossible(AsyncQuery<Boolean> asyncQuery) {
asyncQuery.converterCallback = new CastingConverter<>();
Frontend.getInstance().runQuery(QueryType.IsPasswordDelegationPossible, new QueryParametersBase(), asyncQuery);
}
Aggregations