Search in sources :

Example 11 with Slf4jIntLogger

use of com.synopsys.integration.log.Slf4jIntLogger in project hub-alert by blackducksoftware.

the class JiraCloudProperties method createJiraServicesCloudFactory.

public JiraCloudServiceFactory createJiraServicesCloudFactory(Logger logger, Gson gson) throws IssueTrackerException {
    JiraCloudRestConfig jiraServerConfig = createJiraServerConfig();
    Slf4jIntLogger intLogger = new Slf4jIntLogger(logger);
    JiraHttpClient jiraHttpClient = jiraServerConfig.createJiraHttpClient(intLogger);
    return new JiraCloudServiceFactory(intLogger, jiraHttpClient, gson);
}
Also used : JiraHttpClient(com.synopsys.integration.jira.common.rest.JiraHttpClient) Slf4jIntLogger(com.synopsys.integration.log.Slf4jIntLogger) JiraCloudRestConfig(com.synopsys.integration.jira.common.cloud.configuration.JiraCloudRestConfig) JiraCloudServiceFactory(com.synopsys.integration.jira.common.cloud.service.JiraCloudServiceFactory)

Example 12 with Slf4jIntLogger

use of com.synopsys.integration.log.Slf4jIntLogger in project hub-alert by blackducksoftware.

the class BlackDuckNotificationRetrieverFactory method createBlackDuckNotificationRetriever.

public Optional<BlackDuckNotificationRetriever> createBlackDuckNotificationRetriever(BlackDuckProperties blackDuckProperties) {
    Optional<BlackDuckHttpClient> optionalBlackDuckHttpClient = blackDuckProperties.createBlackDuckHttpClientAndLogErrors(logger);
    if (optionalBlackDuckHttpClient.isPresent()) {
        BlackDuckHttpClient blackDuckHttpClient = optionalBlackDuckHttpClient.get();
        BlackDuckServicesFactory blackDuckServicesFactory = blackDuckProperties.createBlackDuckServicesFactory(blackDuckHttpClient, new Slf4jIntLogger(logger));
        BlackDuckNotificationRetriever notificationRetriever = new BlackDuckNotificationRetriever(blackDuckServicesFactory.getBlackDuckApiClient(), blackDuckServicesFactory.getApiDiscovery());
        return Optional.of(notificationRetriever);
    } else {
        logger.warn("The BlackDuck configuration '{}' could not be used to retrieve notifications", blackDuckProperties.getConfigName());
    }
    return Optional.empty();
}
Also used : Slf4jIntLogger(com.synopsys.integration.log.Slf4jIntLogger) BlackDuckHttpClient(com.synopsys.integration.blackduck.http.client.BlackDuckHttpClient) BlackDuckServicesFactory(com.synopsys.integration.blackduck.service.BlackDuckServicesFactory)

Example 13 with Slf4jIntLogger

use of com.synopsys.integration.log.Slf4jIntLogger in project hub-alert by blackducksoftware.

the class PhoneHomeTask method createPhoneHomeService.

private PhoneHomeService createPhoneHomeService(ExecutorService phoneHomeExecutor) {
    IntLogger intLogger = new Slf4jIntLogger(logger);
    ProxyInfo proxyInfo = proxyManager.createProxyInfoForHost(GoogleAnalyticsConstants.BASE_URL);
    IntHttpClient intHttpClient = new IntHttpClient(intLogger, gson, IntHttpClient.DEFAULT_TIMEOUT, true, proxyInfo);
    PhoneHomeClient phoneHomeClient = BlackDuckPhoneHomeHelper.createPhoneHomeClient(intLogger, intHttpClient.getClientBuilder(), gson);
    return PhoneHomeService.createAsynchronousPhoneHomeService(intLogger, phoneHomeClient, phoneHomeExecutor);
}
Also used : ProxyInfo(com.synopsys.integration.rest.proxy.ProxyInfo) PhoneHomeClient(com.synopsys.integration.phonehome.PhoneHomeClient) Slf4jIntLogger(com.synopsys.integration.log.Slf4jIntLogger) IntHttpClient(com.synopsys.integration.rest.client.IntHttpClient) IntLogger(com.synopsys.integration.log.IntLogger) Slf4jIntLogger(com.synopsys.integration.log.Slf4jIntLogger)

Aggregations

Slf4jIntLogger (com.synopsys.integration.log.Slf4jIntLogger)13 BlackDuckHttpClient (com.synopsys.integration.blackduck.http.client.BlackDuckHttpClient)8 BlackDuckServicesFactory (com.synopsys.integration.blackduck.service.BlackDuckServicesFactory)6 IntegrationException (com.synopsys.integration.exception.IntegrationException)4 IntLogger (com.synopsys.integration.log.IntLogger)4 AlertException (com.synopsys.integration.alert.api.common.model.exception.AlertException)3 BlackDuckProperties (com.synopsys.integration.alert.provider.blackduck.BlackDuckProperties)3 AlertConfigurationException (com.synopsys.integration.alert.api.common.model.exception.AlertConfigurationException)2 AlertRuntimeException (com.synopsys.integration.alert.api.common.model.exception.AlertRuntimeException)2 StatefulProvider (com.synopsys.integration.alert.api.provider.state.StatefulProvider)2 BlackDuckServerConfig (com.synopsys.integration.blackduck.configuration.BlackDuckServerConfig)2 JiraHttpClient (com.synopsys.integration.jira.common.rest.JiraHttpClient)2 AlertFieldException (com.synopsys.integration.alert.common.exception.AlertFieldException)1 MessageResult (com.synopsys.integration.alert.common.message.model.MessageResult)1 ProviderProject (com.synopsys.integration.alert.common.persistence.model.ProviderProject)1 BlackDuckApiTokenValidator (com.synopsys.integration.alert.provider.blackduck.validator.BlackDuckApiTokenValidator)1 ApiDiscovery (com.synopsys.integration.blackduck.api.generated.discovery.ApiDiscovery)1 ProjectView (com.synopsys.integration.blackduck.api.generated.view.ProjectView)1 BlackDuckServerConfigBuilder (com.synopsys.integration.blackduck.configuration.BlackDuckServerConfigBuilder)1 BlackDuckApiClient (com.synopsys.integration.blackduck.service.BlackDuckApiClient)1