Class AppRegistryTemplate
java.lang.Object
org.springframework.cloud.dataflow.rest.client.AppRegistryTemplate
- All Implemented Interfaces:
AppRegistryOperations
Implementation of
AppRegistryOperations
that uses RestTemplate
to issue
commands to the Data Flow server.- Author:
- Eric Bottard, Glenn Renfro, Mark Fisher, Gunnar Hillert, Patrick Peralta, Christian Tzolov, Chris Schaefer, Chris Bono, Corneil du Plessis
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAppRegistryTemplate
(RestTemplate restTemplate, org.springframework.hateoas.RepresentationModel<?> resourceSupport) Construct aAppRegistryTemplate
object. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.hateoas.PagedModel<AppRegistrationResource>
importFromResource
(String uri, boolean force) Register all applications listed in a properties file.info
(String name, ApplicationType type, boolean exhaustive) Retrieve information about an application registration.info
(String name, ApplicationType type, String version, boolean exhaustive) Retrieve information about an application registration.org.springframework.hateoas.PagedModel<AppRegistrationResource>
list()
Return a list of all application registrations.org.springframework.hateoas.PagedModel<AppRegistrationResource>
list
(ApplicationType type) Return a list of all application registrations for the givenApplicationType
.void
makeDefault
(String name, ApplicationType type, String version) Set application version to defaultregister
(String name, ApplicationType type, String uri, String metadataUri, boolean force) Register an application name and type with its Maven coordinates.register
(String name, ApplicationType type, String version, String uri, String metadataUri, boolean force) Register an application name, type and version with its Maven coordinates.org.springframework.hateoas.PagedModel<AppRegistrationResource>
registerAll
(Properties apps, boolean force) Register all applications provided as key/value pairs.void
unregister
(String name, ApplicationType applicationType) Unregister an application name and type.void
unregister
(String name, ApplicationType applicationType, String version) Unregister an application by name type and versionvoid
Unregister all applications.
-
Field Details
-
restTemplate
Template used for http interaction.
-
-
Constructor Details
-
AppRegistryTemplate
public AppRegistryTemplate(RestTemplate restTemplate, org.springframework.hateoas.RepresentationModel<?> resourceSupport) Construct aAppRegistryTemplate
object.- Parameters:
restTemplate
- template for HTTP/rest commandsresourceSupport
- HATEOAS link support
-
-
Method Details
-
list
Description copied from interface:AppRegistryOperations
Return a list of all application registrations.- Specified by:
list
in interfaceAppRegistryOperations
- Returns:
- list of all application registrations
-
list
Description copied from interface:AppRegistryOperations
Return a list of all application registrations for the givenApplicationType
.- Specified by:
list
in interfaceAppRegistryOperations
- Parameters:
type
- application type for which to return a list of registrations- Returns:
- list of all application registrations for the given application type
-
unregister
Description copied from interface:AppRegistryOperations
Unregister an application name and type.- Specified by:
unregister
in interfaceAppRegistryOperations
- Parameters:
name
- application nameapplicationType
- application type
-
unregister
Description copied from interface:AppRegistryOperations
Unregister an application by name type and version- Specified by:
unregister
in interfaceAppRegistryOperations
- Parameters:
name
- application nameapplicationType
- application typeversion
- application version
-
unregisterAll
public void unregisterAll()Description copied from interface:AppRegistryOperations
Unregister all applications.- Specified by:
unregisterAll
in interfaceAppRegistryOperations
-
info
Description copied from interface:AppRegistryOperations
Retrieve information about an application registration.- Specified by:
info
in interfaceAppRegistryOperations
- Parameters:
name
- name of applicationtype
- application typeexhaustive
- return all metadata, including common Spring Boot properties- Returns:
- detailed information about an application registration
-
info
public DetailedAppRegistrationResource info(String name, ApplicationType type, String version, boolean exhaustive) Description copied from interface:AppRegistryOperations
Retrieve information about an application registration.- Specified by:
info
in interfaceAppRegistryOperations
- Parameters:
name
- name of applicationtype
- application typeversion
- application versionexhaustive
- return all metadata, including common Spring Boot properties- Returns:
- detailed information about an application registration
-
register
public AppRegistrationResource register(String name, ApplicationType type, String uri, String metadataUri, boolean force) Description copied from interface:AppRegistryOperations
Register an application name and type with its Maven coordinates.- Specified by:
register
in interfaceAppRegistryOperations
- Parameters:
name
- application nametype
- application typeuri
- URI for the application artifactmetadataUri
- URI for the application metadata artifactforce
- iftrue
, overwrites a pre-existing registration- Returns:
- the new app registration
-
register
public AppRegistrationResource register(String name, ApplicationType type, String version, String uri, String metadataUri, boolean force) Description copied from interface:AppRegistryOperations
Register an application name, type and version with its Maven coordinates.- Specified by:
register
in interfaceAppRegistryOperations
- Parameters:
name
- application nametype
- application typeversion
- application versionuri
- URI for the application artifactmetadataUri
- URI for the application metadata artifactforce
- iftrue
, overwrites a pre-existing registration- Returns:
- the new app registration
-
importFromResource
public org.springframework.hateoas.PagedModel<AppRegistrationResource> importFromResource(String uri, boolean force) Description copied from interface:AppRegistryOperations
Register all applications listed in a properties file.- Specified by:
importFromResource
in interfaceAppRegistryOperations
- Parameters:
uri
- URI for the properties fileforce
- iftrue
, overwrites any pre-existing registrations- Returns:
- the paged list of new app registrations
-
registerAll
public org.springframework.hateoas.PagedModel<AppRegistrationResource> registerAll(Properties apps, boolean force) Description copied from interface:AppRegistryOperations
Register all applications provided as key/value pairs.- Specified by:
registerAll
in interfaceAppRegistryOperations
- Parameters:
apps
- the apps as key/value pairs where key is "type.name" and value is a URIforce
- iftrue
, overwrites any pre-existing registrations- Returns:
- the paged list of new app registrations
-
makeDefault
Description copied from interface:AppRegistryOperations
Set application version to default- Specified by:
makeDefault
in interfaceAppRegistryOperations
- Parameters:
name
- application nametype
- application typeversion
- application version
-