use of com.blackducksoftware.integration.phonehome.PhoneHomeRequestBodyBuilder in project hub-alert by blackducksoftware.
the class DailyItemReader method phoneHome.
private PhoneHomeResponse phoneHome() {
final String productVersion = globalProperties.getProductVersion();
if (!GlobalProperties.PRODUCT_VERSION_UNKNOWN.equals(productVersion)) {
final HubServicesFactory hubServicesFactory = globalProperties.createHubServicesFactoryAndLogErrors(logger);
final PhoneHomeService phoneHomeService = hubServicesFactory.createPhoneHomeService();
final PhoneHomeRequestBodyBuilder phoneHomeRequestBodyBuilder = phoneHomeService.createInitialPhoneHomeRequestBodyBuilder(ThirdPartyName.ALERT, productVersion, productVersion);
final PhoneHomeRequestBody phoneHomeRequestBody = phoneHomeRequestBodyBuilder.build();
return phoneHomeService.startPhoneHome(phoneHomeRequestBody);
} else {
return null;
}
}
Aggregations