public interface AppRegistryService
| Modifier and Type | Method and Description |
|---|---|
boolean |
appExist(String name,
ApplicationType type)
Checks if an application with such name and type exists and is set as default.
|
boolean |
appExist(String name,
ApplicationType type,
String version)
Checks if an
AppRegistration with this name, type and version exists. |
void |
delete(String name,
ApplicationType type,
String version)
Deletes an
AppRegistration. |
void |
deleteAll(Iterable<AppRegistration> appRegistrations)
Deletes all provided
AppRegistration's. |
AppRegistration |
find(String name,
ApplicationType type) |
default AppRegistration |
find(String name,
ApplicationType type,
String version) |
List<AppRegistration> |
findAll() |
org.springframework.data.domain.Page<AppRegistration> |
findAll(org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Page<AppRegistration> |
findAllByTypeAndNameIsLike(ApplicationType type,
String name,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Page<AppRegistration> |
findAllByTypeAndNameIsLikeAndDefaultVersionIsTrue(ApplicationType type,
String name,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Page<AppRegistration> |
findAllByTypeAndNameIsLikeAndVersionAndDefaultVersion(ApplicationType type,
String name,
String version,
boolean defaultVersion,
org.springframework.data.domain.Pageable pageable)
Returns all app registrations based on various optional parameters.
|
Resource |
getAppMetadataResource(AppRegistration appRegistration)
Converts application's metadata URI into Spring resource object.
|
Resource |
getAppResource(AppRegistration appRegistration)
Converts application's URI into Spring resource object.
|
AppRegistration |
getDefaultApp(String name,
ApplicationType type) |
String |
getResourceVersion(Resource resource) |
String |
getResourceVersion(String uriString)
Returns the version for the given resource URI string.
|
String |
getResourceWithoutVersion(Resource resource)
Returns a string representing the resource with version subtracted
|
List<AppRegistration> |
importAll(boolean overwrite,
Resource... resources)
Import bulk of applications from input load files
|
AppRegistration |
save(AppRegistration app)
Save an
AppRegistration instance. |
AppRegistration |
save(String name,
ApplicationType type,
String version,
URI uri,
URI metadataUri,
org.springframework.cloud.dataflow.schema.AppBootSchemaVersion bootVersion)
Saves a new
AppRegistration identified by its name, type, version and URIs. |
void |
setDefaultApp(String name,
ApplicationType type,
String version)
Set an application with name, type and version as the default for all name:type
applications.
|
void |
validate(AppRegistration registration,
String uri,
String version)
Validate given registration with given uri and version.
|
AppRegistration getDefaultApp(String name, ApplicationType type)
name - application nametype - application versionvoid validate(AppRegistration registration, String uri, String version)
registration - app registrationuri - uri of the registrationversion - version of the registrationvoid setDefaultApp(String name, ApplicationType type, String version)
name - application nametype - application typeversion - application version.AppRegistration save(String name, ApplicationType type, String version, URI uri, URI metadataUri, org.springframework.cloud.dataflow.schema.AppBootSchemaVersion bootVersion)
AppRegistration identified by its name, type, version and URIs.name - Name of the AppRegistration to savetype - Type of the AppRegistration to saveversion - Version of the AppRegistration to saveuri - Resource uri of the AppRegistration to savemetadataUri - metadata of the AppRegistration to savebootVersion - Spring Boot schema version indicating Task 2, Batch 4 or Task 3, Batch 5void delete(String name, ApplicationType type, String version)
AppRegistration. If the AppRegistration does not exist, a
NoSuchAppRegistrationException will be thrown.name - Name of the AppRegistration to deletetype - Type of the AppRegistration to deleteversion - Version of the AppRegistration to deletevoid deleteAll(Iterable<AppRegistration> appRegistrations)
AppRegistration's.appRegistrations - the AppRegistrations that will be deletedboolean appExist(String name, ApplicationType type, String version)
AppRegistration with this name, type and version exists.name - application nametype - application typeversion - application version.org.springframework.data.domain.Page<AppRegistration> findAll(org.springframework.data.domain.Pageable pageable)
pageable - Pagination informationAppRegistration's including multiple version for the same
application. Uses the pagination.org.springframework.data.domain.Page<AppRegistration> findAllByTypeAndNameIsLike(ApplicationType type, String name, org.springframework.data.domain.Pageable pageable)
type - appliation typename - application namepageable - Pagination informationAppRegistration versions for given name and type. Uses the
pagination.org.springframework.data.domain.Page<AppRegistration> findAllByTypeAndNameIsLikeAndDefaultVersionIsTrue(ApplicationType type, String name, org.springframework.data.domain.Pageable pageable)
type - appliation typename - application namepageable - Pagination informationAppRegistrations that have the default version set to `true` and matches the given name and type. Uses the
pagination.boolean appExist(String name, ApplicationType type)
name - applicaiton nametype - applicaiton typeList<AppRegistration> findAll()
AppRegistration's including multiple version for the same
application.AppRegistration find(String name, ApplicationType type)
name - application nametype - application typdefault AppRegistration find(String name, ApplicationType type, String version)
name - application nametype - application typeversion - application versionList<AppRegistration> importAll(boolean overwrite, Resource... resources)
overwrite - if set to true this command will override and existing application
with same name:type:version If set to false operation will throw an exception in
the application already exists.resources - list of input load filesResource getAppResource(AppRegistration appRegistration)
appRegistration - the application registrationResource instance that corresponds to application's URIResource getAppMetadataResource(AppRegistration appRegistration)
appRegistration - the application registrationResource instance that corresponds to application's metdata URIAppRegistration save(AppRegistration app)
AppRegistration instance.app - appRegistration to saveString getResourceVersion(Resource resource)
resource - to retrieve the version forString getResourceWithoutVersion(Resource resource)
resource - to be represented as string.String getResourceVersion(String uriString)
uriString - String representation of the resource URIorg.springframework.data.domain.Page<AppRegistration> findAllByTypeAndNameIsLikeAndVersionAndDefaultVersion(@Nullable ApplicationType type, @Nullable String name, @Nullable String version, boolean defaultVersion, org.springframework.data.domain.Pageable pageable)
type - application typename - application nameversion - application versiondefaultVersion - application default versionpageable - Pagination informationAppRegistration versions for given name and type. Uses the
pagination.Copyright © 2023 Pivotal Software, Inc.. All rights reserved.