当前位置: 首页>>代码示例>>Java>>正文


Java ConsoleUI类代码示例

本文整理汇总了Java中com.google.gerrit.pgm.init.api.ConsoleUI的典型用法代码示例。如果您正苦于以下问题:Java ConsoleUI类的具体用法?Java ConsoleUI怎么用?Java ConsoleUI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ConsoleUI类属于com.google.gerrit.pgm.init.api包,在下文中一共展示了ConsoleUI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: InitOAuth

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Inject
InitOAuth(ConsoleUI ui, Section.Factory sections, @PluginName String pluginName) {
  this.ui = ui;
  this.googleOAuthProviderSection =
      sections.get(PLUGIN_SECTION, pluginName + GoogleOAuthService.CONFIG_SUFFIX);
  this.githubOAuthProviderSection =
      sections.get(PLUGIN_SECTION, pluginName + GitHubOAuthService.CONFIG_SUFFIX);
  this.bitbucketOAuthProviderSection =
      sections.get(PLUGIN_SECTION, pluginName + BitbucketOAuthService.CONFIG_SUFFIX);
  this.casOAuthProviderSection =
      sections.get(PLUGIN_SECTION, pluginName + CasOAuthService.CONFIG_SUFFIX);
  this.facebookOAuthProviderSection =
      sections.get(PLUGIN_SECTION, pluginName + FacebookOAuthService.CONFIG_SUFFIX);
  this.gitlabOAuthProviderSection =
      sections.get(PLUGIN_SECTION, pluginName + GitLabOAuthService.CONFIG_SUFFIX);
  this.dexOAuthProviderSection =
      sections.get(PLUGIN_SECTION, pluginName + DexOAuthService.CONFIG_SUFFIX);
  this.keycloakOAuthProviderSection =
      sections.get(PLUGIN_SECTION, pluginName + KeycloakOAuthService.CONFIG_SUFFIX);
}
 
开发者ID:davido,项目名称:gerrit-oauth-provider,代码行数:21,代码来源:InitOAuth.java

