public interface AssetFactory
AssetSource
to create new Asset
s as needed.
Starting in Tapestry 5.4, the built-in implementations of this interface (for context assets, and for classpath assets)
were changed so that when underlying resources changed, the client URLs for Assets are discarded; this is necessitated by two factors:
1) the client URL
for an Asset now includes a checksum based on the content of the underlying resource, so a change to resource content
(during development) results in a change to the URL.
2) JavaScriptStack
(especially the ExtensibleJavaScriptStack
implementation)
made no provision for rebuilding the Assets post-construction, and there is no backwards compatible way to
introduce this concept (and JavaScriptStacks are something many applications and third-party libraries make use of).
So, starting in Tapestry 5.4, the implementations of Asset
should beAssetSource
Modifier and Type | Method and Description |
---|---|
Asset |
createAsset(Resource resource)
Creates an instance of an asset.
|
Resource |
getRootResource()
Returns the Resource representing the root folder of the domain this factory is responsible for.
|
Resource getRootResource()
Asset createAsset(Resource resource)
Asset2
.resource
- a resource within this factories domain (derived from the root
resource)${project.version} - Copyright © 2003-2015 The Apache Software Foundation.