atg.droplet.sql
Class DBCopyFormHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
              extended by atg.droplet.GenericFormHandler
                  extended by atg.droplet.sql.DBCopyFormHandler
All Implemented Interfaces:
DropletFormHandler, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class DBCopyFormHandler
extends GenericFormHandler

This form handler uses a DBCopier to copy data from one database to another.

See Also:
DBCopier

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.droplet.GenericFormHandler
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
DBCopyFormHandler()
           
 
Method Summary
 DBCopier getDBCopier()
          This is the class that actually performs the copy.
 java.lang.String getDestinationPassword()
          The password to use when copying to destinationServer
 java.lang.String getDestinationServer()
          The name of the server to copy to
 java.lang.String getDestinationUser()
          The username to use when copying to destinationServer
 java.lang.String getErrorURL()
          where to go on error
 java.lang.String getSourcePassword()
          The password to use when copying from sourceServer
 java.lang.String getSourceServer()
          The name of the server to copy from.
 java.lang.String getSourceUser()
          The username to use when copying from sourceServer
 int getStatus()
          The result of DBCopier.copy
 java.lang.String getSuccessURL()
          Where to go on success
 boolean handleCopy(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Uses the DBCopier to copy the source database to the destination.
 void setDBCopier(DBCopier pDBCopier)
           
 void setDestinationPassword(java.lang.String pDestinationPassword)
           
 void setDestinationServer(java.lang.String pDestinationServer)
           
 void setDestinationUser(java.lang.String pDestinationUser)
           
 void setErrorURL(java.lang.String pErrorURL)
           
 void setSourcePassword(java.lang.String pSourcePassword)
           
 void setSourceServer(java.lang.String pSourceServer)
           
 void setSourceUser(java.lang.String pSourceUser)
           
 void setSuccessURL(java.lang.String pSuccessURL)
           
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
 
Methods inherited from class atg.droplet.EmptyFormHandler
afterGet, beforeGet
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

DBCopyFormHandler

public DBCopyFormHandler()
Method Detail

setDBCopier

public void setDBCopier(DBCopier pDBCopier)

getDBCopier

public DBCopier getDBCopier()
This is the class that actually performs the copy. This property should be set to a subclass of DBCopier that matches the database you are using. If you are using Solid, then use SolidDBCopier. If you are using Oracle, then use OracleDBCopier. If you are using DB2, then use DB2DBCopier.


setSourceServer

public void setSourceServer(java.lang.String pSourceServer)

getSourceServer

public java.lang.String getSourceServer()
The name of the server to copy from.


setSourceUser

public void setSourceUser(java.lang.String pSourceUser)

getSourceUser

public java.lang.String getSourceUser()
The username to use when copying from sourceServer


setSourcePassword

public void setSourcePassword(java.lang.String pSourcePassword)

getSourcePassword

public java.lang.String getSourcePassword()
The password to use when copying from sourceServer


setDestinationServer

public void setDestinationServer(java.lang.String pDestinationServer)

getDestinationServer

public java.lang.String getDestinationServer()
The name of the server to copy to


setDestinationUser

public void setDestinationUser(java.lang.String pDestinationUser)

getDestinationUser

public java.lang.String getDestinationUser()
The username to use when copying to destinationServer


setDestinationPassword

public void setDestinationPassword(java.lang.String pDestinationPassword)

getDestinationPassword

public java.lang.String getDestinationPassword()
The password to use when copying to destinationServer


getStatus

public int getStatus()
The result of DBCopier.copy


setSuccessURL

public void setSuccessURL(java.lang.String pSuccessURL)

getSuccessURL

public java.lang.String getSuccessURL()
Where to go on success


setErrorURL

public void setErrorURL(java.lang.String pErrorURL)

getErrorURL

public java.lang.String getErrorURL()
where to go on error


handleCopy

public boolean handleCopy(DynamoHttpServletRequest pRequest,
                          DynamoHttpServletResponse pResponse)
                   throws javax.servlet.ServletException,
                          java.io.IOException
Uses the DBCopier to copy the source database to the destination.

Parameters:
pRequest - The request object.
pResponse - The response object.
Returns:
true if succesful, false otherwise
Throws:
javax.servlet.ServletException
java.io.IOException