java.lang.Object
dev.metaschema.cli.processor.command.AbstractTerminalCommand
dev.metaschema.cli.commands.GenerateDiagramCommand
- All Implemented Interfaces:
ICommand
This command implementation supports generation of a diagram depicting the
objects and relationships within a provided Metaschema module.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecuteCommand(CallingContext callingContext, org.apache.commons.cli.CommandLine cmdLine) Execute the diagram generation command.Collection<? extends org.apache.commons.cli.Option>Used to gather options directly associated with this command.Get a description of what the command does.Get the non-option arguments.getName()Get the name of the command.newExecutor(CallingContext callingContext, org.apache.commons.cli.CommandLine cmdLine) Create a new executor for this command.Methods inherited from class dev.metaschema.cli.processor.command.AbstractTerminalCommand
getCurrentWorkingDirectory, resolveAgainstCWD, resolveAgainstCWD, resolveAgainstCWDMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.metaschema.cli.processor.command.ICommand
getSubCommandByName, getSubCommands, isSubCommandRequired, validateExtraArguments, validateOptions
-
Constructor Details
-
GenerateDiagramCommand
public GenerateDiagramCommand()
-
-
Method Details
-
getName
Description copied from interface:ICommandGet the name of the command.This name is used to call the command as a command line argument.
- Returns:
- the command's name
-
getDescription
Description copied from interface:ICommandGet a description of what the command does.This description is displayed in help output.
- Returns:
- the description
-
gatherOptions
Description copied from interface:ICommandUsed to gather options directly associated with this command.- Returns:
- the options
-
getExtraArguments
Description copied from interface:ICommandGet the non-option arguments.- Returns:
- the arguments, or an empty list if there are no arguments
-
newExecutor
public ICommandExecutor newExecutor(CallingContext callingContext, org.apache.commons.cli.CommandLine cmdLine) Description copied from interface:ICommandCreate a new executor for this command.- Parameters:
callingContext- the context of the command executioncmdLine- the parsed command line details- Returns:
- the executor
-
executeCommand
protected void executeCommand(@NonNull CallingContext callingContext, @NonNull org.apache.commons.cli.CommandLine cmdLine) throws CommandExecutionException Execute the diagram generation command.- Parameters:
callingContext- information about the calling contextcmdLine- the parsed command line details- Throws:
CommandExecutionException- if an error occurred while executing the command
-