Class JiraActionFactory
java.lang.Object
webwork.action.factory.ActionFactory
com.atlassian.jira.config.webwork.JiraActionFactory
public class JiraActionFactory
extends webwork.action.factory.ActionFactory
JiraActionFactory replaces the webwork1
DefaultActionFactory
and avoids is unsafe web
parameter setting as described in JRA-15664.
This is class is designed to load actions that are "safe by default".
The root ActionFactory it returns tries the regular, global application class loaders just like the JavaActionFactory in webwork1 and caches any matches it finds, but will also try the plugins class loader when it is unable to find an action class in the global class loaders.
Introduced / changed as part of JRA-15664
- Since:
- v3.13
-
Constructor Summary
ConstructorDescriptionJiraActionFactory
(webwork.action.factory.ActionFactory factory, com.atlassian.jira.config.webwork.JiraPluginActionFactory rootActionFactory) Deprecated.since 5.0.7 -
Method Summary
Modifier and TypeMethodDescriptionvoid
If the set of loaded plugins (and hence loaded actions) has changed then this method must be called to flush the cache of action names to action classes.webwork.action.Action
getActionImpl
(String actionName) This method is invoked by webwork1 to load anAction
for a given action name.Methods inherited from class webwork.action.factory.ActionFactory
getAction, getActionFactory, setActionFactory
-
Constructor Details
-
JiraActionFactory
public JiraActionFactory() -
JiraActionFactory
@Deprecated public JiraActionFactory(webwork.action.factory.ActionFactory factory, com.atlassian.jira.config.webwork.JiraPluginActionFactory rootActionFactory) Deprecated.since 5.0.7Added to allow theJiraActionFactory.NonWebActionFactory
to set the action instantiation chain.- Parameters:
factory
- The factory chain that will handle instantiating the passed in action names.rootActionFactory
- The root of the action factory chain, responsible for actual creation ofAction
instances.
-
-
Method Details
-
getActionImpl
This method is invoked by webwork1 to load anAction
for a given action name. The parameters for that action are also set into the action before it is returned- Specified by:
getActionImpl
in classwebwork.action.factory.ActionFactory
- Parameters:
actionName
- the name of the action to load- Throws:
Exception
- because that is how webwork1 has declared its exception structurewebwork.action.ResultException
- if the parameters cannot be set into the action successfully AND the action is not declaredIllegalArgumentAware
-
flushCaches
public void flushCaches()If the set of loaded plugins (and hence loaded actions) has changed then this method must be called to flush the cache of action names to action classes.- Overrides:
flushCaches
in classwebwork.action.factory.ActionFactory
-