org.springframework.cloud.dataflow.shell.command

## Class AppRegistryCommands

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

- All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ResourceLoaderAware, org.springframework.shell.core.CommandMarker

      @Component
      public class AppRegistryCommands
      extends Object
      implements org.springframework.shell.core.CommandMarker, org.springframework.context.ResourceLoaderAware

  Commands for working with the application registry. Allows retrieval of information about available applications, as well as creating and removing application registrations.
  Author:
    Glenn Renfro, Eric Bottard, Florent Biville, David Turanski, Patrick Peralta, Mark Fisher, Thomas Risberg, Gunnar Hillert, Christian Tzolov, Chris Schaefer

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AppRegistryCommands.QualifiedApplicationName` Unique identifier for an application, including the name and type.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected DataFlowShell` | `dataFlowShell`
    `protected org.springframework.core.io.ResourceLoader` | `resourceLoader`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AppRegistryCommands()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected AppRegistryOperations` | `appRegistryOperations()`
    `boolean` | `availableWithCreateRole()`
    `boolean` | `availableWithDestroyRole()`
    `boolean` | `availableWithModifyRole()`
    `boolean` | `availableWithViewRole()`
    `String` | `defaultApplicaiton(AppRegistryCommands.QualifiedApplicationName application, String version)`
    `String` | `importFromResource(String uri, boolean local, boolean force)`
    `List<Object>` | `info(String name, ApplicationType type, String version, boolean exhaustive)`
    `Object` | `list(AppRegistryCommands.QualifiedApplicationName application)`
    `protected String` | `prettyPrintDefaultValue(org.springframework.boot.configurationmetadata.ConfigurationMetadataProperty o)` Escapes some special values so that they don't disturb console rendering and are easier to read.
    `String` | `register(String name, ApplicationType type, String uri, String metadataUri, boolean force)`
    `void` | `setDataFlowShell(DataFlowShell dataFlowShell)`
    `void` | `setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)`
    `String` | `unregister(String name, ApplicationType type, String version)`
    `String` | `unregisterAll()`

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

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

- - ### Field Detail

    - #### dataFlowShell

          protected DataFlowShell dataFlowShell

    - #### resourceLoader

          protected org.springframework.core.io.ResourceLoader resourceLoader

  - ### Constructor Detail

    - #### AppRegistryCommands

          public AppRegistryCommands()

  - ### Method Detail

    - #### setDataFlowShell

          @Autowired
          public void setDataFlowShell(DataFlowShell dataFlowShell)

    - #### setResourceLoader

          public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)

      Specified by:
        `setResourceLoader` in interface `org.springframework.context.ResourceLoaderAware`

    - #### availableWithCreateRole

          @CliAvailabilityIndicator(value={"app register","app import"})
          public boolean availableWithCreateRole()

    - #### availableWithDestroyRole

          @CliAvailabilityIndicator(value="app unregister")
          public boolean availableWithDestroyRole()

    - #### availableWithModifyRole

          @CliAvailabilityIndicator(value="app default")
          public boolean availableWithModifyRole()

    - #### availableWithViewRole

          @CliAvailabilityIndicator(value={"app info","app list"})
          public boolean availableWithViewRole()

    - #### info

          @CliCommand(value="app info",
                      help="Get information about an application")
          public List<Object> info(@CliOption(mandatory=true,key={"","name"},help="name of the application to query")
                                                                                                                          String name,
                                                                                                                          @CliOption(mandatory=true,key="type",help="type of the application to query")
                                                                                                                          ApplicationType type,
                                                                                                                          @CliOption(key="version",help="the version for the registered application")
                                                                                                                          String version,
                                                                                                                          @CliOption(key="exhaustive",help="return all metadata, including common Spring Boot properties",specifiedDefaultValue="true",unspecifiedDefaultValue="false")
                                                                                                                          boolean exhaustive)

    - #### unregister

          @CliCommand(value="app unregister",
                      help="Unregister an application")
          public String unregister(@CliOption(mandatory=true,key={"","name"},help="name of the application to unregister")
                                                                                                                     String name,
                                                                                                                     @CliOption(mandatory=true,key="type",help="type of the application to unregister")
                                                                                                                     ApplicationType type,
                                                                                                                     @CliOption(key="version",help="the version application to unregister")
                                                                                                                     String version)

    - #### unregisterAll

          @CliCommand(value="app all unregister",
                      help="Unregister all applications")
          public String unregisterAll()

    - #### defaultApplicaiton

          @CliCommand(value="app default",
                      help="Change the default application version")
          public String defaultApplicaiton(@CliOption(mandatory=true,key={"","id"},help="id of the application to query in the form of \'type:name\'")
                                                                                                                                       AppRegistryCommands.QualifiedApplicationName application,
                                                                                                                                       @CliOption(mandatory=true,key="version",help="the new default application version")
                                                                                                                                       String version)

    - #### register

          @CliCommand(value="app register",
                      help="Register a new application")
          public String register(@CliOption(mandatory=true,key={"","name"},help="the name for the registered application")
                                                                                                                  String name,
                                                                                                                  @CliOption(mandatory=true,key="type",help="the type for the registered application")
                                                                                                                  ApplicationType type,
                                                                                                                  @CliOption(mandatory=true,key="uri",help="URI for the application artifact")
                                                                                                                  String uri,
                                                                                                                  @CliOption(key="metadata-uri",help="Metadata URI for the application artifact")
                                                                                                                  String metadataUri,
                                                                                                                  @CliOption(key="force",help="force update if application is already registered (only if not in use)",specifiedDefaultValue="true",unspecifiedDefaultValue="false")
                                                                                                                  boolean force)

    - #### list

          @CliCommand(value="app list",
                      help="List all registered applications")
          public Object list(@CliOption(key={"","id"},help="id of the application to query in the form of \'type:name\'")
                                                                                                                AppRegistryCommands.QualifiedApplicationName application)

    - #### importFromResource

          @CliCommand(value="app import",
                      help="Register all applications listed in a properties file")
          public String importFromResource(@CliOption(mandatory=true,key={"","uri"},help="URI for the properties file")
                                                                                                                                                     String uri,
                                                                                                                                                     @CliOption(key="local",help="whether to resolve the URI locally (as opposed to on the server)",specifiedDefaultValue="true",unspecifiedDefaultValue="true")
                                                                                                                                                     boolean local,
                                                                                                                                                     @CliOption(key="force",help="force update if any module already exists (only if not in use)",specifiedDefaultValue="true",unspecifiedDefaultValue="false")
                                                                                                                                                     boolean force)

    - #### appRegistryOperations

          protected AppRegistryOperations appRegistryOperations()

    - #### prettyPrintDefaultValue

          protected String prettyPrintDefaultValue(org.springframework.boot.configurationmetadata.ConfigurationMetadataProperty o)

      Escapes some special values so that they don't disturb console rendering and are easier to read.
      Parameters:
        `o` - the configurationMetadataProperty to pretty print
      Returns:
        the pretty printed value

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