edu.jhu.tmaj.servlet.request.impl
Class InitDatabaseRequest

java.lang.Object
  extended by edu.jhu.tmaj.servlet.request.impl.InitDatabaseRequest
All Implemented Interfaces:
CommandRequest, java.io.Serializable

public final class InitDatabaseRequest
extends java.lang.Object
implements CommandRequest, java.io.Serializable

This class allows the user to fill the database with sample data and a default user account when they are setting up the application for the first time, rather than having to run a platform-dependent database script separately. The exact INSERT statements are hard-coded, and only executed if the table they run on is empty at the time the request is made.

See Also:
Serialized Form

Constructor Summary
InitDatabaseRequest()
           
 
Method Summary
 CommandResponse executeCommand()
          Executes code on the server side that queries the database, and returns a ServerResponse.
 java.lang.String getPassword()
          This method should not be needed for this request.
 java.lang.String getUsername()
          This method should not be needed for this request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitDatabaseRequest

public InitDatabaseRequest()
Method Detail

executeCommand

public CommandResponse executeCommand()
Description copied from interface: CommandRequest
Executes code on the server side that queries the database, and returns a ServerResponse. ExecuteCommand should verify the username and password supplied with the request, and determines if the user has permission to execute the request.

Specified by:
executeCommand in interface CommandRequest

getUsername

public final java.lang.String getUsername()
This method should not be needed for this request.

Specified by:
getUsername in interface CommandRequest

getPassword

public final java.lang.String getPassword()
This method should not be needed for this request. A password is not required for this Request, as this Request is performed before there are any records in the Users table.

Specified by:
getPassword in interface CommandRequest