Package de.dlr.proseo.ui.cli.parser
Class CLICommand
java.lang.Object
de.dlr.proseo.ui.cli.parser.CLICommand
Class representing a prosEO CLI command
- Author:
- Thomas Bassler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the command descriptiongetName()Gets the command nameGets the command's optionsGets the command's parametersGets the command's subcommandsvoidprintHelp(PrintStream out) Print help information for this command on the given print streamprintHTML(StringBuilder htmlDoc) Appends the StringBuilder provided by the caller with HTML code that prints a table with the command's name and description and calls - if applicable - the printHTML() methods of subcommands, options and parameters.voidsetDescription(String description) Sets the command descriptionvoidSets the command namevoidsetOptions(List<CLIOption> options) Sets the command's optionsvoidsetParameters(List<CLIParameter> parameters) Sets the command's parametersvoidsetSubcommands(List<CLICommand> subcommands) Sets the command's subcommandstoString()
-
Constructor Details
-
CLICommand
public CLICommand()
-
-
Method Details
-
getName
Gets the command name- Returns:
- the name
-
setName
Sets the command name- Parameters:
name- the name to set
-
getDescription
Gets the command description- Returns:
- the description
-
setDescription
Sets the command description- Parameters:
description- the description to set
-
getSubcommands
Gets the command's subcommands- Returns:
- the subcommands
-
setSubcommands
Sets the command's subcommands- Parameters:
subcommands- the subcommands to set
-
getOptions
Gets the command's options- Returns:
- the options
-
setOptions
Sets the command's options- Parameters:
options- the options to set
-
getParameters
Gets the command's parameters- Returns:
- the parameters
-
setParameters
Sets the command's parameters- Parameters:
parameters- the parameters to set
-
printHelp
Print help information for this command on the given print stream- Parameters:
out- the print stream to write to
-
toString
-
printHTML
Appends the StringBuilder provided by the caller with HTML code that prints a table with the command's name and description and calls - if applicable - the printHTML() methods of subcommands, options and parameters.- Parameters:
htmlDoc- A StringBuilder that may already contain information.- Returns:
- The same StringBuilder, appended information on the command.
-