public class PortalGenericFormHandler extends TransactionalFormHandler
GenericFormHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
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 |
---|
PortalGenericFormHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addFormException(DropletException exc)
Overrides the addFormException method to capture any exceptions
added by the super classes.
|
java.lang.String |
formatUserMessage(java.lang.String pKey,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to format a message with no arguments using the Locale of the user
|
java.lang.String |
formatUserMessage(java.lang.String pKey,
java.lang.Object[] pParams,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to format a message with two arguments using our resource bundle.
|
java.lang.String |
formatUserMessage(java.lang.String pKey,
java.lang.Object pParam,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to format a message with one argument using the Locale of the user
|
java.lang.String |
formatUserMessage(java.lang.String pKey,
java.lang.Object pParam1,
java.lang.Object pParam2,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to format a message with two arguments using our resource bundle.
|
java.util.Locale |
getDefaultLocale()
Returns property DefaultLocale.
|
atg.portal.admin.I18nMessageProcessor |
getFailureMessageProcessor()
Returns the form message processor used for notifying the user
about failures.
|
java.lang.String |
getFailureURL()
Returns property FailureURL
|
boolean |
getFormError()
Deprecated.
|
boolean |
getFormInfo()
Deprecated.
|
java.util.List |
getFormMessages()
Returns a list of localized messages.
|
java.util.Locale |
getLocale()
Returns property mLocale
|
GearMessagePublisher |
getPublisher() |
atg.portal.admin.I18nMessageProcessor |
getSuccessMessageProcessor()
Returns the form message processor used for notifying the user
about successes.
|
java.lang.String |
getSuccessURL()
Returns property SuccessURL
|
java.util.Locale |
getUserLocale(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Returns the locale associated with the request.
|
boolean |
handleResetFormExceptions(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Clears out all form exceptions
|
void |
handleResetFormMessages(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Deprecated.
|
boolean |
handleSetLocale(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
set the user locale to the locale property of this form handler.
|
boolean |
isUseRequestLocale()
Returns property UseRequestLocale
|
void |
processException(java.lang.Exception pException,
java.lang.String pMsgId,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Add a user error message to the form exceptions, and then display
the exception in the logs
|
void |
processException(java.lang.Exception pException,
java.lang.String pMsgId,
java.lang.String pParam,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Add a user error message to the form exceptions, and then display
the exception in the logs
|
void |
processException(java.lang.String pMsgId,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Add a user error message to the form exceptions, and then display
the exception in the logs
|
void |
processException(java.lang.String pMsgId,
java.lang.String pParam,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Add a user error message to the form exceptions, and then display
the exception in the logs
|
void |
processSuccess(java.lang.String pMsgId,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Add an information message to the formMessages to be displayed by the
form and sets formInfo to true.
|
void |
processSuccess(java.lang.String pMsgId,
java.lang.String pParam,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Add an information message to the formMessages to be displayed by the
form and sets formInfo to true.
|
void |
processSuccess(java.lang.String pMsgId,
java.lang.String pParam1,
java.lang.String pParam2,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Add an information message to the formMessages to be displayed by the
form and sets formInfo to true.
|
void |
resetFormMessages()
Deprecated.
|
void |
sendAlertMessage(PortalMessage pMessage)
Send an an alert message using the Publisher
|
void |
setDefaultLocale(java.util.Locale pDefaultLocale)
Sets property DefaultLocale
|
void |
setFailureMessageProcessor(atg.portal.admin.I18nMessageProcessor pMessageProcessor)
Changes the form message processor used for notifying the user
about failures.
|
void |
setFailureURL(java.lang.String pFailureURL)
Sets property FailureURL
|
void |
setPublisher(GearMessagePublisher pPublisher) |
void |
setSuccessMessageProcessor(atg.portal.admin.I18nMessageProcessor pMessageProcessor)
Changes the form message processor used for notifying the user
about successes.
|
void |
setSuccessURL(java.lang.String pSuccessURL)
Sets property SuccessURL
|
void |
setUseRequestLocale(boolean pUseRequestLocale)
Sets property UseRequestLocale
|
afterSet, beforeSet, checkFormRedirect, commitTransaction, getTransactionDemarcation, getTransactionStatus, isEnsureTransaction, isRollbackTransaction, isRollbackTransactionOnUnhandledException, isTransactionMarkedAsRollback, setEnsureTransaction, setRollbackTransaction, setRollbackTransactionOnUnhandledException, setTransactionDemarcation
addUncheckedFormException, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, 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 atg.portal.admin.I18nMessageProcessor getFailureMessageProcessor()
public void setFailureMessageProcessor(atg.portal.admin.I18nMessageProcessor pMessageProcessor)
public atg.portal.admin.I18nMessageProcessor getSuccessMessageProcessor()
public void setSuccessMessageProcessor(atg.portal.admin.I18nMessageProcessor pMessageProcessor)
public void setDefaultLocale(java.util.Locale pDefaultLocale)
pDefaultLocale
- the default locale for the current customer.public java.util.Locale getDefaultLocale()
public void setUseRequestLocale(boolean pUseRequestLocale)
pUseRequestLocale
- boolean to specify whether to use request locale.public boolean isUseRequestLocale()
public java.util.Locale getLocale()
public void setSuccessURL(java.lang.String pSuccessURL)
pSuccessURL
- The property to store the value of SuccessURL.public java.lang.String getSuccessURL()
public void setFailureURL(java.lang.String pFailureURL)
pFailureURL
- The property to store the value of FailureURLpublic java.lang.String getFailureURL()
public void setPublisher(GearMessagePublisher pPublisher)
public GearMessagePublisher getPublisher()
public void sendAlertMessage(PortalMessage pMessage) throws javax.jms.JMSException
pMessage
- javax.jms.JMSException
public void processException(java.lang.String pMsgId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pMsgId
- the message idpRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet iopublic void processException(java.lang.Exception pException, java.lang.String pMsgId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pException
- the exception to processpMsgId
- the message idpRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet iopublic void processException(java.lang.String pMsgId, java.lang.String pParam, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pMsgId
- the message idpParam
- an optional parameter to format in the error messagepRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet iopublic void processException(java.lang.Exception pException, java.lang.String pMsgId, java.lang.String pParam, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pException
- The exception to processpMsgId
- the message idpParam
- an optional parameter to format in the error messagepRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet iopublic void processSuccess(java.lang.String pMsgId, java.lang.String pParam1, java.lang.String pParam2, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pMsgId
- the message idpParam1
- first parampParam2
- second parampRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet iopublic void processSuccess(java.lang.String pMsgId, java.lang.String pParam, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pMsgId
- the message idpParam
- optional parampRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet iopublic void processSuccess(java.lang.String pMsgId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pMsgId
- the message idpRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet iopublic java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
locale
. This value can be
either a java.util.Locale object or a String which represents the locale.
Next if the useRequestLocale
property is true, then the locale
of the request will be returned. Finally, if the locale cannot be determined,
the the defaultLocale
property is used.pRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet iopublic java.lang.String formatUserMessage(java.lang.String pKey, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pKey
- the identifier for the message to retrieve out of the ResourceBundlepRequest
- the request object which can be used to extract the user's localepResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet ioAdminUserMessage
public java.lang.String formatUserMessage(java.lang.String pKey, java.lang.Object pParam, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pKey
- the identifier for the message to retrieve out of the ResourceBundlepParam
- the first (and only argument) in the messagepRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet ioAdminUserMessage
public java.lang.String formatUserMessage(java.lang.String pKey, java.lang.Object pParam1, java.lang.Object pParam2, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pKey
- the identifier for the message to retrieve out of the ResourceBundlepParam1
- the first parameter in the messagepParam2
- the second parameter in the messagepRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet ioAdminUserMessage
public java.lang.String formatUserMessage(java.lang.String pKey, java.lang.Object[] pParams, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pKey
- the identifier for the message to retrieve out of the ResourceBundlepParams
- a set of parameters to use in the formatting.pRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet ioAdminUserMessage
public void resetFormMessages()
MessageProcessor
public void handleResetFormMessages(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
MessageProcessor
public boolean getFormInfo()
MessageProcessor
public java.util.List getFormMessages()
public boolean handleResetFormExceptions(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public boolean handleSetLocale(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
java.io.IOException
javax.servlet.ServletException
public void addFormException(DropletException exc)
addFormException
in class GenericFormHandler
public boolean getFormError()
getFormError
in class GenericFormHandler
MessageProcessor