org.springframework.cloud.dataflow.shell.command

## Class ConfigCommands

- java.lang.Object
- - org.springframework.cloud.dataflow.shell.command.ConfigCommands

- All Implemented Interfaces:
    EventListener, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>, org.springframework.shell.core.CommandMarker

      @Component
       @Configuration
      public class ConfigCommands
      extends Object
      implements org.springframework.shell.core.CommandMarker, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>, org.springframework.context.ApplicationContextAware

  Configuration commands for the Shell. The default Data Flow Server location is `http://localhost:9393`
  Author:
    Gunnar Hillert, Marius Bogoevici, Ilayaperumal Gopinathan, Gary Russell, Mark Pollack, Eric Bottard, Mike Heath

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `HORIZONTAL_LINE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigCommands()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterPropertiesSet()` Will execute the targeting of the Data Flow server ONLY if the shell is executing shell command passed directly from the console using `--spring.shell.commandFile`.
    `List<Object>` | `info()`
    `void` | `onApplicationEvent(org.springframework.boot.context.event.ApplicationReadyEvent event)` Will execute the targeting of the Data Flow server ONLY if the shell is executing shell command passed directly from the console using `--spring.shell.commandFile`.
    `org.springframework.web.client.RestTemplate` | `restTemplate(org.springframework.core.env.Environment ev)`
    `void` | `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)`
    `void` | `setDataFlowShell(DataFlowShell shell)`
    `void` | `setRestTemplate(org.springframework.web.client.RestTemplate restTemplate)`
    `void` | `setServerUri(String serverUri)`
    `void` | `setTargetHolder(TargetHolder targetHolder)`
    `void` | `setUserInput(UserInput userInput)`
    `String` | `target(String targetUriString, String targetUsername, String targetPassword, String targetClientRegistrationId, String credentialsProviderCommand, boolean skipSslValidation, String proxyUri, String proxyUsername, String proxyPassword)`
    `String` | `triggerTarget()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.springframework.context.ApplicationListener

      `forPayload`

- - ### Field Detail

    - #### HORIZONTAL_LINE

          public static final String HORIZONTAL_LINE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ConfigCommands

          public ConfigCommands()

  - ### Method Detail

    - #### setUserInput

          @Autowired
          public void setUserInput(UserInput userInput)

    - #### setTargetHolder

          @Autowired
          public void setTargetHolder(TargetHolder targetHolder)

    - #### setDataFlowShell

          @Autowired
          public void setDataFlowShell(DataFlowShell shell)

    - #### setRestTemplate

          @Autowired
           @Qualifier(value="restTemplate")
          public void setRestTemplate(org.springframework.web.client.RestTemplate restTemplate)

    - #### restTemplate

          @Bean
          public org.springframework.web.client.RestTemplate restTemplate(org.springframework.core.env.Environment ev)

    - #### setServerUri

          public void setServerUri(String serverUri)

    - #### target

          @CliCommand(value="dataflow config server",
                      help="Configure the Spring Cloud Data Flow REST server to use")
          public String target(@CliOption(mandatory=false,key={"","uri"},help="the location of the Spring Cloud Data Flow REST endpoint",unspecifiedDefaultValue="http://localhost:9393/")
                                                                                                                                                       String targetUriString,
                                                                                                                                                       @CliOption(mandatory=false,key="username",help="the username for authenticated access to the Admin REST endpoint",unspecifiedDefaultValue="")
                                                                                                                                                       String targetUsername,
                                                                                                                                                       @CliOption(mandatory=false,key="password",help="the password for authenticated access to the Admin REST endpoint (valid only with a username)",specifiedDefaultValue="",unspecifiedDefaultValue="__NULL__")
                                                                                                                                                       String targetPassword,
                                                                                                                                                       @CliOption(mandatory=false,key="client-registration-id",help="the registration id for oauth2 config ",unspecifiedDefaultValue="dataflow-shell")
                                                                                                                                                       String targetClientRegistrationId,
                                                                                                                                                       @CliOption(mandatory=false,key="credentials-provider-command",help="a command to run that outputs the HTTP credentials used for authentication",unspecifiedDefaultValue="")
                                                                                                                                                       String credentialsProviderCommand,
                                                                                                                                                       @CliOption(mandatory=false,key="skip-ssl-validation",help="accept any SSL certificate (even self-signed)",specifiedDefaultValue="true",unspecifiedDefaultValue="false")
                                                                                                                                                       boolean skipSslValidation,
                                                                                                                                                       @CliOption(mandatory=false,key="proxy-uri",help="the uri of the proxy server",specifiedDefaultValue="",unspecifiedDefaultValue="__NULL__")
                                                                                                                                                       String proxyUri,
                                                                                                                                                       @CliOption(mandatory=false,key="proxy-username",help="the username for authenticated access to the secured proxy server",specifiedDefaultValue="",unspecifiedDefaultValue="__NULL__")
                                                                                                                                                       String proxyUsername,
                                                                                                                                                       @CliOption(mandatory=false,key="proxy-password",help="the password for authenticated access to the secured proxy server (valid only with a username)",specifiedDefaultValue="",unspecifiedDefaultValue="__NULL__")
                                                                                                                                                       String proxyPassword)

    - #### info

          @CliCommand(value="dataflow config info",
                      help="Show the Dataflow server being used")
          public List<Object> info()

    - #### triggerTarget

          public String triggerTarget()

    - #### onApplicationEvent

          public void onApplicationEvent(org.springframework.boot.context.event.ApplicationReadyEvent event)

      Will execute the targeting of the Data Flow server ONLY if the shell is executing shell command passed directly from the console using `--spring.shell.commandFile`. see also: https://github.com/spring-projects/spring-shell/issues/252
      Specified by:
        `onApplicationEvent` in interface `org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>`

    - #### afterPropertiesSet

          public void afterPropertiesSet()
                                  throws Exception

      Will execute the targeting of the Data Flow server ONLY if the shell is executing shell command passed directly from the console using `--spring.shell.commandFile`. see also: https://github.com/spring-projects/spring-shell/issues/252
      Specified by:
        `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`
      Throws:
        `Exception`

    - #### setApplicationContext

          public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                                     throws org.springframework.beans.BeansException

      Specified by:
        `setApplicationContext` in interface `org.springframework.context.ApplicationContextAware`
      Throws:
        `org.springframework.beans.BeansException`

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.