org.dbmaintain.script.executedscriptinfo
Interface ExecutedScriptInfoSource

All Known Implementing Classes:
DefaultExecutedScriptInfoSource

public interface ExecutedScriptInfoSource

Interface that enables registering which scripts were executed on the database and retrieving this information afterwards.

Author:
Filip Neven, Tim Ducheyne

Method Summary
 void clearAllExecutedScripts()
          Clears all script executions that have been registered.
 void deleteAllExecutedPostprocessingScripts()
          Removes all previously registered executed postprocessing scripts
 void deleteExecutedScript(ExecutedScript executedScript)
          Remove the given executed script from the executed scripts
 Set<ExecutedScript> getExecutedScripts()
           
 void markErrorScriptsAsSuccessful()
          Marks the failed scripts in the executed scripts table as successful.
 void registerExecutedScript(ExecutedScript executedScript)
          Registers the fact that the given script has been executed on the database
 void removeErrorScripts()
          Removes the failed scripts in the executed scripts table.
 void renameExecutedScript(ExecutedScript executedScript, Script renamedToScript)
          Registers the fact that the script that was originally executed has been renamed.
 void resetCachedState()
          Resets the cached state, for example when the scripts table was modified by another process.
 void updateExecutedScript(ExecutedScript executedScript)
          Updates the given registered script
 

Method Detail

registerExecutedScript

void registerExecutedScript(ExecutedScript executedScript)
Registers the fact that the given script has been executed on the database

Parameters:
executedScript - The script that was executed on the database

updateExecutedScript

void updateExecutedScript(ExecutedScript executedScript)
Updates the given registered script

Parameters:
executedScript - The script to update, not null

clearAllExecutedScripts

void clearAllExecutedScripts()
Clears all script executions that have been registered. After having invoked this method, getExecutedScripts() will return an empty set.


getExecutedScripts

Set<ExecutedScript> getExecutedScripts()
Returns:
All scripts that were registered as being executed on the database

deleteExecutedScript

void deleteExecutedScript(ExecutedScript executedScript)
Remove the given executed script from the executed scripts

Parameters:
executedScript - The executed script, which is no longer part of the executed scripts

renameExecutedScript

void renameExecutedScript(ExecutedScript executedScript,
                          Script renamedToScript)
Registers the fact that the script that was originally executed has been renamed.

Parameters:
executedScript - the original executed script that still refers to the original script
renamedToScript - the script to which the original script has been renamed

deleteAllExecutedPostprocessingScripts

void deleteAllExecutedPostprocessingScripts()
Removes all previously registered executed postprocessing scripts


markErrorScriptsAsSuccessful

void markErrorScriptsAsSuccessful()
Marks the failed scripts in the executed scripts table as successful.


removeErrorScripts

void removeErrorScripts()
Removes the failed scripts in the executed scripts table.


resetCachedState

void resetCachedState()
Resets the cached state, for example when the scripts table was modified by another process. The scripts will be reloaded the next time.



Copyright © 2011. All Rights Reserved.