@Component public class AppRegistryCommands extends Object implements org.springframework.shell.core.CommandMarker, org.springframework.context.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 org.springframework.core.io.ResourceLoader |
resourceLoader |
Constructor and Description |
---|
AppRegistryCommands() |
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() |
protected DataFlowShell dataFlowShell
protected org.springframework.core.io.ResourceLoader resourceLoader
@Autowired public void setDataFlowShell(DataFlowShell dataFlowShell)
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader
in interface org.springframework.context.ResourceLoaderAware
@CliAvailabilityIndicator(value={"app register","app import"}) public boolean availableWithCreateRole()
@CliAvailabilityIndicator(value="app unregister") public boolean availableWithDestroyRole()
@CliAvailabilityIndicator(value="app default") public boolean availableWithModifyRole()
@CliAvailabilityIndicator(value={"app info","app list"}) public boolean availableWithViewRole()
@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)
@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)
@CliCommand(value="app all unregister", help="Unregister all applications") public String unregisterAll()
@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)
@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)
@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)
@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)
protected AppRegistryOperations appRegistryOperations()
protected String prettyPrintDefaultValue(org.springframework.boot.configurationmetadata.ConfigurationMetadataProperty o)
o
- the configurationMetadataProperty to pretty printCopyright © 2020 Pivotal Software, Inc.. All rights reserved.