org.apache.tapestry.internal.transform
Class AbstractIncludeAssetWorker

java.lang.Object
  extended by org.apache.tapestry.internal.transform.AbstractIncludeAssetWorker
All Implemented Interfaces:
ComponentClassTransformWorker
Direct Known Subclasses:
IncludeJavaScriptLibraryWorker, IncludeStylesheetWorker

public abstract class AbstractIncludeAssetWorker
extends Object
implements ComponentClassTransformWorker

Base class for workers that automatically inlcude assets in the page (via methods on PageRenderSupport).


Constructor Summary
AbstractIncludeAssetWorker(AssetSource assetSource, SymbolSource symbolSource)
           
 
Method Summary
protected  void addOperationForAssetPaths(ClassTransformation transformation, MutableComponentModel model, String[] assetPaths)
          Expands symbols in the path, then adds an operation into the setup render phase of the component.
protected abstract  void handleAsset(Asset asset)
          Invoked, from the component's setup render phase, for each asset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.services.ComponentClassTransformWorker
transform
 

Constructor Detail

AbstractIncludeAssetWorker

public AbstractIncludeAssetWorker(AssetSource assetSource,
                                  SymbolSource symbolSource)
Method Detail

addOperationForAssetPaths

protected final void addOperationForAssetPaths(ClassTransformation transformation,
                                               MutableComponentModel model,
                                               String[] assetPaths)
Expands symbols in the path, then adds an operation into the setup render phase of the component. Ultimately, handleAsset(org.apache.tapestry.Asset) will be invoked for each asset (dervied from assetPaths).

Parameters:
transformation - transformation process for component
model - component model for component
assetPaths - raw paths to be converted to assets

handleAsset

protected abstract void handleAsset(Asset asset)
Invoked, from the component's setup render phase, for each asset. This method must be threadsafe. Most implementation pass the asset to a particular method of PageRenderSupport.

Parameters:
asset - to be processed


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.