|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.droplet.EmptyFormHandler atg.droplet.GenericFormHandler atg.droplet.TransactionalFormHandler atg.portal.admin.PortalGenericFormHandler
public class PortalGenericFormHandler
This is the portal extension of the Generic Form Handler. It provides APIs to process exception and information messages for portal form handlers. The GenericFormHandler does not provide informational messages to be displayed by forms. This handler adds a boolean property and a List to store all success messages. Extending formHandlers may use the processSuccess() API to store messages in the List which can be displayed in a ForEach droplet.
GenericFormHandler
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
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 | |
---|---|
PortalGenericFormHandler()
|
Method Summary | |
---|---|
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 |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet, beforeGet |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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 |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public PortalGenericFormHandler()
Method Detail |
---|
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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |