Class ToolBase

java.lang.Object
org.apache.solr.cli.ToolBase
All Implemented Interfaces:
Tool
Direct Known Subclasses:
ApiTool, AssertTool, AuthTool, ClusterTool, ConfigSetDownloadTool, ConfigSetUploadTool, ConfigTool, CreateTool, DeleteTool, ExportTool, HealthcheckTool, LinkConfigTool, PackageTool, PostLogsTool, PostTool, RunExampleTool, SnapshotCreateTool, SnapshotDeleteTool, SnapshotDescribeTool, SnapshotExportTool, SnapshotListTool, StatusTool, StreamTool, UpdateACLTool, VersionTool, ZkCpTool, ZkLsTool, ZkMkrootTool, ZkMvTool, ZkRmTool, ZkToolHelp

public abstract class ToolBase extends Object implements Tool
  • Field Details

  • Constructor Details

  • Method Details

    • isVerbose

      protected boolean isVerbose()
      Is this tool being run in a verbose mode?
    • echoIfVerbose

      protected void echoIfVerbose(String msg)
    • echo

      protected void echo(String msg)
    • getOptions

      public org.apache.commons.cli.Options getOptions()
      Description copied from interface: Tool
      Retrieve the Options supported by this tool.
      Specified by:
      getOptions in interface Tool
      Returns:
      The Options this tool supports.
    • getRuntime

      public ToolRuntime getRuntime()
      Description copied from interface: Tool
      Return non-null runtime of the tool.
      Specified by:
      getRuntime in interface Tool
    • getConnectionOptions

      public org.apache.commons.cli.OptionGroup getConnectionOptions()
      Provides the two ways of connecting to Solr for CLI Tools
      Returns:
      OptionGroup validates that only one option is supplied by the caller.
    • runTool

      public int runTool(org.apache.commons.cli.CommandLine cli) throws Exception
      Specified by:
      runTool in interface Tool
      Throws:
      Exception
    • runImpl

      public abstract void runImpl(org.apache.commons.cli.CommandLine cli) throws Exception
      Throws:
      Exception