public class SwitchDataSourceFormHandler extends GenericFormHandler
SwitchingDataSource
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
SwitchDataSourceFormHandler() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getErrorURL()
where to go on error
|
java.lang.String |
getNextDataSource()
The name of the data source to switch to.
|
java.lang.String |
getSuccessURL()
Where to go on success
|
SwitchingDataSource |
getSwitchingDataSource()
This is the data source being controlled by this form handler.
|
boolean |
handlePrepareForSwitch(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Switching a data source is a two step process.
|
boolean |
handleSwitchDataSource(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This handler method performs the second step in the switch
process: the switch.
|
void |
setErrorURL(java.lang.String pErrorURL) |
void |
setNextDataSource(java.lang.String pNextDataSource) |
void |
setSuccessURL(java.lang.String pSuccessURL) |
void |
setSwitchingDataSource(SwitchingDataSource pSwitchingDataSource) |
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
afterGet, beforeGet
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
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public void setSwitchingDataSource(SwitchingDataSource pSwitchingDataSource)
public SwitchingDataSource getSwitchingDataSource()
public void setNextDataSource(java.lang.String pNextDataSource)
public java.lang.String getNextDataSource()
public void setSuccessURL(java.lang.String pSuccessURL)
public java.lang.String getSuccessURL()
public void setErrorURL(java.lang.String pErrorURL)
public java.lang.String getErrorURL()
public boolean handlePrepareForSwitch(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- The request object.pResponse
- The response object.javax.servlet.ServletException
java.io.IOException
SwitchingDataSource.prepareNextDataSource(java.lang.String)
public boolean handleSwitchDataSource(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- The request object.pResponse
- The response object.javax.servlet.ServletException
java.io.IOException
SwitchingDataSource.performSwitch()