use of com.sequenceiq.cloudbreak.api.model.UserProfileResponse in project cloudbreak by hortonworks.
the class UserProfileToUserProfileResponseConverter method convert.
@Override
public UserProfileResponse convert(UserProfile entity) {
UserProfileResponse userProfileResponse = new UserProfileResponse();
userProfileResponse.setAccount(entity.getAccount());
userProfileResponse.setOwner(entity.getOwner());
if (entity.getCredential() != null) {
CredentialResponse credentialResponse = getConversionService().convert(entity.getCredential(), CredentialResponse.class);
userProfileResponse.setCredential(credentialResponse);
}
Map<String, Object> map = entity.getUiProperties().getMap();
userProfileResponse.setUiProperties(map == null ? new HashMap<>() : map);
return userProfileResponse;
}
Aggregations