org.apache.tapestry5.internal.services
Class ClasspathAssetFactory

java.lang.Object
  extended by org.apache.tapestry5.internal.services.ClasspathAssetFactory
All Implemented Interfaces:
AssetFactory

@Marker(value=ClasspathProvider.class)
public class ClasspathAssetFactory
extends Object
implements AssetFactory

Generates Assets for files on the classpath. Caches generated client URLs internally, and clears that cache when notified to do so by the ResourceDigestManager.

See Also:
AssetDispatcher

Constructor Summary
ClasspathAssetFactory(ResourceDigestManager digestManager, ClasspathAssetAliasManager aliasManager, AssetPathConverter converter)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClasspathAssetFactory

public ClasspathAssetFactory(ResourceDigestManager digestManager,
                             ClasspathAssetAliasManager aliasManager,
                             AssetPathConverter converter)
Method Detail

createAsset

public Asset createAsset(Resource resource)
Description copied from interface: AssetFactory
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.

Specified by:
createAsset in interface AssetFactory
Parameters:
resource - a resource within this factories domain (derived from the root resource)
Returns:
an Asset for the resource

getRootResource

public Resource getRootResource()
Description copied from interface: AssetFactory
Returns the Resource representing the root folder of the domain this factory is responsible for.

Specified by:
getRootResource in interface AssetFactory


Copyright © 2003-2012 The Apache Software Foundation.