Search in sources :

Example 1 with V3Groups

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

the class V3UserOutAdapter method adapt.

@Override
public V3User adapt(User from) {
    V3User to = new V3User();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDepartment()) {
        to.setDepartment(from.getDepartment());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetDomain()) {
        to.setDomain(adaptOut(from.getDomain()));
    }
    if (from.isSetDomainEntryId()) {
        to.setDomainEntryId(from.getDomainEntryId());
    }
    if (from.isSetEmail()) {
        to.setEmail(from.getEmail());
    }
    if (from.isSetGroups()) {
        to.setGroups(new V3Groups());
        to.getGroups().getGroups().addAll(adaptOut(from.getGroups().getGroups()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetLastName()) {
        to.setLastName(from.getLastName());
    }
    if (from.isSetLoggedIn()) {
        to.setLoggedIn(from.isLoggedIn());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetNamespace()) {
        to.setNamespace(from.getNamespace());
    }
    if (from.isSetPassword()) {
        to.setPassword(from.getPassword());
    }
    if (from.isSetPrincipal()) {
        to.setPrincipal(from.getPrincipal());
    }
    if (from.isSetRoles()) {
        to.setRoles(new V3Roles());
        to.getRoles().getRoles().addAll(adaptOut(from.getRoles().getRoles()));
    }
    if (from.isSetUserName()) {
        to.setUserName(from.getUserName());
    }
    return to;
}
Also used : V3Groups(org.ovirt.engine.api.v3.types.V3Groups) V3Roles(org.ovirt.engine.api.v3.types.V3Roles) V3User(org.ovirt.engine.api.v3.types.V3User)

Example 2 with V3Groups

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

the class V3GroupsInAdapter method adapt.

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

Example 3 with V3Groups

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

the class V3GroupsOutAdapter method adapt.

@Override
public V3Groups adapt(Groups from) {
    V3Groups to = new V3Groups();
    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.getGroups().addAll(adaptOut(from.getGroups()));
    return to;
}
Also used : V3Groups(org.ovirt.engine.api.v3.types.V3Groups)

Aggregations

V3Groups (org.ovirt.engine.api.v3.types.V3Groups)3 Groups (org.ovirt.engine.api.model.Groups)1 V3Roles (org.ovirt.engine.api.v3.types.V3Roles)1 V3User (org.ovirt.engine.api.v3.types.V3User)1