(CommandLine cli)
| 84 | } |
| 85 | |
| 86 | @Override |
| 87 | public void runImpl(CommandLine cli) throws Exception { |
| 88 | String url; |
| 89 | if (CLIUtils.hasConnectionOption(cli)) { |
| 90 | url = CLIUtils.normalizeSolrUrl(cli) + "/solr/" + cli.getOptionValue(COLLECTION_NAME_OPTION); |
| 91 | |
| 92 | } else { |
| 93 | throw new IllegalArgumentException( |
| 94 | "Must specify a connection target via -s/--solr-connection, --solr-url, or --zk-host."); |
| 95 | } |
| 96 | String rootDir = cli.getOptionValue(ROOT_DIR_OPTION); |
| 97 | String credentials = cli.getOptionValue(CommonCLIOptions.CREDENTIALS_OPTION); |
| 98 | runCommand(url, rootDir, credentials); |
| 99 | } |
| 100 | |
| 101 | public void runCommand(String baseUrl, String root, String credentials) throws IOException { |
| 102 | if (URLUtil.isBaseUrl(baseUrl)) { |
nothing calls this directly
no test coverage detected