org.apache.tapestry5.services
Interface AssetFactory

All Known Implementing Classes:
ClasspathAssetFactory, ContextAssetFactory

public interface AssetFactory

Used by AssetSource to create new Assets as needed.

See Also:
AssetSource

Method Summary
 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. Starting with 5.1.0.0, it is preferred (but not required) that the factory return an instance of Asset2.

Parameters:
resource - a resource within this factories domain (derived from the root resource)
Returns:
an Asset for the resource


Copyright © 2003-2012 The Apache Software Foundation.