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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String(package private) static org.apache.commons.logging.Logstatic final Stringstatic final StringFields inherited from class com.softslate.commerce.customer.core.BaseRequestProcessor
installerPathFields inherited from class org.apache.struts.tiles.TilesRequestProcessor
definitionsFactoryFields inherited from class org.apache.struts.action.RequestProcessor
actions, INCLUDE_PATH_INFO, INCLUDE_SERVLET_PATH, moduleConfig, servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanauthenticateApiRequest(javax.servlet.http.HttpServletRequest req) protected booleanforbiddenBecauseRequestNotSecure(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) protected voidforbidRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected booleanisAdministratorLoggedIn(javax.servlet.http.HttpServletRequest req) protected booleanisApiRequest(javax.servlet.http.HttpServletRequest req) private booleanisLegacyApiRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected booleanisLoginRequest(javax.servlet.http.HttpServletRequest req) protected booleanprocessPreprocess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) General-purpose preprocessing hook.protected booleanprocessRoles(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionMapping mapping) protected voidredirectToApiInvalidLogin(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) protected voidredirectToLoginFormPreservingOriginalRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) booleansscOnAdministratorPreRequestEnd(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, sscOnPreRequestEndLegacyMethods inherited from class com.softslate.commerce.customer.core.BaseRequestProcessor
createEventBus, createGuiceInjector, doForward, getExceptionAsString, getRequestParamsDebugMessage, initializeEventBus, initializeGuice, internalModuleRelativeForward, process, processAuditLogging, processException, processForwardConfig, sscOnPreRequestBegin, sscOnPreRequestMiddleMethods inherited from class org.apache.struts.tiles.TilesRequestProcessor
getDefinitionsFactory, init, initDefinitionsMapping, internalModuleRelativeInclude, processTilesDefinition, processTilesDefinitionMethods 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:
processPreprocessin 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.ServletExceptionIOException
-
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.ServletExceptionIOException
-
redirectToApiInvalidLogin
protected void redirectToApiInvalidLogin(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException - Throws:
javax.servlet.ServletExceptionIOException
-
redirectToLoginFormPreservingOriginalRequest
protected void redirectToLoginFormPreservingOriginalRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException - Throws:
javax.servlet.ServletExceptionIOException
-
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 returnfalseto signalprocessPreProcessto returnfalseitself.- Parameters:
request- The servlet request we are processingresponse- The servlet response we are creating- Returns:
trueif the processing was successful,falseif 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:
processRolesin classorg.apache.struts.action.RequestProcessor- Throws:
IOExceptionjavax.servlet.ServletException
-