Interface ScriptBundleExecutor

All Known Implementing Classes:
ScriptBundleExecutorImpl

public interface ScriptBundleExecutor
Executes a set of zero or more SQL scripts.
Author:
Matt Ward
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    exec(boolean logOnly, String dir, String... scripts)
    Runs a bundle of scripts.
    void
    exec(String dir, String... scripts)
    Runs a bundle of scripts.
    void
    execWithPostScript(String dir, String postScript, String... scripts)
    Runs a bundle of scripts.
  • Method Details

    • exec

      void exec(boolean logOnly, String dir, 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 rethrow
      dir - 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(String dir, 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(String dir, String postScript, 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.