VersionStrategy implementations.
Supports versions as:
Note
This base class does not provide support for generating the version string.
| Modifier and Type | Class and Description |
|---|---|
| protected static class | AbstractVersionStrategy.
File name-based |
| protected static class | AbstractVersionStrategy.
A prefix-based |
| Modifier and Type | Field and Description |
|---|---|
| protected final Log | |
| private final VersionPathStrategy |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public String | addVersion(String
the requestPath requestPath, String the version version)Implements org. Add a version to the given request path. |
| public String | extractVersion(String
the request path to check requestPath)Implements org. Extract the resource version from the request path. |
| public VersionPathStrategy | |
| public String | removeVersion(String
the request path of the resource being resolved requestPath, String the version obtained from version)extractVersion(String)Implements org. Remove the version from the request path. |
| logger | back to summary |
|---|---|
| protected final Log logger | |
| pathStrategy | back to summary |
|---|---|
| private final VersionPathStrategy pathStrategy | |
| AbstractVersionStrategy | back to summary |
|---|---|
| protected AbstractVersionStrategy(VersionPathStrategy pathStrategy) | |
| addVersion | back to summary |
|---|---|
| public String addVersion(String requestPath, String version) Implements org. Doc from org. Add a version to the given request path. | |
| extractVersion | back to summary |
|---|---|
| public String extractVersion(String requestPath) Implements org. Doc from org. Extract the resource version from the request path. | |
| getVersionPathStrategy | back to summary |
|---|---|
| public VersionPathStrategy getVersionPathStrategy() | |
| removeVersion | back to summary |
|---|---|
| public String removeVersion(String requestPath, String version) Implements org. Doc from org. Remove the version from the request path. It is assumed that the given
version was extracted via
| |
VersionPathStrategy,
e.g. "path/foo-{version}.css".
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public String | addVersion(String
the requestPath requestPath, String the version version)Implements org. Add a version to the given request path. |
| public String | extractVersion(String
the request path to check requestPath)Implements org. Extract the resource version from the request path. |
| public String | removeVersion(String
the request path of the resource being resolved requestPath, String the version obtained from version)extractVersion(String)Implements org. Remove the version from the request path. |
| pattern | back to summary |
|---|---|
| private static final Pattern pattern | |
| FileNameVersionPathStrategy | back to summary |
|---|---|
| protected FileNameVersionPathStrategy() | |
| addVersion | back to summary |
|---|---|
| public String addVersion(String requestPath, String version) Implements org. Doc from org. Add a version to the given request path. | |
| extractVersion | back to summary |
|---|---|
| public String extractVersion(String requestPath) Implements org. Doc from org. Extract the resource version from the request path. | |
| removeVersion | back to summary |
|---|---|
| public String removeVersion(String requestPath, String version) Implements org. Doc from org. Remove the version from the request path. It is assumed that the given
version was extracted via
| |
VersionPathStrategy,
e.g. "{version}/path/foo.js".
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | addVersion(String
the requestPath path, String the version version)Implements org. Add a version to the given request path. |
| public String | extractVersion(String
the request path to check requestPath)Implements org. Extract the resource version from the request path. |
| public String | removeVersion(String
the request path of the resource being resolved requestPath, String the version obtained from version)extractVersion(String)Implements org. Remove the version from the request path. |
| prefix | back to summary |
|---|---|
| private final String prefix | |
| PrefixVersionPathStrategy | back to summary |
|---|---|
| public PrefixVersionPathStrategy(String version) | |
| addVersion | back to summary |
|---|---|
| public String addVersion(String path, String version) Implements org. Doc from org. Add a version to the given request path. | |
| extractVersion | back to summary |
|---|---|
| public String extractVersion(String requestPath) Implements org. Doc from org. Extract the resource version from the request path. | |
| removeVersion | back to summary |
|---|---|
| public String removeVersion(String requestPath, String version) Implements org. Doc from org. Remove the version from the request path. It is assumed that the given
version was extracted via
| |