Interface ScriptBundleExecutor
-
- All Known Implementing Classes:
ScriptBundleExecutorImpl
public interface ScriptBundleExecutorExecutes a set of zero or more SQL scripts.- Author:
- Matt Ward
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexec(boolean logOnly, java.lang.String dir, java.lang.String... scripts)Runs a bundle of scripts.voidexec(java.lang.String dir, java.lang.String... scripts)Runs a bundle of scripts.voidexecWithPostScript(java.lang.String dir, java.lang.String postScript, java.lang.String... scripts)Runs a bundle of scripts.
-
-
-
Method Detail
-
exec
void exec(boolean logOnly, java.lang.String dir, java.lang.String... scripts)Runs a bundle of scripts. If any script within the bundle fails, then the rest of the files are not run.- Parameters:
logOnly- true to catch and log any exceptions or false to rethrowdir- Directory where the script bundle may be found.scripts- Names of the SQL scripts to run, relative to the specified directory.- Throws:
org.alfresco.error.AlfrescoRuntimeException- if a script fails and the logOnly flag is false
-
exec
void exec(java.lang.String dir, java.lang.String... scripts)Runs a bundle of scripts. If any script within the bundle fails, then the rest of the files are not run.- Parameters:
dir- Directory where the script bundle may be found.scripts- Names of the SQL scripts to run, relative to the specified directory.
-
execWithPostScript
void execWithPostScript(java.lang.String dir, java.lang.String postScript, java.lang.String... scripts)Runs a bundle of scripts. If any script within the bundle fails, then the rest of the files are not run, with the exception of postScript - which is always run (a clean-up script for example).- Parameters:
dir- Directory where the script bundle may be found.postScript- A script that is always run after the other scripts.scripts- Names of the SQL scripts to run, relative to the specified directory.
-
-