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