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

@ShellComponent public class Help extends org.springframework.shell.standard.AbstractShellComponent
A command to display help about all available commands.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    Marker interface for beans providing help functionality to the shell.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Help(org.springframework.shell.style.TemplateExecutor templateExecutor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.jline.utils.AttributedString
    help(String[] command)
     
    void
    setCommandsTemplate(String commandsTemplate)
    Sets a location for a template rendering commands help.
    void
    setCommandTemplate(String commandTemplate)
    Sets a location for a template rendering command help.
    void
    setShowGroups(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Help

      public Help(org.springframework.shell.style.TemplateExecutor templateExecutor)
  • Method Details

    • help

      @ShellMethod("Display help about available commands") public org.jline.utils.AttributedString help(@ShellOption(defaultValue="__NULL__",valueProvider=org.springframework.shell.standard.CommandValueProvider.class,value={"-C","--command"},help="The command to obtain help for.",arity=2147483647) String[] command) throws IOException
      Throws:
      IOException
    • setCommandTemplate

      public void setCommandTemplate(String commandTemplate)
      Sets a location for a template rendering command help.
      Parameters:
      commandTemplate - the command template location
    • setCommandsTemplate

      public void setCommandsTemplate(String commandsTemplate)
      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