Package org.apache.tapestry5.internal.services.assets

## Class AssetPathConstructorImpl

- java.lang.Object
- - org.apache.tapestry5.internal.services.assets.AssetPathConstructorImpl

- All Implemented Interfaces:
    `AssetPathConstructor`

      public class AssetPathConstructorImpl
      extends java.lang.Object
      implements AssetPathConstructor

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AssetPathConstructorImpl​(Request request, BaseURLSource baseURLSource, boolean fullyQualified, java.lang.String uncompressedAssetPrefix, PathConstructor pathConstructor, AssetPathConverter pathConverter)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `constructAssetPath​(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).

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AssetPathConstructorImpl

          public AssetPathConstructorImpl​(Request request,
                                          BaseURLSource baseURLSource,
                                          @Symbol("tapestry.asset-url-fully-qualified")
                                          boolean fullyQualified,
                                          @Symbol("tapestry.asset-path-prefix")
                                          java.lang.String uncompressedAssetPrefix,
                                          PathConstructor pathConstructor,
                                          AssetPathConverter pathConverter)

  - ### Method Detail

    - #### constructAssetPath

          public java.lang.String constructAssetPath​(java.lang.String virtualFolder,
                                                     java.lang.String path,
                                                     StreamableResource resource)
                                              throws java.io.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 the `SymbolConstants.ASSET_URL_FULL_QUALIFIED` symbol), the result is passed through the `AssetPathConverter`.
      Specified by:
        `constructAssetPath` in interface `AssetPathConstructor`
      Parameters:
        `virtualFolder` - corresponds to a `AssetRequestHandler` contributed to the AssetDispatcher service
        `path` - a path that can be used to identify the underlying `Resource` or or re-acquire the `StreamableResource`; 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 resource
        `resource` - 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:
        `java.io.IOException`
      See Also:
        `StreamableResourceSource`