Class ScriptBundleExecutorImpl
- java.lang.Object
-
- org.alfresco.repo.domain.schema.script.ScriptBundleExecutorImpl
-
- All Implemented Interfaces:
ScriptBundleExecutor
public class ScriptBundleExecutorImpl extends java.lang.Object implements ScriptBundleExecutor
ScriptBundleExecutorimplementation. Uses the suppliedScriptExecutorto invoke multiple SQL scripts in a particular directory.- Author:
- Matt Ward, Derek Hulley
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Loglog
-
Constructor Summary
Constructors Constructor Description ScriptBundleExecutorImpl(ScriptExecutor scriptExecutor)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Constructor Detail
-
ScriptBundleExecutorImpl
public ScriptBundleExecutorImpl(ScriptExecutor scriptExecutor)
-
-
Method Detail
-
exec
public void exec(boolean logOnly, java.lang.String dir, java.lang.String... scripts)Description copied from interface:ScriptBundleExecutorRuns a bundle of scripts. If any script within the bundle fails, then the rest of the files are not run.- Specified by:
execin interfaceScriptBundleExecutor- 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.
-
exec
public void exec(java.lang.String dir, java.lang.String... scripts)Description copied from interface:ScriptBundleExecutorRuns a bundle of scripts. If any script within the bundle fails, then the rest of the files are not run.- Specified by:
execin interfaceScriptBundleExecutor- Parameters:
dir- Directory where the script bundle may be found.scripts- Names of the SQL scripts to run, relative to the specified directory.
-
execWithPostScript
public void execWithPostScript(java.lang.String dir, java.lang.String postScript, java.lang.String... scripts)Description copied from interface:ScriptBundleExecutorRuns 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).- Specified by:
execWithPostScriptin interfaceScriptBundleExecutor- 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.
-
-