use of org.ovirt.engine.core.common.queries.GetVmIconDefaultParameters in project ovirt-engine by oVirt.
the class BackendOperatingSystemResource method get.
@Override
public OperatingSystemInfo get() {
OsRepository repository = SimpleDependencyInjector.getInstance().get(OsRepository.class);
OperatingSystemInfo model = new OperatingSystemInfo();
model.setId(id);
Integer key = Integer.valueOf(id);
String uniqueName = repository.getUniqueOsNames().get(key);
if (uniqueName == null) {
return notFound();
}
model.setName(uniqueName);
String name = repository.getOsNames().get(key);
if (name != null) {
model.setDescription(name);
}
final VmIconDefault vmIconDefault = getEntity(VmIconDefault.class, QueryType.GetVmIconDefault, new GetVmIconDefaultParameters(key), "VmIconDefault");
if (vmIconDefault != null) {
model.setSmallIcon(IconHelper.createIcon(vmIconDefault.getSmallIconId()));
model.setLargeIcon(IconHelper.createIcon(vmIconDefault.getLargeIconId()));
}
return addLinks(model);
}
Aggregations