Class Script
java.lang.Object
org.springframework.shell.core.command.AbstractCommand
org.springframework.shell.core.command.Script
- All Implemented Interfaces:
Command
A command that can read and execute other commands from a file.
- Author:
- Eric Bottard, Janne Valkealahti, Mahmoud Ben Hassine, David Pilar
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.shell.core.command.Command
Command.Builder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoExecute(CommandContext commandContext) getHelp()Get the help text of the command.Get the options of the command.voidsetCommandParser(CommandParser commandParser) Set the command parser to use to parse commands in the script.Methods inherited from class org.springframework.shell.core.command.AbstractCommand
equals, execute, getAliases, getAvailabilityProvider, getCompletionProvider, getDescription, getExitStatusExceptionMapper, getGroup, getName, hashCode, isHelp, isHidden, println, setAliases, setAvailabilityProvider, setCompletionProvider, setExitStatusExceptionMapper, setOptions
-
Constructor Details
-
Script
-
-
Method Details
-
getHelp
Description copied from interface:CommandGet the help text of the command.- Specified by:
getHelpin interfaceCommand- Overrides:
getHelpin classAbstractCommand- Returns:
- the help text of the command
-
getOptions
Description copied from interface:CommandGet the options of the command.- Specified by:
getOptionsin interfaceCommand- Overrides:
getOptionsin classAbstractCommand- Returns:
- the options of the command
-
doExecute
- Specified by:
doExecutein classAbstractCommand- Throws:
Exception
-
setCommandParser
Set the command parser to use to parse commands in the script.- Parameters:
commandParser- the command parser to set
-