Interface AssetPathConstructor
-
- All Known Implementing Classes:
AssetPathConstructorImpl
public interface AssetPathConstructor
Encapsulates the logic or creating the path portion of an asset URL, including hooking theAssetPathConverterinto the generation.- Since:
- 5.2.0
- See Also:
PathConstructor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringconstructAssetPath(java.lang.String virtualFolder, java.lang.String path, StreamableResource resource)Constructs an asset URL path from the virtual folder and path (within the virtual folder).
-
-
-
Method Detail
-
constructAssetPath
@IncompatibleChange(release="5.4", details="resource parameter added, IOException may now be thrown") java.lang.String constructAssetPath(java.lang.String virtualFolder, java.lang.String path, StreamableResource resource) throws java.io.IOException
Constructs an asset URL path from the virtual folder and path (within the virtual folder). After constructing the string (and honoring theSymbolConstants.ASSET_URL_FULL_QUALIFIEDsymbol), the result is passed through theAssetPathConverter.- Parameters:
virtualFolder- corresponds to aAssetRequestHandlercontributed to the AssetDispatcher servicepath- a path that can be used to identify the underlyingResourceor or re-acquire theStreamableResource; this will be the final portion of the URL, after the appropriate prefix (based on whether the resource is compressed or not) and the checksum for the resourceresource- underlying resource for the asset path; the checksum portion of the URL is obtained from the resource- Returns:
- path portion of asset URL, which is everything needed by the
AssetDispatcherto find and stream the resource - Throws:
java.io.IOException- See Also:
StreamableResourceSource
-
-