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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAppRegistryTemplate(RestTemplate restTemplate, org.springframework.hateoas.RepresentationModel<?> resourceSupport) Construct aAppRegistryTemplateobject. -
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.voidmakeDefault(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.voidunregister(String name, ApplicationType applicationType) Unregister an application name and type.voidunregister(String name, ApplicationType applicationType, String version) Unregister an application by name type and versionvoidUnregister all applications.
-
Field Details
-
restTemplate
Template used for http interaction.
-
-
Constructor Details
-
AppRegistryTemplate
public AppRegistryTemplate(RestTemplate restTemplate, org.springframework.hateoas.RepresentationModel<?> resourceSupport) Construct aAppRegistryTemplateobject.- Parameters:
restTemplate- template for HTTP/rest commandsresourceSupport- HATEOAS link support
-
-
Method Details
-
list
Description copied from interface:AppRegistryOperationsReturn a list of all application registrations.- Specified by:
listin interfaceAppRegistryOperations- Returns:
- list of all application registrations
-
list
Description copied from interface:AppRegistryOperationsReturn a list of all application registrations for the givenApplicationType.- Specified by:
listin 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:AppRegistryOperationsUnregister an application name and type.- Specified by:
unregisterin interfaceAppRegistryOperations- Parameters:
name- application nameapplicationType- application type
-
unregister
Description copied from interface:AppRegistryOperationsUnregister an application by name type and version- Specified by:
unregisterin interfaceAppRegistryOperations- Parameters:
name- application nameapplicationType- application typeversion- application version
-
unregisterAll
public void unregisterAll()Description copied from interface:AppRegistryOperationsUnregister all applications.- Specified by:
unregisterAllin interfaceAppRegistryOperations
-
info
Description copied from interface:AppRegistryOperationsRetrieve information about an application registration.- Specified by:
infoin 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:AppRegistryOperationsRetrieve information about an application registration.- Specified by:
infoin 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:AppRegistryOperationsRegister an application name and type with its Maven coordinates.- Specified by:
registerin 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:AppRegistryOperationsRegister an application name, type and version with its Maven coordinates.- Specified by:
registerin 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:AppRegistryOperationsRegister all applications listed in a properties file.- Specified by:
importFromResourcein 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:AppRegistryOperationsRegister all applications provided as key/value pairs.- Specified by:
registerAllin 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:AppRegistryOperationsSet application version to default- Specified by:
makeDefaultin interfaceAppRegistryOperations- Parameters:
name- application nametype- application typeversion- application version
-