Class AssetPathConstructorImpl
java.lang.Object
org.apache.tapestry5.internal.services.assets.AssetPathConstructorImpl
- All Implemented Interfaces:
AssetPathConstructor
-
Constructor Summary
ConstructorsConstructorDescriptionAssetPathConstructorImpl
(Request request, BaseURLSource baseURLSource, boolean fullyQualified, String uncompressedAssetPrefix, PathConstructor pathConstructor, AssetPathConverter pathConverter) -
Method Summary
Modifier and TypeMethodDescriptionconstructAssetPath
(String virtualFolder, String path, StreamableResource resource) Constructs an asset URL path from the virtual folder and path (within the virtual folder).
-
Constructor Details
-
AssetPathConstructorImpl
public AssetPathConstructorImpl(Request request, BaseURLSource baseURLSource, @Symbol("tapestry.asset-url-fully-qualified") boolean fullyQualified, @Symbol("tapestry.asset-path-prefix") String uncompressedAssetPrefix, PathConstructor pathConstructor, AssetPathConverter pathConverter)
-
-
Method Details
-
constructAssetPath
public String constructAssetPath(String virtualFolder, String path, StreamableResource resource) throws IOException Description copied from interface:AssetPathConstructor
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_QUALIFIED
symbol), the result is passed through theAssetPathConverter
.- Specified by:
constructAssetPath
in interfaceAssetPathConstructor
- Parameters:
virtualFolder
- corresponds to aAssetRequestHandler
contributed to the AssetDispatcher servicepath
- a path that can be used to identify the underlyingResource
or 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
AssetDispatcher
to find and stream the resource - Throws:
IOException
- See Also:
-