org.dbmaintain.launch.task
Class DbMaintainTask

java.lang.Object
  extended by org.dbmaintain.launch.task.DbMaintainTask
Direct Known Subclasses:
CreateScriptArchiveTask, DbMaintainDatabaseTask

public abstract class DbMaintainTask
extends Object

Base DbMaintain task

Author:
Filip Neven, Tim Ducheyne

Constructor Summary
DbMaintainTask()
           
 
Method Summary
protected abstract  void addTaskConfiguration(TaskConfiguration configuration)
          Implement by adding specific configuration for this task
protected  MainFactory createMainFactory(TaskConfiguration taskConfiguration)
           
protected abstract  boolean doExecute(MainFactory mainFactory)
          Implement by invoking the actual behavior
 boolean execute()
          Performs the task (e.g. updating the database)
protected  TaskConfiguration getTaskConfiguration(File customConfigFile)
           
 void setConfigFile(File configFile)
           
 void setEnvironmentProperties(Properties environmentProperties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbMaintainTask

public DbMaintainTask()
Method Detail

execute

public boolean execute()
Performs the task (e.g. updating the database)

Returns:
True if the task was performed, false if nothing needed to be done

addTaskConfiguration

protected abstract void addTaskConfiguration(TaskConfiguration configuration)
Implement by adding specific configuration for this task

Parameters:
configuration - the configuration object that assembles all dbmaintain property values, not null

doExecute

protected abstract boolean doExecute(MainFactory mainFactory)
Implement by invoking the actual behavior

Parameters:
mainFactory - The main factory, not null
Returns:
True if the task was performed

getTaskConfiguration

protected TaskConfiguration getTaskConfiguration(File customConfigFile)
Parameters:
customConfigFile - A file contain custom configuration, null if there is no custom config
Returns:
The DbMaintain configuration for this task

createMainFactory

protected MainFactory createMainFactory(TaskConfiguration taskConfiguration)

setConfigFile

public void setConfigFile(File configFile)

setEnvironmentProperties

public void setEnvironmentProperties(Properties environmentProperties)


Copyright © 2011. All Rights Reserved.