org.apache.tapestry.enhance
Class InjectScriptWorker

java.lang.Object
  extended by org.apache.tapestry.enhance.InjectScriptWorker
All Implemented Interfaces:
InjectEnhancementWorker

public class InjectScriptWorker
extends java.lang.Object
implements InjectEnhancementWorker

Injects IScript instances directly into pages or components.

Since:
4.0
Author:
Howard M. Lewis Ship

Constructor Summary
InjectScriptWorker()
           
 
Method Summary
 void injectScript(EnhancementOperation op, java.lang.String propertyName, java.lang.String scriptName, org.apache.hivemind.Location location)
          Injects a compiled script.
 void performEnhancement(EnhancementOperation op, InjectSpecification spec)
          Perform the enhancement defined by the InjectSpecification.
 void setSource(IScriptSource source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectScriptWorker

public InjectScriptWorker()
Method Detail

performEnhancement

public void performEnhancement(EnhancementOperation op,
                               InjectSpecification spec)
Description copied from interface: InjectEnhancementWorker
Perform the enhancement defined by the InjectSpecification. Thrown runtime exceptions are caught and reported by the invoker.

Specified by:
performEnhancement in interface InjectEnhancementWorker

injectScript

public void injectScript(EnhancementOperation op,
                         java.lang.String propertyName,
                         java.lang.String scriptName,
                         org.apache.hivemind.Location location)
Injects a compiled script.

Parameters:
op - the enhancement operation
propertyName - the name of the property to inject
scriptName - the name of the script (relative to the location)
location - the location of the specification; primarily used as the base location for finding the script.

setSource

public void setSource(IScriptSource source)