Package io.deephaven.configuration
Class ConfigurationTool
java.lang.Object
io.deephaven.configuration.ConfigurationTool
Starting point for dhconfig actions operating on schemas, data routing,
properties, and other configuration data.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intdoMain(@NotNull io.deephaven.configuration.ToolBase invoker, @NotNull String[] commandLineArguments) Main executor.static intMain executor.static intdoMainThrowing(@NotNull io.deephaven.configuration.ToolBase invoker, @NotNull String[] commandLineArguments) Main executor.@NotNull Collection<String>@NotNull String@NotNull Collection<String>Get a map of any data type aliases to their canonical names.Get a map of data types to configuration info about that type.@NotNull Collection<String>getSupportedActions(@NotNull String datatype) All actions supported by the given data typestatic voidMain executor.protected io.deephaven.configuration.ToolImplBaseparseCommandLine(@NotNull String[] commandLineArguments) Parse the command line.
-
Field Details
-
HELP_ARG
The common help argument- See Also:
-
HELP_ALIASES
-
-
Constructor Details
-
ConfigurationTool
public ConfigurationTool()Constructor.
-
-
Method Details
-
getInfoMap
Get a map of data types to configuration info about that type.- Returns:
- map of data type to Info
-
getAppName
-
getCanonicalDataTypes
-
getActionsList
-
getDataTypeAliasToCanonicalType
Get a map of any data type aliases to their canonical names.- Returns:
- map of alias to canonical data type
-
doMain
Main executor. Delegate to constructor and run so this can be invoked programmatically.- Parameters:
commandLineArguments- the command line arguments- Returns:
- the exit code
- Throws:
Exception- explicitly passes on any exception thrown by the tool implementation
-
main
Main executor. Delegate to constructor and run so this can be invoked programmatically.- Parameters:
commandLineArguments- the command line arguments
-
getSupportedActions
All actions supported by the given data type- Parameters:
datatype- get actions supported by this data type- Returns:
- collection of actions supported by the given data type
-
parseCommandLine
protected io.deephaven.configuration.ToolImplBase parseCommandLine(@NotNull @NotNull String[] commandLineArguments) throws HelpExceptions.HelpException, HelpExceptions.CommandLineException Parse the command line. The first two arguments are positional and must be a known data type and action. An implementation class for the data type is created and used to parse the rest of the command line. Returns the implementation class.- Parameters:
commandLineArguments- the command line to parse- Returns:
- an implementation class that will handle the command
- Throws:
HelpExceptions.HelpException- contains a help message with as much detail as possibleHelpExceptions.CommandLineException- contains a usage message with as much detail as possible, when there is a problem with the command line
-
doMainThrowing
public static int doMainThrowing(@NotNull @NotNull io.deephaven.configuration.ToolBase invoker, @NotNull @NotNull String[] commandLineArguments) throws Exception Main executor. Does not handle exceptions - so that the interactive test program can handle them differently than an independent execution, with as much commonality as possible.- Parameters:
invoker- the implementation of ToolBase in usecommandLineArguments- the command line arguments- Returns:
- the exit code
- Throws:
Exception- explicitly passes on any exception thrown by the tool implementation
-
doMain
public static int doMain(@NotNull @NotNull io.deephaven.configuration.ToolBase invoker, @NotNull @NotNull String[] commandLineArguments) throws Exception Main executor. Delegate to constructor and run so this can be invoked programmatically.- Parameters:
invoker- the implementation of ToolBase in usecommandLineArguments- the command line arguments- Returns:
- the exit code
- Throws:
Exception- explicitly passes on any exception thrown by the tool implementation
-