use of org.ovirt.engine.core.common.VdcObjectType in project ovirt-engine by oVirt.
the class PermissionListModel method syncSearch.
@Override
protected void syncSearch() {
VdcObjectType objType = getObjectType();
GetPermissionsForObjectParameters tempVar = new GetPermissionsForObjectParameters();
tempVar.setObjectId(getEntityGuid());
tempVar.setVdcObjectType(objType);
tempVar.setDirectOnly(false);
tempVar.setRefresh(getIsQueryFirstTime());
tempVar.setAllUsersWithPermission(getAllUsersWithPermission());
super.syncSearch(QueryType.GetPermissionsForObject, tempVar);
}
use of org.ovirt.engine.core.common.VdcObjectType in project ovirt-engine by oVirt.
the class EditProviderModel method preSave.
@Override
protected void preSave() {
if (!stringsEqualIgnoreCase(getUrl().getEntity(), oldUrl)) {
ArrayList<QueryType> queryTypes = new ArrayList<>();
ArrayList<QueryParametersBase> queryParams = new ArrayList<>();
final Set<VdcObjectType> providedTypes = provider.getType().getProvidedTypes();
if (providedTypes.contains(VdcObjectType.Network)) {
queryTypes.add(QueryType.GetAllNetworksForProvider);
queryParams.add(new IdQueryParameters(provider.getId()));
}
if (!queryTypes.isEmpty()) {
startProgress();
Frontend.getInstance().runMultipleQueries(queryTypes, queryParams, result -> {
stopProgress();
Iterator<QueryReturnValue> i = result.getReturnValues().iterator();
if (providedTypes.contains(VdcObjectType.Network)) {
providedNetworks = i.next().getReturnValue();
}
showConfirmation();
});
return;
}
}
actualSave();
}
use of org.ovirt.engine.core.common.VdcObjectType in project ovirt-engine by oVirt.
the class StepDaoTest method prepareStartedStepsByStepSubjectEntityTest.
private StepSubjectEntity prepareStartedStepsByStepSubjectEntityTest() {
Guid entityId = Guid.newGuid();
VdcObjectType entityType = VdcObjectType.EXECUTION_HOST;
StepSubjectEntity subjectEntity = new StepSubjectEntity(FixturesTool.STEP_ID, entityType, entityId);
getStepSubjectEntityDao().saveAll(Arrays.asList(subjectEntity));
Step s = dao.get(FixturesTool.STEP_ID);
s.setStatus(JobExecutionStatus.STARTED);
dao.update(s);
return subjectEntity;
}
use of org.ovirt.engine.core.common.VdcObjectType in project ovirt-engine by oVirt.
the class StepDaoTest method prepareProgressTest.
private void prepareProgressTest(Guid entityId) {
VdcObjectType type = VdcObjectType.Disk;
BaseDisk diskImage = getDiskDao().get(entityId);
assertProgress(null, diskImage);
getStepSubjectEntityDao().saveAll(Arrays.asList(new StepSubjectEntity(FixturesTool.STEP_ID, type, entityId, 30), new StepSubjectEntity(FixturesTool.STEP_ID_2, type, entityId, 50)));
}
use of org.ovirt.engine.core.common.VdcObjectType in project ovirt-engine by oVirt.
the class JobRepositoryImpl method getJobWithSteps.
@Override
public Job getJobWithSteps(final Guid jobId) {
Job job = jobDao.get(jobId);
if (job != null) {
Map<Guid, VdcObjectType> jobSubjectEntity = jobSubjectEntityDao.getJobSubjectEntityByJobId(jobId);
job.setJobSubjectEntities(jobSubjectEntity);
loadJobSteps(job);
}
return job;
}
Aggregations