Search in sources :

Example 1 with IProxySettings

use of org.eclipse.dash.licenses.IProxySettings in project dash-licenses by eclipse.

the class GitLabSupport method execute.

void execute(Consumer<GitLabConnection> callable) {
    Map<String, Object> clientConfig = null;
    IProxySettings proxySettings = this.proxySettings.get();
    if (proxySettings != null) {
        // Configure GitLab API for the proxy server
        clientConfig = Maps.newHashMap();
        proxySettings.configureJerseyClient(clientConfig);
    }
    try (GitLabApi gitLabApi = new GitLabApi(settings.getIpLabHostUrl(), settings.getIpLabToken(), clientConfig)) {
        callable.accept(new GitLabConnection(gitLabApi, settings.getIpLabRepositoryPath()));
    }
}
Also used : IProxySettings(org.eclipse.dash.licenses.IProxySettings) GitLabApi(org.gitlab4j.api.GitLabApi)

Aggregations

IProxySettings (org.eclipse.dash.licenses.IProxySettings)1 GitLabApi (org.gitlab4j.api.GitLabApi)1