use of org.ovirt.engine.core.common.queries.SearchParameters in project ovirt-engine by oVirt.
the class TemplateListModel method syncSearch.
@Override
protected void syncSearch() {
SearchParameters tempVar = new SearchParameters(applySortOptions(getSearchString()), SearchType.VmTemplate, isCaseSensitiveSearch());
tempVar.setMaxCount(getSearchPageSize());
super.syncSearch(QueryType.Search, tempVar);
}
use of org.ovirt.engine.core.common.queries.SearchParameters in project ovirt-engine by oVirt.
the class UserListModel method syncSearch.
@Override
protected void syncSearch() {
SearchParameters tempVar = new SearchParameters(applySortOptions(getModifiedSearchString()), SearchType.DBUser, isCaseSensitiveSearch());
tempVar.setMaxCount(getSearchPageSize());
super.syncSearch(QueryType.Search, tempVar);
}
use of org.ovirt.engine.core.common.queries.SearchParameters in project ovirt-engine by oVirt.
the class ImportTemplateModel method init.
public void init(final Collection<VmTemplate> externalTemplates, final Guid storageDomainId) {
Frontend.getInstance().runQuery(QueryType.Search, new SearchParameters(createSearchPattern(externalTemplates), SearchType.VmTemplate), new AsyncQuery<>(new AsyncCallback<QueryReturnValue>() {
@Override
public void onSuccess(QueryReturnValue returnValue) {
UIConstants constants = ConstantsManager.getInstance().getConstants();
List<VmTemplate> vmtList = returnValue.getReturnValue();
List<ImportTemplateData> templateDataList = new ArrayList<>();
for (VmTemplate template : externalTemplates) {
ImportTemplateData templateData = new ImportTemplateData(template);
boolean templateExistsInSystem = vmtList.contains(template);
templateData.setExistsInSystem(templateExistsInSystem);
if (templateExistsInSystem) {
templateData.enforceClone(constants.importTemplateThatExistsInSystemMustClone());
} else if (!template.isBaseTemplate() && findAnyVmTemplateById(vmtList, template.getBaseTemplateId()) == null) {
templateData.enforceClone(constants.importTemplateWithoutBaseMustClone());
}
templateDataList.add(templateData);
}
setItems(templateDataList);
withDataCenterLoaded(storageDomainId, r -> doInit());
}
private VmTemplate findAnyVmTemplateById(List<VmTemplate> vmtList, Guid templateId) {
for (VmTemplate vmt : vmtList) {
if (templateId.equals(vmt.getId())) {
return vmt;
}
}
return null;
}
}));
}
use of org.ovirt.engine.core.common.queries.SearchParameters in project ovirt-engine by oVirt.
the class DataCenterGuideModel method updateOptionsLocalFSData.
private void updateOptionsLocalFSData() {
AsyncDataProvider.getInstance().getClusterList(new AsyncQuery<>(returnValue -> {
clusters = returnValue;
updateOptionsLocalFS();
}), getEntity().getId());
Frontend.getInstance().runQuery(QueryType.Search, new SearchParameters(// $NON-NLS-1$
"Hosts: datacenter!= " + getEntity().getName() + " status=maintenance or status=pendingapproval ", // $NON-NLS-1$
SearchType.VDS), new AsyncQuery<QueryReturnValue>(returnValue -> {
List<VDS> hosts = returnValue.getReturnValue();
if (hosts == null) {
hosts = new ArrayList<>();
}
allHosts = hosts;
AsyncDataProvider.getInstance().getLocalStorageHost(new AsyncQuery<>(retVal -> {
if (retVal != null) {
localStorageHost = retVal;
} else {
noLocalStorageHost = true;
}
updateOptionsLocalFS();
}), getEntity().getName());
}));
}
use of org.ovirt.engine.core.common.queries.SearchParameters in project ovirt-engine by oVirt.
the class DataCenterListModel method syncSearch.
@Override
protected void syncSearch() {
SearchParameters tempVar = new SearchParameters(applySortOptions(getSearchString()), SearchType.StoragePool, isCaseSensitiveSearch());
tempVar.setMaxCount(getSearchPageSize());
super.syncSearch(QueryType.Search, tempVar);
}
Aggregations