public class AppRegistryTemplate extends Object implements AppRegistryOperations
AppRegistryOperations
that uses RestTemplate
to issue
commands to the Data Flow server.Modifier and Type | Field and Description |
---|---|
protected RestTemplate |
restTemplate
Template used for http interaction.
|
Constructor and Description |
---|
AppRegistryTemplate(RestTemplate restTemplate,
org.springframework.hateoas.RepresentationModel<?> resourceSupport)
Construct a
AppRegistryTemplate object. |
Modifier and Type | Method and Description |
---|---|
org.springframework.hateoas.PagedModel<AppRegistrationResource> |
importFromResource(String uri,
boolean force)
Register all applications listed in a properties file.
|
DetailedAppRegistrationResource |
info(String name,
ApplicationType type,
boolean exhaustive)
Retrieve information about an application registration.
|
DetailedAppRegistrationResource |
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 given
ApplicationType . |
void |
makeDefault(String name,
ApplicationType type,
String version)
Set application version to default
|
AppRegistrationResource |
register(String name,
ApplicationType type,
String uri,
String metadataUri,
org.springframework.cloud.dataflow.schema.AppBootSchemaVersion bootVersion,
boolean force)
Register an application name, type, and boot version with its Maven coordinates.
|
AppRegistrationResource |
register(String name,
ApplicationType type,
String uri,
String metadataUri,
boolean force)
Register an application name and type with its Maven coordinates.
|
AppRegistrationResource |
register(String name,
ApplicationType type,
String version,
String uri,
String metadataUri,
org.springframework.cloud.dataflow.schema.AppBootSchemaVersion bootVersion,
boolean force)
Register an application name, type, boot version, and version with its Maven coordinates.
|
AppRegistrationResource |
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 version
|
void |
unregisterAll()
Unregister all applications.
|
protected RestTemplate restTemplate
public AppRegistryTemplate(RestTemplate restTemplate, org.springframework.hateoas.RepresentationModel<?> resourceSupport)
AppRegistryTemplate
object.restTemplate
- template for HTTP/rest commandsresourceSupport
- HATEOAS link supportpublic org.springframework.hateoas.PagedModel<AppRegistrationResource> list()
AppRegistryOperations
list
in interface AppRegistryOperations
public org.springframework.hateoas.PagedModel<AppRegistrationResource> list(ApplicationType type)
AppRegistryOperations
ApplicationType
.list
in interface AppRegistryOperations
type
- application type for which to return a list of registrationspublic void unregister(String name, ApplicationType applicationType)
AppRegistryOperations
unregister
in interface AppRegistryOperations
name
- application nameapplicationType
- application typepublic void unregister(String name, ApplicationType applicationType, String version)
AppRegistryOperations
unregister
in interface AppRegistryOperations
name
- application nameapplicationType
- application typeversion
- application versionpublic void unregisterAll()
AppRegistryOperations
unregisterAll
in interface AppRegistryOperations
public DetailedAppRegistrationResource info(String name, ApplicationType type, boolean exhaustive)
AppRegistryOperations
info
in interface AppRegistryOperations
name
- name of applicationtype
- application typeexhaustive
- return all metadata, including common Spring Boot propertiespublic DetailedAppRegistrationResource info(String name, ApplicationType type, String version, boolean exhaustive)
AppRegistryOperations
info
in interface AppRegistryOperations
name
- name of applicationtype
- application typeversion
- application versionexhaustive
- return all metadata, including common Spring Boot propertiespublic AppRegistrationResource register(String name, ApplicationType type, String uri, String metadataUri, boolean force)
AppRegistryOperations
register
in interface AppRegistryOperations
name
- application nametype
- application typeuri
- URI for the application artifactmetadataUri
- URI for the application metadata artifactforce
- if true
, overwrites a pre-existing registrationpublic AppRegistrationResource register(String name, ApplicationType type, String uri, String metadataUri, org.springframework.cloud.dataflow.schema.AppBootSchemaVersion bootVersion, boolean force)
AppRegistryOperations
register
in interface AppRegistryOperations
name
- application nametype
- application typeuri
- URI for the application artifactmetadataUri
- URI for the application metadata artifactbootVersion
- application boot versionforce
- if true
, overwrites a pre-existing registrationpublic AppRegistrationResource register(String name, ApplicationType type, String version, String uri, String metadataUri, boolean force)
AppRegistryOperations
register
in interface AppRegistryOperations
name
- application nametype
- application typeversion
- application versionuri
- URI for the application artifactmetadataUri
- URI for the application metadata artifactforce
- if true
, overwrites a pre-existing registrationpublic AppRegistrationResource register(String name, ApplicationType type, String version, String uri, String metadataUri, org.springframework.cloud.dataflow.schema.AppBootSchemaVersion bootVersion, boolean force)
AppRegistryOperations
register
in interface AppRegistryOperations
name
- application nametype
- application typeversion
- application versionuri
- URI for the application artifactmetadataUri
- URI for the application metadata artifactbootVersion
- application boot versionforce
- if true
, overwrites a pre-existing registrationpublic org.springframework.hateoas.PagedModel<AppRegistrationResource> importFromResource(String uri, boolean force)
AppRegistryOperations
importFromResource
in interface AppRegistryOperations
uri
- URI for the properties fileforce
- if true
, overwrites any pre-existing registrationspublic org.springframework.hateoas.PagedModel<AppRegistrationResource> registerAll(Properties apps, boolean force)
AppRegistryOperations
registerAll
in interface AppRegistryOperations
apps
- the apps as key/value pairs where key is "type.name" and value is a URIforce
- if true
, overwrites any pre-existing registrationspublic void makeDefault(String name, ApplicationType type, String version)
AppRegistryOperations
makeDefault
in interface AppRegistryOperations
name
- application nametype
- application typeversion
- application versionCopyright © 2024 Pivotal Software, Inc.. All rights reserved.