public class AppResourceCommon extends Object
| Constructor and Description |
|---|
AppResourceCommon(org.springframework.cloud.deployer.resource.maven.MavenProperties mavenProperties,
org.springframework.core.io.ResourceLoader resourceLoader) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.core.io.Resource |
getMetadataResource(URI appUri,
URI metadataUri)
Resolves the metadata resource if provided or falls back to the apps resources otherwise.
|
org.springframework.core.io.Resource |
getResource(String resourceUri)
Retrieve the corresponding
Resource instance based on the URI String. |
String |
getResourceVersion(org.springframework.core.io.Resource resource)
Extracts the version from the resource.
|
String |
getResourceWithoutVersion(org.springframework.core.io.Resource resource)
Returns a string representing the resource with version subtracted
|
public AppResourceCommon(org.springframework.cloud.deployer.resource.maven.MavenProperties mavenProperties,
org.springframework.core.io.ResourceLoader resourceLoader)
public String getResourceVersion(org.springframework.core.io.Resource resource)
DockerResource, and UrlResource.resource - the resource to use.public org.springframework.core.io.Resource getResource(String resourceUri)
Resource instance based on the URI String.
Maven properties are used if the URI corresponds to maven resource.resourceUri - String representation of the resource URIpublic String getResourceWithoutVersion(org.springframework.core.io.Resource resource)
resource - to be represented as string.public org.springframework.core.io.Resource getMetadataResource(URI appUri, URI metadataUri)
appUri - the App Resource URI to fall back to in case of missing metadata URImetadataUri - Metadata resource URICopyright © 2020 Pivotal Software, Inc.. All rights reserved.