org.apache.manifoldcf.core
Class DBInitializationCommand

java.lang.Object
  extended by org.apache.manifoldcf.core.DBInitializationCommand
All Implemented Interfaces:
InitializationCommand
Direct Known Subclasses:
DBCreate, DBDrop

public abstract class DBInitializationCommand
extends java.lang.Object
implements InitializationCommand

Parent class for all database initialization related commands. This class provides methods to obtain username and password for the database.

Author:
Jettro Coenradie

Constructor Summary
DBInitializationCommand(java.lang.String userName, java.lang.String password)
          The userName and password for the database on which the command needs to be performed
 
Method Summary
protected abstract  void doExecute(IThreadContext tc)
           
 void execute()
          Execute the command.
protected  java.lang.String getPassword()
           
protected  java.lang.String getUserName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBInitializationCommand

public DBInitializationCommand(java.lang.String userName,
                               java.lang.String password)
The userName and password for the database on which the command needs to be performed

Parameters:
userName - String containing the mandatory database username
password - String containing the mandatory database password
Method Detail

execute

public void execute()
             throws ManifoldCFException
Description copied from interface: InitializationCommand
Execute the command.

Specified by:
execute in interface InitializationCommand
Throws:
ManifoldCFException - Thrown if the execution fails

doExecute

protected abstract void doExecute(IThreadContext tc)
                           throws ManifoldCFException
Throws:
ManifoldCFException

getPassword

protected java.lang.String getPassword()

getUserName

protected java.lang.String getUserName()