@ShellComponent public class AppRegistryCommands extends Object implements ResourceLoaderAware
| Modifier and Type | Class and Description |
|---|---|
static class |
AppRegistryCommands.QualifiedApplicationName
Unique identifier for an application, including the name and type.
|
| Modifier and Type | Field and Description |
|---|---|
protected DataFlowShell |
dataFlowShell |
protected ResourceLoader |
resourceLoader |
| Constructor and Description |
|---|
AppRegistryCommands(DataFlowShell dataFlowShell) |
| Modifier and Type | Method and Description |
|---|---|
protected AppRegistryOperations |
appRegistryOperations() |
org.springframework.shell.Availability |
availableWithCreateRole() |
org.springframework.shell.Availability |
availableWithDestroyRole() |
org.springframework.shell.Availability |
availableWithUModifyRole() |
org.springframework.shell.Availability |
availableWithViewRole() |
String |
defaultApplication(AppRegistryCommands.QualifiedApplicationName application,
String version) |
String |
importFromResource(String uri,
boolean local,
boolean force) |
TablesInfo |
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,
org.springframework.cloud.dataflow.schema.AppBootSchemaVersion bootVersion,
String uri,
String metadataUri,
boolean force) |
void |
setResourceLoader(ResourceLoader resourceLoader) |
String |
unregister(String name,
ApplicationType type,
String version) |
String |
unregisterAll() |
protected final DataFlowShell dataFlowShell
protected ResourceLoader resourceLoader
public AppRegistryCommands(DataFlowShell dataFlowShell)
public void setResourceLoader(ResourceLoader resourceLoader)
setResourceLoader in interface ResourceLoaderAwarepublic org.springframework.shell.Availability availableWithViewRole()
public org.springframework.shell.Availability availableWithCreateRole()
public org.springframework.shell.Availability availableWithUModifyRole()
public org.springframework.shell.Availability availableWithDestroyRole()
@ShellMethod(key="app info",
value="Get information about an application")
@ShellMethodAvailability(value="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)
@ShellMethod(key="app unregister",
value="Unregister an application")
@ShellMethodAvailability(value="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)
@ShellMethod(key="app all unregister",
value="Unregister all applications")
@ShellMethodAvailability(value="availableWithDestroyRole")
public String unregisterAll()
@ShellMethod(key="app default",
value="Change the default application version")
@ShellMethodAvailability(value="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)
@ShellMethod(key="app register",
value="Register a new application")
@ShellMethodAvailability(value="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(value={"-b","--bootVersion"},help="the boot version to use for the registered application",defaultValue="__NULL__")
org.springframework.cloud.dataflow.schema.AppBootSchemaVersion bootVersion,
@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)
@ShellMethod(key="app list",
value="List all registered applications")
@ShellMethodAvailability(value="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)
@ShellMethod(key="app import",
value="Register all applications listed in a properties file")
@ShellMethodAvailability(value="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)
protected AppRegistryOperations appRegistryOperations()
protected String prettyPrintDefaultValue(org.springframework.boot.configurationmetadata.ConfigurationMetadataProperty o)
o - the configurationMetadataProperty to pretty printCopyright © 2023 Pivotal Software, Inc.. All rights reserved.