Search in sources :

Example 1 with V3Roles

use of org.ovirt.engine.api.v3.types.V3Roles 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 V3Roles

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

the class V3RolesInAdapter method adapt.

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

Example 3 with V3Roles

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

the class V3RolesOutAdapter method adapt.

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

Aggregations

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