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.core.io.Resource |
getAppMetadataResource(AppRegistration appRegistration)
Converts application's metadata URI into Spring resource object.
|
org.springframework.core.io.Resource |
getAppResource(AppRegistration appRegistration)
Converts application's URI into Spring resource object.
|
AppRegistration |
getDefaultApp(String name,
ApplicationType type) |
String |
getResourceVersion(org.springframework.core.io.Resource resource) |
String |
getResourceVersion(String uriString)
Returns the version for the given resource URI string.
|
String |
getResourceWithoutVersion(org.springframework.core.io.Resource resource)
Returns a string representing the resource with version subtracted
|
List<AppRegistration> |
importAll(boolean overwrite,
org.springframework.core.io.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)
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)
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 savevoid 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.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, org.springframework.core.io.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 filesorg.springframework.core.io.Resource getAppResource(AppRegistration appRegistration)
appRegistration - the application registrationResource instance that corresponds to application's URIorg.springframework.core.io.Resource 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(org.springframework.core.io.Resource resource)
resource - to retrieve the version forString getResourceWithoutVersion(org.springframework.core.io.Resource resource)
resource - to be represented as string.Copyright © 2020 Pivotal Software, Inc.. All rights reserved.