public class DropletEventServlet extends PipelineableServletImpl implements DropletConstants, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
HANDLE_OBJECT_ONE |
static java.lang.String |
HANDLE_OBJECT_TWO |
static java.lang.String |
HANDLE_TYPE_ONE |
static java.lang.String |
HANDLE_TYPE_TWO |
protected static java.lang.String |
INVOKE_FORM_HANDLER |
SERVICE_INFO_KEY
DROPLET_ANCHOR_QUALIFIER, DROPLET_ANCHOR_VALUE, DROPLET_ARGUMENTS, DROPLET_BEAN_PREFIX, DROPLET_BEFORE_GET_ATTRIBUTE, DROPLET_EVENT_ATTRIBUTE, DROPLET_EVENT_PREFIX, DROPLET_EXCEPTIONS_ATTRIBUTE, DROPLET_PARAM_PREFIX, DROPLET_PROPERTY_PREFIX, DROPLET_SESSION_CONF, DROPLET_SUBMIT_VALUE_PREFIX, OBJECT_BEFORE_GET_ATTRIBUTE, PRIORITY_DEFAULT, SUBMIT_PRIORITY_DEFAULT, UNCHECKED_DROPLET_EXCEPTIONS_ATTRIBUTE
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
DropletEventServlet() |
Modifier and Type | Method and Description |
---|---|
AnchorTag |
addAnchor(DynamoHttpServletRequest pReq,
DynamoHttpServletResponse pRes,
java.lang.String pId,
java.lang.String pPropertyPath) |
AnchorTag |
addAnchor(DynamoHttpServletRequest pReq,
DynamoHttpServletResponse pRes,
java.lang.String pId,
java.lang.String pPropertyPath,
TagConverter pConverter,
java.util.Properties pConverterArgs) |
FormTag |
addForm(java.lang.String pId)
Looks up the form defined by the id specified.
|
FormTag |
addForm(java.lang.String pId,
java.lang.String pSyncPath)
Looks up the form defined by the id specified.
|
void |
addQueryParameter(DynamoHttpServletRequest pRequest,
java.lang.String pName,
java.lang.String pValue)
Adds a query paremeter for the next request, using the
TagNameEncoderService.
|
protected javax.servlet.Servlet |
createAdminServlet()
Creates and returns a new Servlet that will administer this
service.
|
void |
doStartService()
Initializes this services after it is created by Nucleus.
|
void |
doStopService()
Restore the global droplet descriptor manager, if we changed
it earlier.
|
protected java.lang.String |
getAdditionalRequestDetails(DynamoHttpServletRequest pReq)
Get some additional request details.
|
static java.lang.Object[] |
getAlternateFormParams(javax.servlet.ServletRequest pRequest)
Returns the actual objects that will be used as arguments when invoking form handler methods.
|
static java.lang.Class[] |
getAlternateFormParamTypes(javax.servlet.ServletRequest pRequest)
Returns the types of any alternate form parameters.
|
java.lang.String[] |
getDynamoHandlerPrefixes() |
atg.droplet.DropletDescriptorManager |
getGlobalDropletDescriptorManager()
Returns property globalDropletDescriptorManager.
|
java.lang.String[] |
getHandlerTypes() |
java.lang.String[] |
getPropertyPathsForForm(java.lang.String pId)
Get the property paths fo the specified form.
|
boolean |
getReportDropletExceptions()
Gets the ReportDropletExceptions property.
|
java.lang.String |
getSkipDynamoFormHandlerParam()
If a skipParamName is set, and there is a parameter by that
name, and this is a dynamo request.
|
atg.servlet.pagecompile.taglib.TagNameEncoderService |
getTagNameEncoderService()
Gets the TagNameEncoderService.
|
java.lang.String[] |
getXmlMimeTypes()
Returns the array of Strings of XML mime types.
|
static boolean |
hasAlternateFormParamTypes(javax.servlet.ServletRequest pRequest)
Checks the given request object for altername form parameter attributes.
|
boolean |
hasAlternateHandlerTypes()
Returns true if altername parameters for handleXXX methods have been specified.
|
protected void |
initializeHandlerTypes() |
protected void |
invokeAfterGets(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Invoke droplet and object after gets methods.
|
static void |
invokeDropletAfterGets(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Invokes the afterGet methods for formhandlers that implement
DropletFormHandler
|
static void |
invokeObjectAfterGets(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Invokes the afterGet methods for formhandlers that implement
ObjectFormHandler
|
boolean |
isDeferForwardsAndRedirects()
Get whether to defer forwards and redirects until after form handling has completed, or to
execute forwards and redirects imediately.
|
boolean |
isEnforceSessionConfirmation()
Whether to enforce session confirmation number matching.
|
boolean |
isFormSecurity()
Gets the FormSecurity property.
|
boolean |
isWarnOnSessionConfirmationFailure()
Whether to warn on session confirmation failure.
|
FormTag |
removeForm(java.lang.String pId)
Remove the form specified by its id.
|
boolean |
requestMatchesDynamoPrefixes(java.lang.String pArgs) |
boolean |
sendEvents(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Looks up the handler for the any possible Droplet events in this
request and delivers them.
|
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Services a DynamoHttpServletRequest/Response pair
|
static void |
setAlternateFormParams(java.lang.Object pParamOne,
java.lang.Object pParamTwo,
javax.servlet.ServletRequest pRequest)
Sets the actual objects that will be used as arguments when invoking
form handler methods such as handleXXX,beforeGet,afterGet,beforeSet,afterSet
|
static void |
setAlternateFormParamTypes(java.lang.Class pParamOne,
java.lang.Class pParamTwo,
javax.servlet.ServletRequest pRequest)
Sets the alternate parameter types for form handling.
|
void |
setDeferForwardsAndRedirects(boolean pDeferForwardsAndRedirects)
Set whether to defer forwards and redirects until after form handling has completed, or to
execute forwards and redirects imediately.
|
void |
setDynamoHandlerPrefixes(java.lang.String[] pDynamoHandlerPrefixes) |
void |
setEnforceSessionConfirmation(boolean pEnforceSessionConfirmation)
Whether to enforce session confirmation number matching.
|
void |
setFormSecurity(boolean pSecurity) |
void |
setGlobalDropletDescriptorManager(atg.droplet.DropletDescriptorManager pGlobalDropletDescriptorManager)
Sets property globalDropletDescriptorManager.
|
void |
setHandlerTypes(java.lang.String[] pTypes)
Sets the array of parameter types that should be accepted for handleXXX
methods in FormHandler.
|
void |
setReportDropletExceptions(boolean pReport) |
void |
setSkipDynamoFormHandlerParam(java.lang.String pSkip)
If a skipParamName is set, and there is a parameter by that
name, and this is a dynamo request.
|
void |
setTagNameEncoderService(atg.servlet.pagecompile.taglib.TagNameEncoderService pTagNameEncoderService)
Sets the TagNameEncoderService.
|
void |
setWarnOnSessionConfirmationFailure(boolean pWarnOnSessionConfirmationFailure)
Whether to warn on session confirmation failure.
|
void |
setXmlMimeTypes(java.lang.String[] pXmlMimeTypes)
Sets the array of Strings of XML mime types.
|
boolean |
validateSessionConfirmationNumber(DynamoHttpServletRequest pReq)
Validate the session confirmation number.
|
destroy, getAdminServlet, getNextServlet, getServletConfig, getServletInfo, init, isUsePathInfo, passRequest, passRequest, service, service, setNextServlet, setServletInfo, setUsePathInfo
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
addLogListener, getAbsoluteName, 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, toString
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
protected static final java.lang.String INVOKE_FORM_HANDLER
public static final java.lang.String HANDLE_TYPE_ONE
public static final java.lang.String HANDLE_TYPE_TWO
public static final java.lang.String HANDLE_OBJECT_ONE
public static final java.lang.String HANDLE_OBJECT_TWO
public void setSkipDynamoFormHandlerParam(java.lang.String pSkip)
public java.lang.String getSkipDynamoFormHandlerParam()
public void setEnforceSessionConfirmation(boolean pEnforceSessionConfirmation)
public boolean isEnforceSessionConfirmation()
public void setWarnOnSessionConfirmationFailure(boolean pWarnOnSessionConfirmationFailure)
public boolean isWarnOnSessionConfirmationFailure()
public void setDynamoHandlerPrefixes(java.lang.String[] pDynamoHandlerPrefixes)
public java.lang.String[] getDynamoHandlerPrefixes()
public void setFormSecurity(boolean pSecurity)
public boolean isFormSecurity()
public java.lang.String[] getXmlMimeTypes()
public void setXmlMimeTypes(java.lang.String[] pXmlMimeTypes)
public void setHandlerTypes(java.lang.String[] pTypes)
javax.servlet.ServletRequest
and javax.servlet.ServletResponse
will be used instead.public java.lang.String[] getHandlerTypes()
public void setTagNameEncoderService(atg.servlet.pagecompile.taglib.TagNameEncoderService pTagNameEncoderService)
public atg.servlet.pagecompile.taglib.TagNameEncoderService getTagNameEncoderService()
public void setDeferForwardsAndRedirects(boolean pDeferForwardsAndRedirects)
Deferred forwards and redirects allow form handlers (often those that manage their own transactions) to forward/redirect after the afterSet method has been called (once the transaction has completed). A common design pattern is to create and end a transaction in before and after set, respectively. If a form handler requests a forward inside that transaction, then we don't necessarily want to render the forward request in the same transaction. This is especially true if the form handler has rolled back the transaction. Also, deferring the forward until after the transaction completes insulates the work the form handler performed from a rollback set by the forwarded page. Likewise, when a form handler redirects, it is often valuable to defer executing a redirect until after the transaction completes to prevent the subsequent request from being processed before a transaction completes.
Set this property to "true" to defer forwards and redirects until after the form handling has completed.
public boolean isDeferForwardsAndRedirects()
Deferred forwards and redirects allow form handlers (often those that manage their own transactions) to forward/redirect after the afterSet method has been called (once the transaction has completed). A common design pattern is to create and end a transaction in before and after set, respectively. If a form handler requests a forward inside that transaction, then we don't necessarily want to render the forward request in the same transaction. This is especially true if the form handler has rolled back the transaction. Also, deferring the forward until after the transaction completes insulates the work the form handler performed from a rollback set by the forwarded page. Likewise, when a form handler redirects, it is often valuable to defer executing a redirect until after the transaction completes to prevent the subsequent request from being processed before a transaction completes.
If this property is set to "true", forwards and redirects will be deferred until after the form handling has completed.
public void setGlobalDropletDescriptorManager(atg.droplet.DropletDescriptorManager pGlobalDropletDescriptorManager)
public atg.droplet.DropletDescriptorManager getGlobalDropletDescriptorManager()
public FormTag addForm(java.lang.String pId)
pId
- the unique string id for the form, typically defined by the
the URI of the page containing the page.public FormTag addForm(java.lang.String pId, java.lang.String pSyncPath)
pId
- the unique string id for the form, typically defined by the
the URI of the page containing the page.pSyncPath
- if not null, the path name of a component to synchronize
with when processing the form submission. This means that only one
form will be submitted to this component at a time.public FormTag removeForm(java.lang.String pId)
pId
- The form id.public java.lang.String[] getPropertyPathsForForm(java.lang.String pId)
pId
- The form id.public AnchorTag addAnchor(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes, java.lang.String pId, java.lang.String pPropertyPath) throws javax.servlet.ServletException
javax.servlet.ServletException
public AnchorTag addAnchor(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes, java.lang.String pId, java.lang.String pPropertyPath, TagConverter pConverter, java.util.Properties pConverterArgs) throws javax.servlet.ServletException
javax.servlet.ServletException
public void addQueryParameter(DynamoHttpServletRequest pRequest, java.lang.String pName, java.lang.String pValue)
public void doStartService()
doStartService
in class GenericService
public void doStopService() throws ServiceException
doStopService
in class GenericService
ServiceException
- if the Service had a problem shutting downprotected void initializeHandlerTypes()
public boolean hasAlternateHandlerTypes()
ServletRequest , ServletResponse
are used.public boolean sendEvents(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws DropletException, javax.servlet.ServletException, java.io.IOException
DropletException
javax.servlet.ServletException
java.io.IOException
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
PipelineableServletImpl
service
in class PipelineableServletImpl
javax.servlet.ServletException
- if an error occurred while processing
the servlet requestjava.io.IOException
- if an error occurred while reading or writing
the servlet requestprotected void invokeAfterGets(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
pRequest
- the current requestpResponse
- the current responsepublic static void invokeDropletAfterGets(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
pRequest
- pResponse
- public static void invokeObjectAfterGets(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
pRequest
- pResponse
- protected javax.servlet.Servlet createAdminServlet()
createAdminServlet
in class PipelineableServletImpl
public void setReportDropletExceptions(boolean pReport)
public boolean getReportDropletExceptions()
public static java.lang.Class[] getAlternateFormParamTypes(javax.servlet.ServletRequest pRequest)
pRequest
- public static void setAlternateFormParams(java.lang.Object pParamOne, java.lang.Object pParamTwo, javax.servlet.ServletRequest pRequest)
getAlternateFormParams
public static java.lang.Object[] getAlternateFormParams(javax.servlet.ServletRequest pRequest)
setAlternateFormParams
public static void setAlternateFormParamTypes(java.lang.Class pParamOne, java.lang.Class pParamTwo, javax.servlet.ServletRequest pRequest)
pParamOne
- pParamTwo
- pRequest
- public static boolean hasAlternateFormParamTypes(javax.servlet.ServletRequest pRequest)
pRequest
- public boolean requestMatchesDynamoPrefixes(java.lang.String pArgs)
pRequest
- public boolean validateSessionConfirmationNumber(DynamoHttpServletRequest pReq)
protected java.lang.String getAdditionalRequestDetails(DynamoHttpServletRequest pReq)
pReq
- the request from which to get additional details