use of org.ovirt.engine.api.model.Filters in project ovirt-engine by oVirt.
the class BackendFiltersResource method list.
@Override
public Filters list() {
ClusterPolicy clusterPolicy = getClusterPolicy();
Filters filters = new Filters();
if (clusterPolicy.getFilters() != null) {
for (Guid filterGuid : clusterPolicy.getFilters()) {
Filter filter = new Filter();
filter.setId(filterGuid.toString());
filters.getFilters().add(addLinks(map(clusterPolicy, filter)));
}
}
return filters;
}
use of org.ovirt.engine.api.model.Filters in project ovirt-engine by oVirt.
the class V3FiltersInAdapter method adapt.
@Override
public Filters adapt(V3Filters from) {
Filters to = new Filters();
if (from.isSetActions()) {
to.setActions(adaptIn(from.getActions()));
}
if (from.isSetActive()) {
to.setActive(from.getActive());
}
if (from.isSetSize()) {
to.setSize(from.getSize());
}
if (from.isSetTotal()) {
to.setTotal(from.getTotal());
}
to.getFilters().addAll(adaptIn(from.getFilters()));
return to;
}
Aggregations