Search in sources :

Example 1 with LicenseSupport

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

the class LicenseToolModule method configure.

@Override
protected void configure() {
    bind(ISettings.class).toInstance(settings);
    bind(LicenseChecker.class).toInstance(new LicenseChecker());
    bind(EclipseFoundationSupport.class).toInstance(new EclipseFoundationSupport());
    bind(ClearlyDefinedSupport.class).toInstance(new ClearlyDefinedSupport());
    bind(LicenseSupport.class).toInstance(new LicenseSupport());
    bind(GitLabSupport.class).toInstance(new GitLabSupport());
    bind(IHttpClientService.class).toInstance(new HttpClientService());
    bind(ExtendedContentDataService.class).toInstance(new ExtendedContentDataService());
    bind(IProxySettings.class).toProvider(Providers.of(proxySettings));
    Multibinder<IExtendedContentDataProvider> extendedContentDataProviders = Multibinder.newSetBinder(binder(), IExtendedContentDataProvider.class);
    extendedContentDataProviders.addBinding().to(NpmjsExtendedContentDataProvider.class);
    extendedContentDataProviders.addBinding().to(MavenCentralExtendedContentDataProvider.class);
    extendedContentDataProviders.addBinding().to(PypiExtendedContentDataProvider.class);
    extendedContentDataProviders.addBinding().to(GitHubExtendedContentDataProvider.class);
// classifierBinder.addBinding().to(GithubDataProvider.class);
}
Also used : ClearlyDefinedSupport(org.eclipse.dash.licenses.clearlydefined.ClearlyDefinedSupport) IProxySettings(org.eclipse.dash.licenses.IProxySettings) EclipseFoundationSupport(org.eclipse.dash.licenses.foundation.EclipseFoundationSupport) HttpClientService(org.eclipse.dash.licenses.http.HttpClientService) IHttpClientService(org.eclipse.dash.licenses.http.IHttpClientService) ExtendedContentDataService(org.eclipse.dash.licenses.extended.ExtendedContentDataService) IHttpClientService(org.eclipse.dash.licenses.http.IHttpClientService) IExtendedContentDataProvider(org.eclipse.dash.licenses.extended.IExtendedContentDataProvider) LicenseChecker(org.eclipse.dash.licenses.LicenseChecker) GitLabSupport(org.eclipse.dash.licenses.review.GitLabSupport) ISettings(org.eclipse.dash.licenses.ISettings) LicenseSupport(org.eclipse.dash.licenses.LicenseSupport)

Example 2 with LicenseSupport

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

the class TestLicenseToolModule method configure.

@Override
protected void configure() {
    bind(ISettings.class).toInstance(settings);
    bind(IHttpClientService.class).toInstance(getHttpClientService());
    bind(LicenseChecker.class).toInstance(new LicenseChecker());
    bind(EclipseFoundationSupport.class).toInstance(new EclipseFoundationSupport());
    bind(ClearlyDefinedSupport.class).toInstance(new ClearlyDefinedSupport());
    bind(LicenseSupport.class).toInstance(new LicenseSupport());
    bind(ExtendedContentDataService.class).toInstance(new ExtendedContentDataService());
    Multibinder<IExtendedContentDataProvider> classifierBinder = Multibinder.newSetBinder(binder(), IExtendedContentDataProvider.class);
    classifierBinder.addBinding().to(NpmjsExtendedContentDataProvider.class);
    classifierBinder.addBinding().to(MavenCentralExtendedContentDataProvider.class);
    classifierBinder.addBinding().to(PypiExtendedContentDataProvider.class);
// classifierBinder.addBinding().to(GithubDataProvider.class);
}
Also used : ClearlyDefinedSupport(org.eclipse.dash.licenses.clearlydefined.ClearlyDefinedSupport) EclipseFoundationSupport(org.eclipse.dash.licenses.foundation.EclipseFoundationSupport) ExtendedContentDataService(org.eclipse.dash.licenses.extended.ExtendedContentDataService) IHttpClientService(org.eclipse.dash.licenses.http.IHttpClientService) IExtendedContentDataProvider(org.eclipse.dash.licenses.extended.IExtendedContentDataProvider) LicenseChecker(org.eclipse.dash.licenses.LicenseChecker) ISettings(org.eclipse.dash.licenses.ISettings) LicenseSupport(org.eclipse.dash.licenses.LicenseSupport)

Example 3 with LicenseSupport

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

the class LicenseSupportTests method setup.

@BeforeEach
void setup() {
    Injector injector = Guice.createInjector(new TestLicenseToolModule());
    licenseSupport = injector.getInstance(LicenseSupport.class);
}
Also used : Injector(com.google.inject.Injector) TestLicenseToolModule(org.eclipse.dash.licenses.tests.util.TestLicenseToolModule) LicenseSupport(org.eclipse.dash.licenses.LicenseSupport) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

LicenseSupport (org.eclipse.dash.licenses.LicenseSupport)3 ISettings (org.eclipse.dash.licenses.ISettings)2 LicenseChecker (org.eclipse.dash.licenses.LicenseChecker)2 ClearlyDefinedSupport (org.eclipse.dash.licenses.clearlydefined.ClearlyDefinedSupport)2 ExtendedContentDataService (org.eclipse.dash.licenses.extended.ExtendedContentDataService)2 IExtendedContentDataProvider (org.eclipse.dash.licenses.extended.IExtendedContentDataProvider)2 EclipseFoundationSupport (org.eclipse.dash.licenses.foundation.EclipseFoundationSupport)2 IHttpClientService (org.eclipse.dash.licenses.http.IHttpClientService)2 Injector (com.google.inject.Injector)1 IProxySettings (org.eclipse.dash.licenses.IProxySettings)1 HttpClientService (org.eclipse.dash.licenses.http.HttpClientService)1 GitLabSupport (org.eclipse.dash.licenses.review.GitLabSupport)1 TestLicenseToolModule (org.eclipse.dash.licenses.tests.util.TestLicenseToolModule)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1