Class AppRegistryCommands
java.lang.Object
org.springframework.cloud.dataflow.shell.command.AppRegistryCommands
- All Implemented Interfaces:
Aware
,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, Chris Bono
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Unique identifier for an application, including the name and type. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected AppRegistryOperations
defaultApplication
(AppRegistryCommands.QualifiedApplicationName application, String version) importFromResource
(String uri, boolean local, boolean force) info
(String name, ApplicationType type, String version, boolean exhaustive) 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.register
(String name, ApplicationType type, String uri, String metadataUri, boolean force) void
setResourceLoader
(ResourceLoader resourceLoader) unregister
(String name, ApplicationType type, String version)
-
Field Details
-
dataFlowShell
-
resourceLoader
-
-
Constructor Details
-
AppRegistryCommands
-
-
Method Details
-
setResourceLoader
- Specified by:
setResourceLoader
in interfaceResourceLoaderAware
-
availableWithViewRole
-
availableWithCreateRole
-
availableWithUModifyRole
-
availableWithDestroyRole
-
info
@ShellMethod(key="app info", value="Get information about an application") @ShellMethodAvailability("availableWithViewRole") public TablesInfo info(@ShellOption(value="--name",help="name of the application to query",valueProvider=ApplicationNameValueProvider.class) String name, @ShellOption(help="type of the application to query",valueProvider=org.springframework.shell.standard.EnumValueProvider.class) ApplicationType type, @ShellOption(help="the version for the registered application",defaultValue="__NULL__") String version, @ShellOption(help="return all metadata, including common Spring Boot properties",defaultValue="false") boolean exhaustive) -
unregister
@ShellMethod(key="app unregister", value="Unregister an application") @ShellMethodAvailability("availableWithDestroyRole") public String unregister(@ShellOption(value={"","--name"},help="name of the application to unregister",valueProvider=ApplicationNameValueProvider.class) String name, @ShellOption(help="type of the application to unregister",valueProvider=org.springframework.shell.standard.EnumValueProvider.class) ApplicationType type, @ShellOption(help="the version application to unregister",defaultValue="__NULL__") String version) -
unregisterAll
@ShellMethod(key="app all unregister", value="Unregister all applications") @ShellMethodAvailability("availableWithDestroyRole") public String unregisterAll() -
defaultApplication
@ShellMethod(key="app default", value="Change the default application version") @ShellMethodAvailability("availableWithUModifyRole") public String defaultApplication(@ShellOption(value={"","--id"},help="id of the application to query in the form of \'type:name\'") AppRegistryCommands.QualifiedApplicationName application, @ShellOption(help="the new default application version") String version) -
register
@ShellMethod(key="app register", value="Register a new application") @ShellMethodAvailability("availableWithCreateRole") public String register(@ShellOption(value={"","--name"},help="the name for the registered application") String name, @ShellOption(help="the type for the registered application",valueProvider=org.springframework.shell.standard.EnumValueProvider.class) ApplicationType type, @ShellOption(help="URI for the application artifact") String uri, @ShellOption(value={"-m","--metadata-uri","--metadataUri"},help="Metadata URI for the application artifact",defaultValue="__NULL__") String metadataUri, @ShellOption(help="force update if application is already registered (only if not in use)",defaultValue="false") boolean force) -
list
@ShellMethod(key="app list", value="List all registered applications") @ShellMethodAvailability("availableWithViewRole") public Object list(@ShellOption(value={"","--id"},help="id of the application to query in the form of \'type:name\'",defaultValue="__NULL__") AppRegistryCommands.QualifiedApplicationName application) -
importFromResource
@ShellMethod(key="app import", value="Register all applications listed in a properties file") @ShellMethodAvailability("availableWithCreateRole") public String importFromResource(@ShellOption(help="URI for the properties file") String uri, @ShellOption(help="whether to resolve the URI locally (as opposed to on the server)",defaultValue="true",arity=1) boolean local, @ShellOption(help="force update if any module already exists (only if not in use)",defaultValue="false") boolean force) -
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
-