Package org.apache.tapestry5.services
Interface AssetFactory
-
- All Known Implementing Classes:
AbstractAssetFactory
,ClasspathAssetFactory
,ContextAssetFactory
,ExternalUrlAssetFactory
public interface AssetFactory
Used byAssetSource
to create newAsset
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 theExtensibleJavaScriptStack
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 ofAsset
should be- See Also:
AssetSource
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
getRootResource
Resource getRootResource()
Returns the Resource representing the root folder of the domain this factory is responsible for.
-
createAsset
Asset createAsset(Resource resource)
Creates an instance of an asset.- Parameters:
resource
- a resource within this factories domain (derived from the root resource)- Returns:
- an Asset for the resource
-
-