/** * Copies config into a map. * * @param config * Config to copy */ public Config(final Map<String, String> config) { this(); if (config != null) { putAll(config); } }
/** * Copies config into a map. * * @param config * Config to copy */ public Config(final Map<String, String> config) { this(); if (config != null) { putAll(config); } }
@Override public void loadConfig() throws SchemaCrawlerException { try { final String configfile = config .getStringValue(CONFIG_FILE, "schemacrawler.config.properties"); final Path configFilePath = Paths.get(configfile).normalize() .toAbsolutePath(); config.putAll(PropertiesUtility .loadConfig(new FileInputResource(configFilePath))); } catch (final IOException e) { LOGGER .log(Level.CONFIG, "schemacrawler.config.properties not found in the current directory"); } }
@Override public void loadConfig() throws SchemaCrawlerException { try { final String configfile = config .getStringValue(CONFIG_FILE, "schemacrawler.config.properties"); final Path configFilePath = Paths.get(configfile).normalize() .toAbsolutePath(); config.putAll(PropertiesUtility .loadConfig(new FileInputResource(configFilePath))); } catch (final IOException e) { LOGGER .log(Level.CONFIG, "schemacrawler.config.properties not found in the current directory"); } }
private void run(final TestContext testContext, final DatabaseConnectionInfo connectionInfo, final Map<String, String> argsMap, final Map<String, String> config, final String command) throws Exception { argsMap.put("noinfo", Boolean.TRUE.toString()); argsMap.put("schemas", ".*\\.(?!FOR_LINT).*"); argsMap.put("infolevel", "maximum"); final Config runConfig = new Config(); final Config informationSchema = loadHsqldbConfig(); runConfig.putAll(informationSchema); if (config != null) { runConfig.putAll(config); } assertThat(outputOf(commandlineExecution(connectionInfo, command, argsMap, runConfig, TextOutputFormat.text)), hasSameContentAs(classpathResource(COMMAND_LINE_OUTPUT + testContext.testMethodName() + ".txt"))); }
if (additionalConfig != null) config.putAll(additionalConfig);
/** * Parse connection options, for both ways of connecting. * * @param dbServerType * Database server type */ private UserCredentials parseConnectionOptions() throws SchemaCrawlerException { final BaseDatabaseConnectionOptionsParser dbConnectionOptionsParser; if (databaseConnector.isUnknownDatabaseSystem() || config.hasValue("url")) { dbConnectionOptionsParser = new CommandLineConnectionOptionsParser(config); } else { dbConnectionOptionsParser = new BundledDriverConnectionOptionsParser(config); } dbConnectionOptionsParser.loadConfig(); config.putAll(dbConnectionOptionsParser.getOptions()); final UserCredentials userCredentials = dbConnectionOptionsParser .getUserCredentials(); return userCredentials; }
/** * Parse connection options, for both ways of connecting. * * @param dbServerType * Database server type */ private UserCredentials parseConnectionOptions() throws SchemaCrawlerException { final BaseDatabaseConnectionOptionsParser dbConnectionOptionsParser; if (databaseConnector.isUnknownDatabaseSystem() || config.hasValue("url")) { dbConnectionOptionsParser = new CommandLineConnectionOptionsParser(config); } else { dbConnectionOptionsParser = new BundledDriverConnectionOptionsParser(config); } dbConnectionOptionsParser.loadConfig(); config.putAll(dbConnectionOptionsParser.getOptions()); final UserCredentials userCredentials = dbConnectionOptionsParser .getUserCredentials(); return userCredentials; }
/** * Copies config into a map. * * @param config * Config to copy */ public Config(final Config config) { if (config != null) { putAll(config); } }
/** * Copies config into a map. * * @param config * Config to copy */ public Config(final Map<String, String> config) { this(); if (config != null) { putAll(config); } }
/** * Copies config into a map. * * @param config * Config to copy */ public Config(final Map<String, String> config) { this(); if (config != null) { putAll(config); } }
if (additionalConfig != null) config.putAll(additionalConfig);
@Override public void loadConfig() throws SchemaCrawlerException { try { final String configfile = config .getStringValue(CONFIG_FILE, "schemacrawler.config.properties"); final Path configFilePath = Paths.get(configfile).normalize() .toAbsolutePath(); config.putAll(PropertiesUtility .loadConfig(new FileInputResource(configFilePath))); } catch (final IOException e) { LOGGER .log(Level.CONFIG, "schemacrawler.config.properties not found in the current directory"); } }
@Override public void loadConfig() throws SchemaCrawlerException { try { final String configfile = config .getStringValue(CONFIG_FILE, "schemacrawler.config.properties"); final Path configFilePath = Paths.get(configfile).normalize() .toAbsolutePath(); config.putAll(PropertiesUtility .loadConfig(new FileInputResource(configFilePath))); } catch (final IOException e) { LOGGER .log(Level.CONFIG, "schemacrawler.config.properties not found in the current directory"); } }