public class AppRegistry extends AbstractAppRegistryCommon implements AppRegistryCommon
UriRegistry that operates on higher level
AppRegistration objects and supports on-demand loading of Resources.
Stores AppRegistration with up to two keys:
mavenProperties, METADATA_KEY_SUFFIX, resourceLoader, toStringAndUriFunc| Constructor and Description |
|---|
AppRegistry(org.springframework.cloud.deployer.resource.registry.UriRegistry uriRegistry,
org.springframework.core.io.ResourceLoader resourceLoader) |
AppRegistry(org.springframework.cloud.deployer.resource.registry.UriRegistry uriRegistry,
org.springframework.core.io.ResourceLoader resourceLoader,
org.springframework.cloud.deployer.resource.maven.MavenProperties mavenProperties) |
| 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.
|
void |
delete(String name,
ApplicationType type)
Deletes an
AppRegistration. |
AppRegistration |
find(String name,
ApplicationType type) |
List<AppRegistration> |
findAll() |
org.springframework.data.domain.Page<AppRegistration> |
findAll(org.springframework.data.domain.Pageable pageable) |
protected boolean |
isOverwrite(AppRegistration app,
boolean overwrite) |
AppRegistration |
save(AppRegistration app)
Save an
AppRegistration instance. |
AppRegistration |
save(String name,
ApplicationType type,
URI uri,
URI metadataUri) |
Stream<AppRegistration> |
toValidAppRegistration(Map.Entry<String,URI> kv,
URI metadataURI)
Builds a
Stream from key/value mapping. |
getAppMetadataResource, getAppResource, importAll, loadProperties, metadataUriFromProperties, warnOnMalformedURIclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfind, getAppMetadataResource, getAppResource, importAllpublic AppRegistry(org.springframework.cloud.deployer.resource.registry.UriRegistry uriRegistry,
org.springframework.core.io.ResourceLoader resourceLoader)
public AppRegistry(org.springframework.cloud.deployer.resource.registry.UriRegistry uriRegistry,
org.springframework.core.io.ResourceLoader resourceLoader,
org.springframework.cloud.deployer.resource.maven.MavenProperties mavenProperties)
public AppRegistration find(String name, ApplicationType type)
find in interface AppRegistryCommonname - application nametype - application typpublic List<AppRegistration> findAll()
findAll in interface AppRegistryCommonAppRegistration's including multiple version for the same
application.public org.springframework.data.domain.Page<AppRegistration> findAll(org.springframework.data.domain.Pageable pageable)
public AppRegistration save(String name, ApplicationType type, URI uri, URI metadataUri)
public Stream<AppRegistration> toValidAppRegistration(Map.Entry<String,URI> kv, URI metadataURI)
AbstractAppRegistryCommonStream from key/value mapping.toValidAppRegistration in class AbstractAppRegistryCommonkv - key/value representing app key (key) and app URI (value)metadataURI - metadataUri computed from a given app keyprotected boolean isOverwrite(AppRegistration app, boolean overwrite)
isOverwrite in class AbstractAppRegistryCommonpublic AppRegistration save(AppRegistration app)
AppRegistryCommonAppRegistration instance.save in interface AppRegistryCommonapp - appRegistration to savepublic void delete(String name, ApplicationType type)
AppRegistration. If the AppRegistration does not exist, a
NoSuchAppRegistrationException will be thrown.name - Name of the AppRegistration to deletetype - Type of the AppRegistration to deletepublic boolean appExist(String name, ApplicationType type)
AppRegistryCommonappExist in interface AppRegistryCommonname - applicaiton nametype - applicaiton typeCopyright © 2018 Pivotal Software, Inc.. All rights reserved.