Class Help
java.lang.Object
org.springframework.shell.standard.AbstractShellComponent
org.springframework.shell.standard.commands.Help
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ResourceLoaderAware
A command to display help about all available commands.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceMarker interface for beans providing help functionality to the shell. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.jline.utils.AttributedStringvoidsetCommandsTemplate(String commandsTemplate) Sets a location for a template rendering commands help.voidsetCommandTemplate(String commandTemplate) Sets a location for a template rendering command help.voidsetShowGroups(boolean showGroups) Sets if groups should be shown in a listing, defaults to true.Methods inherited from class org.springframework.shell.standard.AbstractShellComponent
afterPropertiesSet, getApplicationContext, getCommandCatalog, getCompletionResolver, getResourceLoader, getShell, getTemplateExecutor, getTerminal, getThemeResolver, setApplicationContext, setResourceLoader
-
Constructor Details
-
Help
-
-
Method Details
-
help
@ShellMethod("Display help about available commands") public org.jline.utils.AttributedString help(@ShellOption(defaultValue="__NULL__",valueProvider=CommandValueProvider.class,value={"-C","--command"},help="The command to obtain help for.",arity=2147483647) String command) throws IOException - Throws:
IOException
-
setCommandTemplate
Sets a location for a template rendering command help.- Parameters:
commandTemplate- the command template location
-
setCommandsTemplate
Sets a location for a template rendering commands help.- Parameters:
commandsTemplate- the commands template location
-
setShowGroups
public void setShowGroups(boolean showGroups) Sets if groups should be shown in a listing, defaults to true. If not enabled a simple list is shown without groups.- Parameters:
showGroups- the flag to show groups
-