Uses of Interface
org.apache.struts.chain.contexts.ActionContext
Package
Description
Contains the new
ComposableRequestProcessor
which was introduced in Struts 1.3.Configurable commands that may be placed within the
request processor.
Contains generic commands.
Commands which are particular to servlet processing.
This package provides objects that encapsulate access to
the request and session-scoped resources to service
command processing.
The "config" package contains configuration objects that correspond to
elements that may be specified in the
struts-config.xml
module configuration file.-
Uses of ActionContext in org.apache.struts.chain
Modifier and TypeFieldDescriptionprotected Catalog
<ActionContext> ComposableRequestProcessor.catalog
TheCatalog
containing all of the available command chains for this module.protected CatalogFactory
<ActionContext> ComposableRequestProcessor.catalogFactory
TheCatalogFactory
from which catalog containing the the base request-processingCommand
will be retrieved.protected Command
<ActionContext> ComposableRequestProcessor.command
TheCommand
to be executed for each request.Modifier and TypeMethodDescriptionprotected ActionContext
ComposableRequestProcessor.contextInstance
(HttpServletRequest request, HttpServletResponse response) Provide the initializedActionContext
instance which will be used by this request.protected ActionContext
ComposableRequestProcessor.createActionContextInstance
(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response) Create a new instance ofActionContext
according to configuration.Modifier and TypeMethodDescriptionprotected void
ComposableRequestProcessor.initializeActionContext
(ActionContext context) Set common properties on the givenActionContext
instance so that commands in the chain can count on their presence.Modifier and TypeMethodDescriptionvoid
ComposableRequestProcessor.setCatalogFactory
(CatalogFactory<ActionContext> catalogFactory) Set theCatalogFactory
instance which should be used to find the request-processing command. -
Uses of ActionContext in org.apache.struts.chain.commands
Modifier and TypeMethodDescriptionprotected Command
<ActionContext> ExecuteCommand.getCommand
(String commandName, String catalogName) Retrieve the specified Command from the specified Catalog.protected Command
<ActionContext> ExecuteCommand.getCommand
(ActionContext context) Find theActionConfig
in the current context and, if it is properly configured, lookup the appropriatecommons-chain
command.protected Command
<ActionContext> ExecuteForwardCommand.getCommand
(ActionContext context) Return the command specified by thecommand
andcatalog
properties of theforwardConfig
property of the givenActionContext
.protected Command
<ActionContext> ExceptionCatcher.lookupExceptionCommand()
Return the command to be executed if an exception occurs.Modifier and TypeMethodDescriptionprotected Dispatcher
ExecuteDispatcher.createDispatcher
(String type, ActionContext context) Creates the dispatcher of the specified type.protected abstract ForwardConfig
AbstractExecuteAction.execute
(ActionContext context, Action action, ActionConfig actionConfig, ActionForm actionForm) Execute the specifiedAction
, and return the resultingForwardConfig
.boolean
ActionCommand.execute
(ActionContext actionContext) final boolean
ActionCommandBase.execute
(ActionContext actionContext) Logs and executes the command.protected boolean
AbstractAuthorizeAction.execute_
(ActionContext actionCtx) Determine whether the requested action is authorized for the current user.protected boolean
AbstractCreateAction.execute_
(ActionContext actionCtx) Create (if necessary) and cache anAction
for this request.protected boolean
AbstractExceptionHandler.execute_
(ActionContext actionCtx) Invoke the appropriateAction
for this request, and cache the returnedActionForward
.protected boolean
AbstractExecuteAction.execute_
(ActionContext actionCtx) Invoke the appropriateAction
for this request if a dispatcher is not available, and cache the returnedActionForward
.protected boolean
AbstractPerformForward.execute_
(ActionContext actionCtx) Perform forwarding or redirection based on the specifiedActionForward
(if any).protected boolean
AbstractPerformInclude.execute_
(ActionContext actionCtx) Perform an include based on the specified include uri (if any).protected boolean
AbstractPopulateActionForm.execute_
(ActionContext actionCtx) Populate the form bean (if any) for this request.protected boolean
AbstractRequestNoCache.execute_
(ActionContext actionCtx) Check to see if the controller is configured to prevent caching, and if so, request no cache flags to be set.protected boolean
AbstractSelectAction.execute_
(ActionContext actionCtx) Cache theActionConfig
instance for the action to be used for processing this request.protected boolean
AbstractSelectForward.execute_
(ActionContext actionCtx) Select and cache theActionForward
for thisActionConfig
if specified.protected boolean
AbstractSelectInput.execute_
(ActionContext actionCtx) Select and cache aForwardConfig
for the input page for the current request.protected boolean
AbstractSelectLocale.execute_
(ActionContext actionCtx) Select theLocale
to be used for this request.protected boolean
AbstractSelectModule.execute_
(ActionContext actionCtx) Cache theModuleConfig
andMessageResources
instances for the sub-application module to be used for processing this request.protected boolean
AbstractSetContentType.execute_
(ActionContext actionCtx) Check to see if the content type is set, and if so, set it for this response.protected boolean
AbstractSetOriginalURI.execute_
(ActionContext actionCtx) Check to original uri is set, and if not, set it for this request.protected boolean
AbstractValidateActionForm.execute_
(ActionContext actionCtx) Validate the properties of the form bean for this request.protected abstract boolean
ActionCommandBase.execute_
(ActionContext actionContext) Executes the command.protected boolean
CacheMessages.execute_
(ActionContext actionCtx) protected boolean
CreateActionForm.execute_
(ActionContext actionCtx) Create (if necessary) and cache a form bean for this request.protected boolean
ExceptionCatcher.execute_
(ActionContext actionCtx) Clear any existing stored exception and pass thecontext
on to the remainder of the current chain.protected boolean
ExecuteCommand.execute_
(ActionContext actionCtx) If thecontext
is "valid", lookup a command and execute it.protected boolean
ExecuteDispatcher.execute_
(ActionContext context) protected boolean
RemoveCachedMessages.execute_
(ActionContext actionCtx) Removes anyActionMessages
object stored in the session underGlobals.MESSAGE_KEY
andGlobals.ERROR_KEY
if the messages'isAccessed
method returns true.protected boolean
SelectInclude.execute_
(ActionContext actionCtx) Select and cache the include uri for thisActionConfig
if specified.protected abstract ForwardConfig
AbstractSelectForward.forward
(ActionContext context, ModuleConfig moduleConfig, String uri) Create and return aForwardConfig
representing the specified module-relative destination.protected abstract ForwardConfig
AbstractSelectInput.forward
(ActionContext context, ModuleConfig moduleConfig, String uri) Create and return aForwardConfig
representing the specified module-relative destination.protected abstract Action
AbstractCreateAction.getAction
(ActionContext context, String type, ActionConfig actionConfig) Create and return the appropriateAction
class for the giventype
andactionConfig
.protected Command
<ActionContext> ExecuteCommand.getCommand
(ActionContext context) Find theActionConfig
in the current context and, if it is properly configured, lookup the appropriatecommons-chain
command.protected Command
<ActionContext> ExecuteForwardCommand.getCommand
(ActionContext context) Return the command specified by thecommand
andcatalog
properties of theforwardConfig
property of the givenActionContext
.protected String
ExecuteDispatcher.getDispatcherType
(ActionContext context) Retrieves the fully-qualified class name of the dispatcher to instantiate for the specified context.protected abstract String
AbstractAuthorizeAction.getErrorMessage
(ActionContext context, ActionConfig actionConfig) Retrieve error message from context.protected abstract String
AbstractSelectInput.getErrorMessage
(ActionContext context, ActionConfig actionConfig) Retrieve error message from context.protected abstract Locale
AbstractSelectLocale.getLocale
(ActionContext context) Return theLocale
to be used for this request.protected abstract String
AbstractSelectAction.getPath
(ActionContext context) Return the path to be used to select theActionConfig
for this request.protected abstract String
AbstractSelectModule.getPrefix
(ActionContext context) Calculate and return the module prefix for the module to be selected for this request.protected abstract ForwardConfig
AbstractExceptionHandler.handle
(ActionContext context, Exception exception, ExceptionConfig exceptionConfig, ActionConfig actionConfig, ModuleConfig moduleConfig) Perform the required handling of the specified exception.protected void
AbstractPopulateActionForm.handleCancel
(ActionContext context, ActionConfig actionConfig, ActionForm actionForm) Take into account whether the request includes any defined value for the global "cancel" parameter.protected String
AbstractPerformInclude.includePath
(ActionContext actionContext, String include) Returns the path to perform the include.protected abstract boolean
AbstractAuthorizeAction.isAuthorized
(ActionContext context, String[] roles, ActionConfig actionConfig) Determine if the action is authorized for the given roles.protected abstract boolean
AbstractPopulateActionForm.isPopulate
(ActionContext context, ActionConfig actionConfig) Determines whether an action form should be populated.protected abstract boolean
AbstractPopulateActionForm.isReset
(ActionContext context, ActionConfig actionConfig) Determines whether an action form should be resetprotected abstract void
AbstractPerformForward.perform
(ActionContext context, ForwardConfig forwardConfig) Perform the appropriate processing on the specifiedForwardConfig
.protected abstract void
AbstractPerformInclude.perform
(ActionContext context, String include) Perform the appropriate processing on the specified include uri.protected abstract void
AbstractPopulateActionForm.populate
(ActionContext context, ActionConfig actionConfig, ActionForm actionForm) Populate the givenActionForm
with request parameter values, taking into account any prefix/suffix values configured on the givenActionConfig
.boolean
ExceptionCatcher.postprocess
(ActionContext actionCtx, Exception exception) If an exception was thrown by a subsequentCommand
, pass it on to the specified exception handling chain.protected void
ExecuteDispatcher.processDispatchResult
(Object result, ActionContext context) Interprets the specified dispatch result.protected abstract void
AbstractRequestNoCache.requestNoCache
(ActionContext context) Request no cache flags are set.protected abstract void
AbstractPopulateActionForm.reset
(ActionContext context, ActionConfig actionConfig, ActionForm actionForm) Call thereset()
method on the specified form bean.protected abstract void
AbstractSetContentType.setContentType
(ActionContext context, String contentType) Request no cache flags are set.protected abstract void
AbstractSetOriginalURI.setOriginalURI
(ActionContext context) Set the original uri.protected boolean
ExecuteCommand.shouldProcess
(ActionContext context) Evaluate the current context to see if a command should even be executed.protected boolean
ExecuteForwardCommand.shouldProcess
(ActionContext context) Determine whether the forwardConfig should be processed.protected abstract ActionErrors
AbstractValidateActionForm.validate
(ActionContext context, ActionConfig actionConfig, ActionForm actionForm) Call thevalidate()
method of the specified form bean, and return the resultingActionErrors
object. -
Uses of ActionContext in org.apache.struts.chain.commands.generic
Modifier and TypeMethodDescriptionprotected boolean
CopyFormToContext.execute_
(ActionContext actionContext) Look up anActionForm
instance based on the configured properties of this command and copy it into theContext
.protected ActionForm
CopyFormToContext.findOrCreateForm
(ActionContext context) Based on the properties of this command and the givenActionContext
, find or create anActionForm
instance for preparation.protected ActionForm
CopyFormToContext.findOrCreateForm
(ActionContext ctx, String effectiveFormName, String effectiveScope) Actually find or create an instance ofActionForm
configured under the form-bean-nameeffectiveFormName
, looking in in theActionContext's
scope as identified byeffectiveScope
. -
Uses of ActionContext in org.apache.struts.chain.commands.servlet
Modifier and TypeMethodDescriptionprotected Action
CreateAction.createAction
(ActionContext context, String type) Invoked bygetAction
when theAction
actually has to be created.protected ForwardConfig
ExecuteAction.execute
(ActionContext context, Action action, ActionConfig actionConfig, ActionForm actionForm) Execute the specifiedAction
, and return the resultingActionForward
.protected boolean
ActionPostProcess.execute_
(ActionContext context) Performs additional functions after an Action or Command has been called.protected ForwardConfig
SelectForward.forward
(ActionContext context, ModuleConfig moduleConfig, String uri) Create and return aForwardConfig
representing the specified module-relative destination.protected ForwardConfig
SelectInput.forward
(ActionContext context, ModuleConfig moduleConfig, String uri) Create and return aForwardConfig
representing the specified module-relative destination.protected Action
CreateAction.getAction
(ActionContext context, String type, ActionConfig actionConfig) protected String
AuthorizeAction.getErrorMessage
(ActionContext context, ActionConfig actionConfig) protected String
SelectInput.getErrorMessage
(ActionContext context, ActionConfig actionConfig) protected Locale
SelectLocale.getLocale
(ActionContext context) Return theLocale
to be used for this request.protected String
SelectAction.getPath
(ActionContext context) protected String
SelectModule.getPrefix
(ActionContext context) protected ForwardConfig
ExceptionHandler.handle
(ActionContext context, Exception exception, ExceptionConfig exceptionConfig, ActionConfig actionConfig, ModuleConfig moduleConfig) protected String
PerformInclude.includePath
(ActionContext actionContext, String include) protected boolean
AuthorizeAction.isAuthorized
(ActionContext context, String[] roles, ActionConfig mapping) protected boolean
PopulateActionForm.isPopulate
(ActionContext context, ActionConfig actionConfig) Determines whether an action form should be populated.protected boolean
PopulateActionForm.isReset
(ActionContext context, ActionConfig actionConfig) Determines whether an action form should be reset.protected void
PerformForward.perform
(ActionContext context, ForwardConfig forwardConfig) Perform the appropriate processing on the specifiedForwardConfig
.protected void
PerformInclude.perform
(ActionContext context, String uri) Perform the appropriate processing on the specified include uri.protected void
PopulateActionForm.populate
(ActionContext context, ActionConfig actionConfig, ActionForm actionForm) protected void
RequestNoCache.requestNoCache
(ActionContext context) protected void
PopulateActionForm.reset
(ActionContext context, ActionConfig actionConfig, ActionForm actionForm) protected void
SetContentType.setContentType
(ActionContext context, String contentType) protected void
SetOriginalURI.setOriginalURI
(ActionContext context) protected ActionErrors
ValidateActionForm.validate
(ActionContext context, ActionConfig actionConfig, ActionForm actionForm) Call thevalidate()
method of the specified form bean, and return the resultingActionErrors
object. -
Uses of ActionContext in org.apache.struts.chain.contexts
Modifier and TypeClassDescriptionclass
Provide an abstract but semi-complete implementation of ActionContext to serve as the base for concrete implementations.class
ImplementActionContext
with empty maps forapplicationScope
,sessionScope
,requestScope
, andparameterMap
properties.class
Implement ActionContext interface while making Servlet API-specific values available.class
Provide a Subclass of ActionContextBase which is understood to be wrapping an instance ofWebContext
. -
Uses of ActionContext in org.apache.struts.config
Modifier and TypeMethodDescriptionFormBeanConfig.createActionForm
(ActionContext context) Create and return anActionForm
instance appropriate to the information in thisFormBeanConfig
. -
Uses of ActionContext in org.apache.struts.dispatcher
Modifier and TypeMethodDescriptionObject[]
AbstractMethodResolver.buildArguments
(ActionContext context, Method method) Object[]
MethodResolver.buildArguments
(ActionContext context, Method method) Constructs the arguments that will be passed to the dispatched method.AbstractDispatcher.dispatch
(ActionContext context) Dispatcher.dispatch
(ActionContext context) Dispatches to the action referenced by the specified context.protected final Object
AbstractDispatcher.dispatchMethod
(ActionContext context, Method method, String name) Dispatches to the specified method.protected final Method
AbstractDispatcher.getMethod
(ActionContext context, String methodName) Introspects the action to identify a method of the specified name that will be the target of the dispatch.protected String
AbstractParameterDispatcher.getParameter
(ActionContext context) Retrieves the parameter name whose value will identity the intended method to dispatch.protected boolean
AbstractDispatcher.isCancelled
(ActionContext context) Determines whether the current form's cancel button was pressed.protected abstract boolean
AbstractEventMappingDispatcher.isSubmissionParameter
(ActionContext context, String methodKey) Determines whether the specified method key is a submission parameter.AbstractMethodResolver.resolveMethod
(ActionContext context, String methodName) MethodResolver.resolveMethod
(ActionContext context, String methodName) Decides the appropriate method instance for the specified method name.protected final String
AbstractEventMappingDispatcher.resolveMethodName
(ActionContext context) protected String
AbstractMappingDispatcher.resolveMethodName
(ActionContext context) Resolves the method name by obtaining theparameter
attribute from theActionMapping
.protected final String
AbstractParameterDispatcher.resolveMethodName
(ActionContext context) protected abstract String
AbstractParameterDispatcher.resolveParameterValue
(ActionContext context, String parameter) Extracts the value that is keyed by the specified parameter.protected Object
AbstractDispatcher.unspecified
(ActionContext context) Services the case when the dispatch fails because the method name cannot be resolved. -
Uses of ActionContext in org.apache.struts.dispatcher.servlet
Modifier and TypeMethodDescriptionObject[]
ServletMethodResolver.buildArguments
(ActionContext context, Method method) protected boolean
ServletEventMappingDispatcher.isSubmissionParameter
(ActionContext context, String methodKey) If the method key exists as a standalone parameter or with the image suffixes (.x/.y), the method name has been found.protected final Method
ServletMethodResolver.resolveClassicMethod
(ActionContext context, String methodName) Obtains the method instance with the classicexecute
servlet signature.ServletMethodResolver.resolveMethod
(ActionContext context, String methodName) protected String
ServletParameterDispatcher.resolveParameterValue
(ActionContext context, String parameter) Extracts the value from the specified servlet parameter.protected Object
ServletMappingDispatcher.unspecified
(ActionContext context) Sends the 404 HTTP error response.protected Object
ServletParameterDispatcher.unspecified
(ActionContext context) Sends the 404 HTTP error response.