Class Script
java.lang.Object
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.shell.core.command.Command
Command.Builder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(CommandContext commandContext) Execute the command within the given context.Get a short description of the command.getGroup()Get the group of the command.voidsetCommandParser(CommandParser commandParser) Set the command parser to use to parse commands in the script.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.shell.core.command.Command
getAliases, getAvailabilityProvider, getCompletionProvider, getHelp, getName, getOptions, isHidden
-
Constructor Details
-
Script
public Script()
-
-
Method Details
-
getDescription
Description copied from interface:CommandGet a short description of the command.- Specified by:
getDescriptionin interfaceCommand- Returns:
- the description of the command
-
getGroup
Description copied from interface:CommandGet the group of the command. -
execute
Description copied from interface:CommandExecute the command within the given context. -
setCommandParser
Set the command parser to use to parse commands in the script.- Parameters:
commandParser- the command parser to set
-