• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ConsoleUI类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: InitSshd

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


示例17: InitCache

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


示例18: InitHttpd

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


示例19: beforeInit

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
@Override
protected boolean beforeInit(SiteInit init) throws Exception {
  ErrorLogFile.errorOnlyConsole();

  if (!skipPlugins) {
    final List<PluginData> plugins =
        InitPlugins.listPluginsAndRemoveTempFiles(init.site, pluginsDistribution);
    ConsoleUI ui = ConsoleUI.getInstance(false);
    if (installAllPlugins && !nullOrEmpty(installPlugins)) {
      ui.message("Cannot use --install-plugin together with --install-all-plugins.\n");
      return true;
    }
    verifyInstallPluginList(ui, plugins);
    if (listPlugins) {
      if (!plugins.isEmpty()) {
        ui.message("Available plugins:\n");
        for (PluginData plugin : plugins) {
          ui.message(" * %s version %s\n", plugin.name, plugin.version);
        }
      } else {
        ui.message("No plugins found.\n");
      }
      return true;
    }
  }
  return false;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:28,代码来源:Init.java


示例20: verifyInstallPluginList

import com.google.gerrit.pgm.init.api.ConsoleUI; //导入依赖的package包/类
private void verifyInstallPluginList(ConsoleUI ui, List<PluginData> plugins) {
  if (nullOrEmpty(installPlugins) || nullOrEmpty(plugins)) {
    return;
  }
  Set<String> missing = Sets.newHashSet(installPlugins);
  plugins.stream().forEach(p -> missing.remove(p.name));
  if (!missing.isEmpty()) {
    ui.message("Cannot find plugin(s): %s\n", Joiner.on(", ").join(missing));
    listPlugins = true;
  }
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:12,代码来源:Init.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HMacSP800DRBG类代码示例发布时间:2022-05-22
下一篇:
Java CPacketResourcePackStatus类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap