public interface VersionStrategy
VersionResourceResolver
.VersionResourceResolver
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addVersionToUrl(java.lang.String baseUrl,
java.util.List<? extends Resource> locations,
ResourceResolverChain chain)
Adds a version string to the given baseUrl.
|
java.lang.String |
deleteVersionFromPath(java.lang.String requestPath,
java.lang.String candidateVersion)
Deletes the given candidate version string from the given request path.
|
java.lang.String |
extractVersionFromPath(java.lang.String requestPath)
Extracts a version string from the request path.
|
boolean |
resourceVersionMatches(Resource baseResource,
java.lang.String candidateVersion)
Checks whether the given
Resource matches the candidate version string. |
java.lang.String extractVersionFromPath(java.lang.String requestPath)
requestPath
- the request path of the resource being resolvedjava.lang.String deleteVersionFromPath(java.lang.String requestPath, java.lang.String candidateVersion)
requestPath
- the request path of the resource being resolvedcandidateVersion
- the candidate version stringboolean resourceVersionMatches(Resource baseResource, java.lang.String candidateVersion)
Resource
matches the candidate version string.
Useful when the version string is managed on a per-resource basis.baseResource
- the resource to check against the given versioncandidateVersion
- the candidate version for the given resourcejava.lang.String addVersionToUrl(java.lang.String baseUrl, java.util.List<? extends Resource> locations, ResourceResolverChain chain)
baseUrl
- the baseUrl of the requested resourcelocations
- the resource locations to resolve resources fromchain
- the chain of resource resolvers