public abstract class AbstractFileNameVersionStrategy extends Object implements VersionStrategy
VersionStrategy
implementations, e.g. "static/myresource-version.js"Constructor and Description |
---|
AbstractFileNameVersionStrategy() |
Modifier and Type | Method and Description |
---|---|
String |
addVersion(String requestPath,
String version)
Add a version to the given request path.
|
String |
extractVersion(String requestPath)
Extract the resource version from the request path.
|
String |
removeVersion(String requestPath,
String version)
Remove the version from the request path.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResourceVersion
protected final Log logger
public String extractVersion(String requestPath)
VersionStrategy
extractVersion
in interface VersionStrategy
requestPath
- the request path to checknull
if none was foundpublic String removeVersion(String requestPath, String version)
VersionStrategy
VersionStrategy.extractVersion(String)
.removeVersion
in interface VersionStrategy
requestPath
- the request path of the resource being resolvedversion
- the version obtained from VersionStrategy.extractVersion(String)
public String addVersion(String requestPath, String version)
VersionStrategy
addVersion
in interface VersionStrategy
requestPath
- the requestPathversion
- the version