Search in sources :

Example 1 with V3SpecialObjects

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

the class V3SpecialObjectsOutAdapter method adapt.

@Override
public V3SpecialObjects adapt(SpecialObjects from) {
    V3SpecialObjects to = new V3SpecialObjects();
    Template blankTemplate = from.getBlankTemplate();
    if (blankTemplate != null) {
        V3Link blankTemplateLink = new V3Link();
        blankTemplateLink.setRel("templates/blank");
        blankTemplateLink.setHref(blankTemplate.getHref());
        to.getLinks().add(blankTemplateLink);
    }
    Tag rootTag = from.getRootTag();
    if (rootTag != null) {
        V3Link rootTagLink = new V3Link();
        rootTagLink.setRel("tags/root");
        rootTagLink.setHref(rootTag.getHref());
        to.getLinks().add(rootTagLink);
    }
    return to;
}
Also used : V3Link(org.ovirt.engine.api.v3.types.V3Link) V3SpecialObjects(org.ovirt.engine.api.v3.types.V3SpecialObjects) Tag(org.ovirt.engine.api.model.Tag) Template(org.ovirt.engine.api.model.Template)

Aggregations

Tag (org.ovirt.engine.api.model.Tag)1 Template (org.ovirt.engine.api.model.Template)1 V3Link (org.ovirt.engine.api.v3.types.V3Link)1 V3SpecialObjects (org.ovirt.engine.api.v3.types.V3SpecialObjects)1