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_FORWARDSSERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_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, setUseForwardsafterGet, beforeGetaddLogListener, 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, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic 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.ServletExceptionjava.io.IOExceptionSwitchingDataSource.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.ServletExceptionjava.io.IOExceptionSwitchingDataSource.performSwitch()