public abstract class AbstractAppRegistryCommon extends Object implements AppRegistryCommon
AppRegistryCommon implementation common for the Classic and the Skipper modes.| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.cloud.deployer.resource.maven.MavenProperties |
mavenProperties |
static String |
METADATA_KEY_SUFFIX |
protected org.springframework.core.io.ResourceLoader |
resourceLoader |
protected static Function<Map.Entry<Object,Object>,AbstractMap.SimpleImmutableEntry<String,URI>> |
toStringAndUriFunc |
| Constructor and Description |
|---|
AbstractAppRegistryCommon(org.springframework.core.io.ResourceLoader resourceLoader) |
AbstractAppRegistryCommon(org.springframework.core.io.ResourceLoader resourceLoader,
org.springframework.cloud.deployer.resource.maven.MavenProperties mavenProperties) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
List<AppRegistration> |
importAll(boolean overwrite,
org.springframework.core.io.Resource... resources)
Import bulk of applications from input load files
|
protected abstract boolean |
isOverwrite(AppRegistration app,
boolean overwrite) |
protected Properties |
loadProperties(org.springframework.core.io.Resource resource) |
protected URI |
metadataUriFromProperties(String key,
Properties properties) |
protected Stream<AppRegistration> |
toValidAppRegistration(Map.Entry<String,URI> kv,
URI metadataURI)
Builds a
Stream from key/value mapping. |
protected URI |
warnOnMalformedURI(String key,
URI uri) |
public static final String METADATA_KEY_SUFFIX
protected org.springframework.core.io.ResourceLoader resourceLoader
protected org.springframework.cloud.deployer.resource.maven.MavenProperties mavenProperties
public AbstractAppRegistryCommon(org.springframework.core.io.ResourceLoader resourceLoader)
public AbstractAppRegistryCommon(org.springframework.core.io.ResourceLoader resourceLoader,
org.springframework.cloud.deployer.resource.maven.MavenProperties mavenProperties)
public org.springframework.core.io.Resource getAppResource(AppRegistration appRegistration)
AppRegistryCommongetAppResource in interface AppRegistryCommonResource instance that corresponds to application's URIpublic org.springframework.core.io.Resource getAppMetadataResource(AppRegistration appRegistration)
AppRegistryCommongetAppMetadataResource in interface AppRegistryCommonResource instance that corresponds to application's metdata URIprotected Properties loadProperties(org.springframework.core.io.Resource resource)
public List<AppRegistration> importAll(boolean overwrite, org.springframework.core.io.Resource... resources)
AppRegistryCommonimportAll in interface AppRegistryCommonoverwrite - 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 filesprotected abstract boolean isOverwrite(AppRegistration app, boolean overwrite)
protected Stream<AppRegistration> toValidAppRegistration(Map.Entry<String,URI> kv, URI metadataURI)
Stream from key/value mapping.kv - key/value representing app key (key) and app URI (value)metadataURI - metadataUri computed from a given app keyprotected URI metadataUriFromProperties(String key, Properties properties)
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.