本文整理了Java中org.jboss.windup.exec.configuration.WindupConfiguration.getOptionMap()
方法的一些代码示例,展示了WindupConfiguration.getOptionMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WindupConfiguration.getOptionMap()
方法的具体详情如下:
包路径:org.jboss.windup.exec.configuration.WindupConfiguration
类名称:WindupConfiguration
方法名:getOptionMap
[英]Returns all configuration options as an immutable Map.
[中]以不可变映射的形式返回所有配置选项。
代码示例来源:origin: windup/windup
private void deleteGraphDataUnlessInhibited(WindupConfiguration windupConfiguration, Path graphPath)
{
Boolean keep = (Boolean) windupConfiguration.getOptionMap().get(KeepWorkDirsOption.NAME);
if (keep == null || !keep)
{
log.info("Deleting graph directory (see --" + KeepWorkDirsOption.NAME + "): " + graphPath.toFile().getPath());
try
{
FileUtils.deleteDirectory(graphPath.toFile());
}
catch (IOException ex)
{
log.log(Level.WARNING, "Failed deleting graph directory: " + graphPath.toFile().getPath()
+ System.lineSeparator()+"\tDue to: " + ex.getMessage(), ex);
}
}
}
代码示例来源:origin: org.jboss.windup/windup-bootstrap
private void deleteGraphDataUnlessInhibited(WindupConfiguration windupConfiguration, Path graphPath)
{
Boolean keep = (Boolean) windupConfiguration.getOptionMap().get(KeepWorkDirsOption.NAME);
if (keep == null || !keep)
{
log.info("Deleting graph directory (see --" + KeepWorkDirsOption.NAME + "): " + graphPath.toFile().getPath());
try
{
FileUtils.deleteDirectory(graphPath.toFile());
}
catch (IOException ex)
{
log.log(Level.WARNING, "Failed deleting graph directory: " + graphPath.toFile().getPath()
+ System.lineSeparator()+"\tDue to: " + ex.getMessage(), ex);
}
}
}
代码示例来源:origin: windup/windup
private void printConfigInfo(WindupConfiguration windupConfiguration)
{
LOG.info("");
if (windupConfiguration.getInputPaths().size() == 1)
{
LOG.info("Input Application:" + windupConfiguration.getInputPaths().iterator().next());
}
else
{
LOG.info("Input Applications:");
for (Path inputPath : windupConfiguration.getInputPaths())
{
LOG.info("\t" + inputPath);
}
LOG.info("");
}
LOG.info("Output Path:" + windupConfiguration.getOutputDirectory());
LOG.info("");
for (Map.Entry<String, Object> entrySet : windupConfiguration.getOptionMap().entrySet())
{
LOG.info("\t" + entrySet.getKey() + ": " + entrySet.getValue());
}
}
代码示例来源:origin: windup/windup
private void addSourceAndTargetInformation(GraphRewrite event, WindupConfiguration configuration, WindupConfigurationModel configurationModel)
{
@SuppressWarnings("unchecked")
Collection<String> sources = (Collection<String>) configuration.getOptionMap().get(SourceOption.NAME);
@SuppressWarnings("unchecked")
Collection<String> targets = (Collection<String>) configuration.getOptionMap().get(TargetOption.NAME);
GraphService<TechnologyReferenceModel> technologyReferenceService = new GraphService<>(event.getGraphContext(),
TechnologyReferenceModel.class);
Function<String, TechnologyReferenceModel> createReferenceModel = (techID) -> {
TechnologyReference reference = TechnologyReference.parseFromIDAndVersion(techID);
TechnologyReferenceModel technologyReferenceModel = technologyReferenceService.create();
technologyReferenceModel.setTechnologyID(reference.getId());
technologyReferenceModel.setVersionRange(reference.getVersionRangeAsString());
return technologyReferenceModel;
};
if (sources != null)
{
sources.forEach((sourceID) -> {
configurationModel.addSourceTechnology(createReferenceModel.apply(sourceID));
});
}
if (targets != null)
{
targets.forEach((targetID) -> {
configurationModel.addTargetTechnology(createReferenceModel.apply(targetID));
});
}
}
代码示例来源:origin: windup/windup
@SuppressWarnings("unchecked")
private RuleLoaderContext configureRuleProviderAndTagFilters(RuleLoaderContext ruleLoaderContext, WindupConfiguration config)
Collection<String> includeTags = (Collection<String>) config.getOptionMap().get(IncludeTagsOption.NAME);
Collection<String> excludeTags = (Collection<String>) config.getOptionMap().get(ExcludeTagsOption.NAME);
Collection<String> sources = (Collection<String>) config.getOptionMap().get(SourceOption.NAME);
Collection<String> targets = (Collection<String>) config.getOptionMap().get(TargetOption.NAME);
if (config.getOptionMap().containsKey(SkipReportsRenderingOption.NAME))
skipReports = (Boolean) config.getOptionMap().get(SkipReportsRenderingOption.NAME);
代码示例来源:origin: windup/windup
Boolean overwrite = (Boolean) windupConfiguration.getOptionMap().get(OverwriteOption.NAME);
if (overwrite == null)
final Boolean skipReports = (Boolean) windupConfiguration.getOptionMap().get(SkipReportsRenderingOption.NAME);
if (!skipReports)
代码示例来源:origin: org.jboss.windup/windup-bootstrap
Boolean overwrite = (Boolean) windupConfiguration.getOptionMap().get(OverwriteOption.NAME);
if (overwrite == null)
final Boolean skipReports = (Boolean) windupConfiguration.getOptionMap().get(SkipReportsRenderingOption.NAME);
if (!skipReports)
代码示例来源:origin: windup/windup
Boolean overwrite = (Boolean) windupConfiguration.getOptionMap().get(OverwriteOption.NAME);
if (overwrite == null)
代码示例来源:origin: windup/windup
context.setOptions(configuration.getOptionMap());
内容来源于网络,如有侵权,请联系作者删除!