Search in sources :

Example 6 with SchemaModule

use of com.google.gerrit.server.schema.SchemaModule in project gerrit by GerritCodeReview.

the class DeleteZombieDrafts method getSysInjector.

private Injector getSysInjector() {
    List<Module> modules = new ArrayList<>();
    modules.add(new AbstractModule() {

        @Override
        protected void configure() {
            bind(Path.class).annotatedWith(SitePath.class).toInstance(getSitePath());
            bind(ConsoleUI.class).toInstance(ConsoleUI.getInstance(false));
            bind(String.class).annotatedWith(SecureStoreClassName.class).toProvider(Providers.of(getConfiguredSecureStoreClass()));
            bind(MetricMaker.class).to(DisabledMetricMaker.class);
            install(new FactoryModuleBuilder().build(DeleteZombieCommentsRefs.Factory.class));
        }
    });
    modules.add(new GerritServerConfigModule());
    modules.add(new SchemaModule());
    return Guice.createInjector(modules);
}
Also used : SitePath(com.google.gerrit.server.config.SitePath) Path(java.nio.file.Path) GerritServerConfigModule(com.google.gerrit.server.config.GerritServerConfigModule) SchemaModule(com.google.gerrit.server.schema.SchemaModule) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) DeleteZombieCommentsRefs(com.google.gerrit.server.notedb.DeleteZombieCommentsRefs) ArrayList(java.util.ArrayList) Module(com.google.inject.Module) GerritServerConfigModule(com.google.gerrit.server.config.GerritServerConfigModule) SchemaModule(com.google.gerrit.server.schema.SchemaModule) AbstractModule(com.google.inject.AbstractModule) DisabledMetricMaker(com.google.gerrit.metrics.DisabledMetricMaker) AbstractModule(com.google.inject.AbstractModule)

Aggregations

SchemaModule (com.google.gerrit.server.schema.SchemaModule)6 GerritServerConfigModule (com.google.gerrit.server.config.GerritServerConfigModule)5 AbstractModule (com.google.inject.AbstractModule)5 Module (com.google.inject.Module)5 ArrayList (java.util.ArrayList)5 LifecycleModule (com.google.gerrit.lifecycle.LifecycleModule)4 SitePath (com.google.gerrit.server.config.SitePath)4 GitRepositoryManagerModule (com.google.gerrit.server.git.GitRepositoryManagerModule)4 DisabledMetricMaker (com.google.gerrit.metrics.DisabledMetricMaker)3 GpgModule (com.google.gerrit.gpg.GpgModule)2 OAuthModule (com.google.gerrit.httpd.auth.oauth.OAuthModule)2 OpenIdModule (com.google.gerrit.httpd.auth.openid.OpenIdModule)2 HttpPluginModule (com.google.gerrit.httpd.plugins.HttpPluginModule)2 StaticModule (com.google.gerrit.httpd.raw.StaticModule)2 LuceneIndexModule (com.google.gerrit.lucene.LuceneIndexModule)2 AuthConfigModule (com.google.gerrit.server.config.AuthConfigModule)2 CanonicalWebUrlModule (com.google.gerrit.server.config.CanonicalWebUrlModule)2 GerritGlobalModule (com.google.gerrit.server.config.GerritGlobalModule)2 GarbageCollectionModule (com.google.gerrit.server.git.GarbageCollectionModule)2 IndexModule (com.google.gerrit.server.index.IndexModule)2