Java Code Examples for org.springframework.shell.core.CommandMarker

The following examples show how to use org.springframework.shell.core.CommandMarker. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: zeppelin   Source File: LensJLineShellComponent.java    License: Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("rawtypes")
public void afterPropertiesSet() {

  Map<String, CommandMarker> commands = BeanFactoryUtils.beansOfTypeIncludingAncestors(
          applicationContext, CommandMarker.class);
  for (CommandMarker command : commands.values()) {
    getSimpleParser().add(command);
  }

  Map<String, Converter> converters = BeanFactoryUtils.beansOfTypeIncludingAncestors(
          applicationContext, Converter.class);
  for (Converter<?> converter : converters.values()) {
    getSimpleParser().add(converter);
  }
  
  setHistorySize(commandLine.getHistorySize());
  if (commandLine.getShellCommandsToExecute() != null) {
    setPrintBanner(false);
  }
}
 
Example 2
Source Project: gemfirexd-oss   Source File: Gfsh.java    License: Apache License 2.0 4 votes vote down vote up
public void add(final CommandMarker command) {
  commandManager.add(command);
}
 
Example 3
Source Project: gemfirexd-oss   Source File: Gfsh.java    License: Apache License 2.0 4 votes vote down vote up
public void add(final CommandMarker command) {
  commandManager.add(command);
}
 
Example 4
Source Project: ambari-shell   Source File: ShellConfiguration.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
CommandMarker exitCommand() {
  return new ExitCommands();
}
 
Example 5
Source Project: ambari-shell   Source File: ShellConfiguration.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
CommandMarker versionCommands() {
  return new VersionCommands();
}
 
Example 6
Source Project: ambari-shell   Source File: ShellConfiguration.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
CommandMarker helpCommands() {
  return new HelpCommands();
}
 
Example 7
Source Project: ambari-shell   Source File: ShellConfiguration.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
CommandMarker scriptCommands() {
  return new ScriptCommands();
}