org.cafesip.upgrade
Interface ScriptRunner

All Known Implementing Classes:
AntScriptRunner, SqlScriptRunner

public interface ScriptRunner

An interface that class must implement in order to be registered as a script runner object. A script runner object executes a file of a particular type. When the upgrader tool/ant task processes a patch file, it looks at the file extension to determine which runner object will be used to execute the file. Custom script runner objects can be registered by the application by setting the property - org.cafesip.upgrade.custom.runners. The value for the property must be of the format:

ext1:classname ex2:classname ...

where ext1 is the extension (without the dot) and classname is the fully qualified name of the script runner class.

System-level runners are included with the source code and can be added to the resource file - runners.properties. Note that system-level script runners can be overridden using the property described above.

Author:
Amit Chatterjee

Method Summary
 void execute(java.io.File file)
          The upgrader tool calls this method when a patch of a particular type needs to be executed.
 

Method Detail

execute

void execute(java.io.File file)
             throws java.lang.Exception
The upgrader tool calls this method when a patch of a particular type needs to be executed. This is where the runner class needs to add the logic of handling the file.

Parameters:
file - the file to be processed
Throws:
java.lang.Exception - when an error is encountered


Copyright © 2009 CafeSip.org. All Rights Reserved.