Search in sources :

Example 1 with V3Templates

use of org.ovirt.engine.api.v3.types.V3Templates in project ovirt-engine by oVirt.

the class V3TemplatesServer method list.

@GET
public V3Templates list() {
    V3Templates templates = adaptList(getDelegate()::list);
    templates.getTemplates().forEach(V3TemplateHelper::addDisksLink);
    return templates;
}
Also used : V3TemplateHelper(org.ovirt.engine.api.v3.helpers.V3TemplateHelper) V3Templates(org.ovirt.engine.api.v3.types.V3Templates) GET(javax.ws.rs.GET)

Example 2 with V3Templates

use of org.ovirt.engine.api.v3.types.V3Templates in project ovirt-engine by oVirt.

the class V3TemplatesInAdapter method adapt.

@Override
public Templates adapt(V3Templates from) {
    Templates to = new Templates();
    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.getTemplates().addAll(adaptIn(from.getTemplates()));
    return to;
}
Also used : Templates(org.ovirt.engine.api.model.Templates) V3Templates(org.ovirt.engine.api.v3.types.V3Templates)

Example 3 with V3Templates

use of org.ovirt.engine.api.v3.types.V3Templates in project ovirt-engine by oVirt.

the class V3TemplatesOutAdapter method adapt.

@Override
public V3Templates adapt(Templates from) {
    V3Templates to = new V3Templates();
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetActive()) {
        to.setActive(from.getActive());
    }
    if (from.isSetSize()) {
        to.setSize(from.getSize());
    }
    if (from.isSetTotal()) {
        to.setTotal(from.getTotal());
    }
    to.getTemplates().addAll(adaptOut(from.getTemplates()));
    return to;
}
Also used : V3Templates(org.ovirt.engine.api.v3.types.V3Templates)

Aggregations

V3Templates (org.ovirt.engine.api.v3.types.V3Templates)3 GET (javax.ws.rs.GET)1 Templates (org.ovirt.engine.api.model.Templates)1 V3TemplateHelper (org.ovirt.engine.api.v3.helpers.V3TemplateHelper)1