use of org.ovirt.engine.core.common.queries.QueryParametersBase in project ovirt-engine by oVirt.
the class AsyncDataProvider method isOvirtCockpitSSOStarted.
public static void isOvirtCockpitSSOStarted(AsyncQuery<Boolean> aQuery) {
aQuery.converterCallback = new DefaultValueConverter<>(Boolean.FALSE);
Frontend.getInstance().runQuery(QueryType.IsOvirtCockpitSSOStarted, new QueryParametersBase(), aQuery);
}
use of org.ovirt.engine.core.common.queries.QueryParametersBase in project ovirt-engine by oVirt.
the class AsyncDataProvider method getClustersHavingHosts.
public void getClustersHavingHosts(AsyncQuery<List<Cluster>> aQuery) {
aQuery.converterCallback = new SortListByNameConverter<>();
Frontend.getInstance().runQuery(QueryType.GetAllClustersHavingHosts, new QueryParametersBase(), aQuery);
}
use of org.ovirt.engine.core.common.queries.QueryParametersBase in project ovirt-engine by oVirt.
the class AsyncDataProvider method getRootTag.
public void getRootTag(AsyncQuery<Tags> aQuery) {
aQuery.converterCallback = source -> {
if (source != null) {
Tags tag = (Tags) source;
Tags root = new Tags(tag.getDescription(), tag.getParentId(), tag.getIsReadonly(), tag.getTagId(), tag.getTagName());
if (tag.getChildren() != null) {
fillTagsRecursive(root, tag.getChildren());
}
return root;
}
return new Tags();
};
Frontend.getInstance().runQuery(QueryType.GetRootTag, new QueryParametersBase(), aQuery);
}
use of org.ovirt.engine.core.common.queries.QueryParametersBase in project ovirt-engine by oVirt.
the class AsyncDataProvider method getEntitiesNameMap.
public void getEntitiesNameMap(AsyncQuery<Map<Guid, String>> aQuery) {
aQuery.converterCallback = new MapConverter<>();
Frontend.getInstance().runQuery(QueryType.GetEntitiesNameMap, new QueryParametersBase(), aQuery);
}
use of org.ovirt.engine.core.common.queries.QueryParametersBase in project ovirt-engine by oVirt.
the class AsyncDataProvider method initCpuMap.
private void initCpuMap() {
cpuMap = new HashMap<>();
final List<QueryType> queryTypes = new ArrayList<>();
final List<QueryParametersBase> queryParams = new ArrayList<>();
for (Version version : Version.ALL) {
queryTypes.add(QueryType.GetAllServerCpuList);
queryParams.add(new GetAllServerCpuListParameters(version));
}
final IFrontendMultipleQueryAsyncCallback callback = result -> {
for (int i = 0; i < result.getReturnValues().size(); i++) {
final List<ServerCpu> cpus = result.getReturnValues().get(i).getReturnValue();
final Version version = ((GetAllServerCpuListParameters) result.getParameters().get(i)).getVersion();
initCpuMapForVersion(version, cpus);
}
};
Frontend.getInstance().runMultipleQueries(queryTypes, queryParams, callback);
}
Aggregations