Class CustomerRequestProcessor
java.lang.Object
org.apache.struts.action.RequestProcessor
org.apache.struts.tiles.TilesRequestProcessor
com.softslate.commerce.customer.core.BaseRequestProcessor
com.softslate.commerce.customer.core.CheckEERequestProcessor
com.softslate.commerce.customer.core.CustomerRequestProcessor
public class CustomerRequestProcessor
extends com.softslate.commerce.customer.core.CheckEERequestProcessor
Subclass of
BaseRequestProcessor
that negotiates each
application request for the customer interface. The
"/WEB-INF/conf/core/struts-config.xml" file identifies this class as the
customer application's <controller>.- Author:
- David Tobey
-
Field Summary
Fields inherited from class com.softslate.commerce.customer.core.BaseRequestProcessor
errorPath, installerPath
Fields inherited from class org.apache.struts.tiles.TilesRequestProcessor
definitionsFactory
Fields inherited from class org.apache.struts.action.RequestProcessor
actions, INCLUDE_PATH_INFO, INCLUDE_SERVLET_PATH, moduleConfig, servlet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
processPreprocess
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Runs initializations and other necessary routines before every request into the system.boolean
sscOnCustomerPreRequestEnd
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Performs custom processing at the end of each call toprocessPreProcess
.Methods inherited from class com.softslate.commerce.customer.core.CheckEERequestProcessor
disableSettingsInRequestScope, sscOnPreRequestEnd, sscOnPreRequestEndLegacy
Methods inherited from class com.softslate.commerce.customer.core.BaseRequestProcessor
createEventBus, createGuiceInjector, doForward, getExceptionAsString, getRequestParamsDebugMessage, initializeEventBus, initializeGuice, internalModuleRelativeForward, process, processAuditLogging, processException, processForwardConfig, sscOnPreRequestBegin, sscOnPreRequestMiddle
Methods inherited from class org.apache.struts.tiles.TilesRequestProcessor
getDefinitionsFactory, init, initDefinitionsMapping, internalModuleRelativeInclude, processTilesDefinition, processTilesDefinition
Methods inherited from class org.apache.struts.action.RequestProcessor
destroy, doInclude, getInternal, getServletContext, processActionCreate, processActionForm, processActionPerform, processCachedMessages, processContent, processForward, processInclude, processLocale, processMapping, processMultipart, processNoCache, processPath, processPopulate, processRoles, processValidate
-
Field Details
-
log
static org.apache.commons.logging.Log log
-
-
Constructor Details
-
CustomerRequestProcessor
public CustomerRequestProcessor()
-
-
Method Details
-
processPreprocess
protected boolean processPreprocess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Runs initializations and other necessary routines before every request into the system.Here are the steps this method takes for each request:
- Initializes the request's
htmlHeadTitle
attribute to the "storeName" setting from the database. This attribute may be modified later by an action class or byLayoutAction
. - Similarly initializes the request's
htmlHeadKeywords
andhtmlHeadDescription
attributes. These settings must be initialized in advance of forwarding the request to a Tiles definition so they are available when the "htmlHead" Tile is called. - Sets the session scope's
currentLayout
attribute to the "layout" request parameter, if it is present, or to the "defaultLayout" setting from the database, if it is not present. - Sets a convenience attribute named "loggedIn" to "true" in the request scope, if the current user is a logged in customer.
- Calls
sscOnCustomerPreRequestEnd
, which can be overridden by a subclass to provide customizations.
- Overrides:
processPreprocess
in classBaseRequestProcessor
- Parameters:
request
- The servlet request we are processing.response
- The servlet response we are creating.
- Initializes the request's
-
sscOnCustomerPreRequestEnd
public boolean sscOnCustomerPreRequestEnd(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Performs custom processing at the end of each call toprocessPreProcess
. Intended to be overridden by subclasses for customizations. This method should returnfalse
to signalprocessPreProcess
to returnfalse
itself.- Returns:
true
if the processing was successful,false
if processing should stop.
-