Package org.apache.solr.cli
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
,UpdateACLTool
,VersionTool
,ZkCpTool
,ZkLsTool
,ZkMkrootTool
,ZkMvTool
,ZkRmTool
,ZkToolHelp
public abstract class ToolBase extends Object implements Tool
-
-
Field Summary
Fields Modifier and Type Field Description protected ToolRuntime
runtime
protected boolean
verbose
-
Constructor Summary
Constructors Modifier Constructor Description protected
ToolBase(ToolRuntime runtime)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
echo(String msg)
protected void
echoIfVerbose(String msg, org.apache.commons.cli.CommandLine cli)
ToolRuntime
getRuntime()
Return non-null runtime of the tool.protected boolean
isVerbose()
Is this tool being run in a verbose mode?abstract void
runImpl(org.apache.commons.cli.CommandLine cli)
int
runTool(org.apache.commons.cli.CommandLine cli)
-
-
-
Field Detail
-
runtime
protected final ToolRuntime runtime
-
verbose
protected boolean verbose
-
-
Constructor Detail
-
ToolBase
protected ToolBase(ToolRuntime runtime)
-
-
Method Detail
-
echoIfVerbose
protected void echoIfVerbose(String msg, org.apache.commons.cli.CommandLine cli)
-
isVerbose
protected boolean isVerbose()
Is this tool being run in a verbose mode?
-
echo
protected void echo(String msg)
-
getRuntime
public ToolRuntime getRuntime()
Description copied from interface:Tool
Return non-null runtime of the tool.- Specified by:
getRuntime
in interfaceTool
-
runTool
public int runTool(org.apache.commons.cli.CommandLine cli) throws Exception
-
-