Search in sources :

Example 1 with UserViewV4Response

use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.views.UserViewV4Response in project cloudbreak by hortonworks.

the class UserViewToUserViewV4ResponseConverter method convert.

public UserViewV4Response convert(UserView source) {
    UserViewV4Response userViewResponse = new UserViewV4Response();
    userViewResponse.setUserId(source.getUserId());
    userViewResponse.setUserName(source.getUserName());
    userViewResponse.setUserCrn(source.getUserCrn());
    return userViewResponse;
}
Also used : UserViewV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.views.UserViewV4Response)

Example 2 with UserViewV4Response

use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.views.UserViewV4Response in project cloudbreak by hortonworks.

the class StackApiViewToStackViewV4ResponseConverter method addUser.

private void addUser(StackApiView source, StackViewV4Response stackJson) {
    if (source.getUserView() != null) {
        try {
            UserViewV4Response userViewResponse = userViewToUserViewV4ResponseConverter.convert(source.getUserView());
            stackJson.setUser(userViewResponse);
        } catch (Exception ex) {
            LOGGER.warn("User could not be added to stack response.", ex);
        }
    }
}
Also used : UserViewV4Response(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.views.UserViewV4Response)

Aggregations

UserViewV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.views.UserViewV4Response)2