use of com.sequenceiq.cloudbreak.domain.SmartSenseSubscription in project cloudbreak by hortonworks.
the class SmartsenseConfigurationLocatorTest method before.
@Before
public void before() {
SmartSenseSubscription smartSenseSubscription = new SmartSenseSubscription();
smartSenseSubscription.setSubscriptionId(smartsenseId);
defaultSmartsenseSubscription = Optional.of(smartSenseSubscription);
}
use of com.sequenceiq.cloudbreak.domain.SmartSenseSubscription in project cloudbreak by hortonworks.
the class TestUtil method smartSenseSubscription.
public static SmartSenseSubscription smartSenseSubscription() {
SmartSenseSubscription smartSenseSubscription = new SmartSenseSubscription();
smartSenseSubscription.setSubscriptionId("1234-1234-1234-1244");
smartSenseSubscription.setAccount("hortonworks");
smartSenseSubscription.setOwner("hwx-user");
smartSenseSubscription.setPublicInAccount(false);
smartSenseSubscription.setId(1L);
return smartSenseSubscription;
}
use of com.sequenceiq.cloudbreak.domain.SmartSenseSubscription in project cloudbreak by hortonworks.
the class FlexSubscriptionRequestToFlexSubscriptionConverter method convert.
@Override
public FlexSubscription convert(FlexSubscriptionRequest source) {
FlexSubscription subscription = new FlexSubscription();
subscription.setName(source.getName());
subscription.setSubscriptionId(source.getSubscriptionId());
subscription.setDefault(source.getUsedAsDefault());
subscription.setUsedForController(source.isUsedForController());
Long smartSenseSubscriptionId = source.getSmartSenseSubscriptionId();
try {
SmartSenseSubscription smartSenseSubscription = smartSenseSubscriptionService.findOneById(smartSenseSubscriptionId);
subscription.setSmartSenseSubscription(smartSenseSubscription);
} catch (NotFoundException ignored) {
throw new BadRequestException("SmartSense subscription could not be found with id: " + smartSenseSubscriptionId);
}
return subscription;
}
use of com.sequenceiq.cloudbreak.domain.SmartSenseSubscription in project cloudbreak by hortonworks.
the class SmartSenseSubscriptionRequestToSmartSenseSubscriptionConverter method convert.
@Override
public SmartSenseSubscription convert(SmartSenseSubscriptionJson source) {
SmartSenseSubscription obj = new SmartSenseSubscription();
obj.setSubscriptionId(source.getSubscriptionId());
return obj;
}
use of com.sequenceiq.cloudbreak.domain.SmartSenseSubscription in project cloudbreak by hortonworks.
the class SmartSenseSubscriptionControllerTest method createSmartSenseSubscription.
private SmartSenseSubscription createSmartSenseSubscription() {
SmartSenseSubscription subscription = new SmartSenseSubscription();
subscription.setSubscriptionId("A-99900000-C-00000000");
subscription.setAccount("account id");
subscription.setOwner("user id");
subscription.setPublicInAccount(true);
return subscription;
}
Aggregations