示例2: createSysInjector

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
private Injector createSysInjector(SiteInit init) {
  if (sysInjector == null) {
    final List<Module> modules = new ArrayList<>();
    modules.add(
        new AbstractModule() {
          @Override
          protected void configure() {
            bind(ConsoleUI.class).toInstance(init.ui);
            bind(InitFlags.class).toInstance(init.flags);
          }
        });
    Injector dbInjector = createDbInjector(SINGLE_USER);
    switch (IndexModule.getIndexType(dbInjector)) {
      case LUCENE:
        modules.add(new LuceneIndexModuleOnInit());
        break;
      case ELASTICSEARCH:
        modules.add(new ElasticIndexModuleOnInit());
        break;
      default:
        throw new IllegalStateException("unsupported index.type");
    }
    sysInjector = dbInjector.createChildInjector(modules);
  }
  return sysInjector;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:27,代码来源:BaseInit.java

示例3: InitAdminUser

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Inject
InitAdminUser(
    InitFlags flags,
    ConsoleUI ui,
    AllUsersNameOnInitProvider allUsers,
    AccountsOnInit accounts,
    VersionedAuthorizedKeysOnInit.Factory authorizedKeysFactory,
    ExternalIdsOnInit externalIds,
    SequencesOnInit sequencesOnInit,
    GroupsOnInit groupsOnInit) {
  this.flags = flags;
  this.ui = ui;
  this.allUsers = allUsers;
  this.accounts = accounts;
  this.authorizedKeysFactory = authorizedKeysFactory;
  this.externalIds = externalIds;
  this.sequencesOnInit = sequencesOnInit;
  this.groupsOnInit = groupsOnInit;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:20,代码来源:InitAdminUser.java

示例4: getSysInjector

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
private Injector getSysInjector() {
  List<Module> modules = new ArrayList<>();
  modules.add(
      new FactoryModule() {
        @Override
        protected void configure() {
          bind(Path.class).annotatedWith(SitePath.class).toInstance(getSitePath());
          bind(ConsoleUI.class).toInstance(ConsoleUI.getInstance(password != null));
          factory(Section.Factory.class);
          bind(Boolean.class).annotatedWith(InstallAllPlugins.class).toInstance(Boolean.FALSE);
          bind(new TypeLiteral<List<String>>() {})
              .annotatedWith(InstallPlugins.class)
              .toInstance(new ArrayList<String>());
          bind(String.class)
              .annotatedWith(SecureStoreClassName.class)
              .toProvider(Providers.of(getConfiguredSecureStoreClass()));
        }
      });
  modules.add(new GerritServerConfigModule());
  return Guice.createInjector(modules);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:22,代码来源:Passwd.java

示例5: create

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Test
public void create() throws Exception {
  final SitePaths site = new SitePaths(Paths.get("."));
  final ConsoleUI ui = createStrictMock(ConsoleUI.class);
  final StaleLibraryRemover remover = createStrictMock(StaleLibraryRemover.class);

  replay(ui);

  Libraries lib =
      new Libraries(
          new Provider<LibraryDownloader>() {
            @Override
            public LibraryDownloader get() {
              return new LibraryDownloader(ui, site, remover);
            }
          },
          Collections.<String>emptyList(),
          false);

  assertNotNull(lib.mysqlDriver);

  verify(ui);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:24,代码来源:LibrariesTest.java

示例6: InitPlugin

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Inject
InitPlugin(Section.Factory sections,
    @PluginName String pluginName,
    ConsoleUI ui,
    SitePaths site,
    Injector parent) {
  this.ui = ui;
  this.site = site;
  this.configSection = sections.get("plugin", pluginName);
  this.parent = parent;
}
 
开发者ID:davido,项目名称:gerrit-ci-plugin,代码行数:12,代码来源:InitPlugin.java

示例7: UpgradeFrom2_0_x

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Inject
UpgradeFrom2_0_x(
    final SitePaths site,
    final InitFlags flags,
    final ConsoleUI ui,
    final Section.Factory sections) {
  this.ui = ui;
  this.sections = sections;

  this.cfg = flags.cfg;
  this.sec = flags.sec;
  this.site_path = site.site_path;
  this.etc_dir = site.etc_dir;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:15,代码来源:UpgradeFrom2_0_x.java

示例8: SiteInit

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Inject
SiteInit(
    final SitePaths site,
    final InitFlags flags,
    final ConsoleUI ui,
    final SitePathInitializer initializer) {
  this.site = site;
  this.flags = flags;
  this.ui = ui;
  this.initializer = initializer;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:12,代码来源:BaseInit.java

示例9: SiteRun

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Inject
SiteRun(
    ConsoleUI ui,
    SitePaths site,
    InitFlags flags,
    SchemaUpdater schemaUpdater,
    @ReviewDbFactory SchemaFactory<ReviewDb> schema,
    GitRepositoryManager repositoryManager) {
  this.ui = ui;
  this.site = site;
  this.flags = flags;
  this.schemaUpdater = schemaUpdater;
  this.schema = schema;
  this.repositoryManager = repositoryManager;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:16,代码来源:BaseInit.java

示例10: LibraryDownloader

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Inject
LibraryDownloader(ConsoleUI ui, SitePaths site, StaleLibraryRemover remover) {
  this.ui = ui;
  this.lib_dir = site.lib_dir;
  this.remover = remover;
  this.needs = new ArrayList<>(2);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:8,代码来源:LibraryDownloader.java

示例11: InitIndex

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Inject
InitIndex(ConsoleUI ui, Section.Factory sections, SitePaths site, InitFlags initFlags) {
  this.ui = ui;
  this.index = sections.get("index", null);
  this.gerrit = sections.get("gerrit", null);
  this.site = site;
  this.initFlags = initFlags;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:9,代码来源:InitIndex.java

示例12: InitPlugins

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Inject
InitPlugins(
    final ConsoleUI ui,
    final SitePaths site,
    InitFlags initFlags,
    InitPluginStepsLoader pluginLoader,
    PluginsDistribution pluginsDistribution) {
  this.ui = ui;
  this.site = site;
  this.initFlags = initFlags;
  this.pluginLoader = pluginLoader;
  this.pluginsDistribution = pluginsDistribution;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:14,代码来源:InitPlugins.java

示例13: InitDatabase

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Inject
InitDatabase(
    ConsoleUI ui,
    SitePaths site,
    Libraries libraries,
    InitFlags flags,
    Section.Factory sections) {
  this.ui = ui;
  this.site = site;
  this.libraries = libraries;
  this.flags = flags; // Don't grab any flags yet; they aren't initialized until BaseInit#run.
  this.database = sections.get("database", null);
  this.idSection = sections.get(GerritServerIdProvider.SECTION, null);
  this.noteDbChanges = sections.get(SECTION_NOTE_DB, CHANGES.key());
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:16,代码来源:InitDatabase.java

示例14: InitAuth

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Inject
InitAuth(InitFlags flags, ConsoleUI ui, Section.Factory sections) {
  this.flags = flags;
  this.ui = ui;
  this.auth = sections.get("auth", null);
  this.ldap = sections.get("ldap", null);
  this.receive = sections.get(RECEIVE, null);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:9,代码来源:InitAuth.java

示例15: SitePathInitializer

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Inject
public SitePathInitializer(
    final Injector injector,
    final ConsoleUI ui,
    final InitFlags flags,
    final SitePaths site,
    final Section.Factory sectionFactory,
    @Nullable final SecureStoreInitData secureStoreInitData) {
  this.ui = ui;
  this.flags = flags;
  this.site = site;
  this.sectionFactory = sectionFactory;
  this.secureStoreInitData = secureStoreInitData;
  this.steps = stepsOf(injector);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:16,代码来源:SitePathInitializer.java


注:本文中的com.google.gerrit.pgm.init.api.ConsoleUI类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。