use of com.sequenceiq.cloudbreak.api.model.FlexSubscriptionResponse in project cloudbreak by hortonworks.
the class FlexSubscriptionToJsonConverter method convert.
@Override
public FlexSubscriptionResponse convert(FlexSubscription source) {
FlexSubscriptionResponse json = new FlexSubscriptionResponse();
json.setId(source.getId());
json.setName(source.getName());
json.setOwner(source.getOwner());
json.setAccount(source.getAccount());
json.setPublicInAccount(source.isPublicInAccount());
json.setSubscriptionId(source.getSubscriptionId());
json.setSmartSenseSubscriptionId(source.getSmartSenseSubscription().getId());
SmartSenseSubscriptionJson smartSenseSubscriptionJson = smartSenseSubscriptionToSmartSenseSubscriptionJsonConverter.convert(source.getSmartSenseSubscription());
json.setSmartSenseSubscription(smartSenseSubscriptionJson);
json.setUsedAsDefault(source.isDefault());
json.setUsedForController(source.isUsedForController());
return json;
}
use of com.sequenceiq.cloudbreak.api.model.FlexSubscriptionResponse in project cloudbreak by hortonworks.
the class StackToStackResponseConverter method addFlexSubscription.
private void addFlexSubscription(StackResponse stackJson, Stack source) {
if (source.getFlexSubscription() != null) {
try {
FlexSubscriptionResponse flexSubscription = getConversionService().convert(source.getFlexSubscription(), FlexSubscriptionResponse.class);
stackJson.setFlexSubscription(flexSubscription);
} catch (Exception ex) {
LOGGER.warn("Flex subscription could not be added to stack response.", ex);
}
}
}
Aggregations