Class AdministratorRequestProcessor
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.administrator.core.AdministratorRequestProcessor
public class AdministratorRequestProcessor
extends com.softslate.commerce.customer.core.CheckEERequestProcessor
Subclass of
BaseRequestProcessor
that negotiates each
application request for the customer interface. The
"/WEB-INF/conf/administrator/core/struts-config.xml" file identifies this
class as the customer application's <controller>.- Author:
- David Tobey
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
(package private) static org.apache.commons.logging.Log
static final String
static final String
Fields inherited from class com.softslate.commerce.customer.core.BaseRequestProcessor
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
authenticateApiRequest
(javax.servlet.http.HttpServletRequest req) protected boolean
forbiddenBecauseRequestNotSecure
(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) protected void
forbidRequest
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected boolean
isAdministratorLoggedIn
(javax.servlet.http.HttpServletRequest req) protected boolean
isApiRequest
(javax.servlet.http.HttpServletRequest req) private boolean
isLegacyApiRequest
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected boolean
isLoginRequest
(javax.servlet.http.HttpServletRequest req) protected boolean
processPreprocess
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) General-purpose preprocessing hook.protected boolean
processRoles
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionMapping mapping) protected void
redirectToApiInvalidLogin
(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) protected void
redirectToLoginFormPreservingOriginalRequest
(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) boolean
sscOnAdministratorPreRequestEnd
(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, processValidate
-
Field Details
-
log
static org.apache.commons.logging.Log log -
errorPath
- See Also:
-
loginPath
- See Also:
-
loginFormPath
- See Also:
-
changePasswordPath
- See Also:
-
changePasswordFormPath
- See Also:
-
apiErrorPath
- See Also:
-
customLayoutDirectory
- See Also:
-
-
Constructor Details
-
AdministratorRequestProcessor
public AdministratorRequestProcessor()
-
-
Method Details
-
processPreprocess
protected boolean processPreprocess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) General-purpose preprocessing hook. Loads settings into the request and session scopes.- Overrides:
processPreprocess
in classBaseRequestProcessor
- Parameters:
request
- The servlet request we are processingresponse
- The servlet response we are creating
-
forbiddenBecauseRequestNotSecure
protected boolean forbiddenBecauseRequestNotSecure(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException - Throws:
javax.servlet.ServletException
IOException
-
isLoginRequest
protected boolean isLoginRequest(javax.servlet.http.HttpServletRequest req) -
isApiRequest
protected boolean isApiRequest(javax.servlet.http.HttpServletRequest req) -
isAdministratorLoggedIn
protected boolean isAdministratorLoggedIn(javax.servlet.http.HttpServletRequest req) -
authenticateApiRequest
protected boolean authenticateApiRequest(javax.servlet.http.HttpServletRequest req) throws Exception - Throws:
Exception
-
forbidRequest
protected void forbidRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Throws:
javax.servlet.ServletException
IOException
-
redirectToApiInvalidLogin
protected void redirectToApiInvalidLogin(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException - Throws:
javax.servlet.ServletException
IOException
-
redirectToLoginFormPreservingOriginalRequest
protected void redirectToLoginFormPreservingOriginalRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException - Throws:
javax.servlet.ServletException
IOException
-
isLegacyApiRequest
private boolean isLegacyApiRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) -
sscOnAdministratorPreRequestEnd
public boolean sscOnAdministratorPreRequestEnd(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.- Parameters:
request
- The servlet request we are processingresponse
- The servlet response we are creating- Returns:
true
if the processing was successful,false
if processing should stop.
-
processRoles
protected boolean processRoles(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionMapping mapping) throws IOException, javax.servlet.ServletException - Overrides:
processRoles
in classorg.apache.struts.action.RequestProcessor
- Throws:
IOException
javax.servlet.ServletException
-