本文整理汇总了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;未经允许,请勿转载。 |
请发表评论