public class ActionConfig extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Class<? extends Object> |
actionClass |
| Constructor and Description |
|---|
ActionConfig(Class<? extends Object> klass)
Creates an ActionConfig for the given action implementation.
|
ActionConfig(Class<? extends Object> klass,
String innerAction)
Creates an ActionConfig with the given name for the given inner action implementation.
|
ActionConfig(String name,
Class<? extends Object> klass)
Creates an ActionConfig with the given name for the given action implementation.
|
ActionConfig(String name,
Class<? extends Object> klass,
String innerAction)
Creates an ActionConfig for the given action implementation.
|
| Modifier and Type | Method and Description |
|---|---|
ActionConfig |
addConsequence(String result,
Consequence c)
Adds a consequence for the given result.
|
ActionConfig |
addConsequence(String result,
String innerAction,
Consequence c)
Adds a consequence for the given result of the given inner action.
|
ActionConfig |
addFilter(Filter filter)
Adds a filter for the action.
|
ActionConfig |
addFilter(Filter filter,
String... args)
Adds a filter to a list of inner actions.
|
ActionConfig |
addFilter(Filter filter,
String innerAction)
Adds a filter for this inner action.
|
ActionConfig |
addFilter(List filters)
Adds a list of filter for the action.
|
ActionConfig |
addFilter(List filters,
String innerAction)
Adds a list of filter for the inner action.
|
ActionConfig |
addFilterFirst(Filter filter)
Adds a filter that will be executed before the global filters.
|
ActionConfig |
addFilterFirst(Filter filter,
String innerAction)
Adds a filter that will be executed before the global filters.
|
ActionConfig |
addFilterFirst(List filters)
Add a list of filters that will be executed before the global filters.
|
ActionConfig |
addFilterFirst(List filters,
String innerAction)
Adds a list of filters that will be executed before the global filters.
|
ActionConfig |
ajaxError(AjaxRenderer renderer)
Shorter version of a AjaxConsequence error.
|
ActionConfig |
ajaxOk(AjaxRenderer renderer)
Shorter version of a AjaxConsequence success.
|
ActionConfig |
all(Consequence c) |
ActionConfig |
authorize(Enum<?>... es) |
ActionConfig |
authorize(String... groups) |
ActionConfig |
bypassAuthentication()
Indicate that this action should NOT be authenticated.
|
ActionConfig |
catchAll(Consequence c) |
ActionConfig |
chainError(ActionConfig actionConfig)
Shorter version of chain on error
|
ActionConfig |
chainOk(ActionConfig actionConfig)
Shorter version of chain on success
|
ActionConfig |
comeBackAfterLogin()
Indicate that this action redirects after login.
|
ActionConfig |
fileUpload() |
ActionConfig |
fileUpload(int maxInMemorySize) |
ActionConfig |
fileUpload(int maxInMemorySize,
int maxSizeToThrowError) |
ActionConfig |
fileUpload(int maxInMemorySize,
int maxSizeToThrowError,
String tempDirInsideWebInf) |
ActionConfig |
fileUpload(int maxInMemorySize,
String tempDirInsideWebInf) |
ActionConfig |
filter(Filter filter)
Shorter version of addFilter.
|
ActionConfig |
filter(Filter filter,
String... args)
Shorter version.
|
ActionConfig |
filter(Filter filter,
String innerAction)
Shorter version of addFilter.
|
ActionConfig |
filter(List filters)
Shorter version of addFilter.
|
ActionConfig |
filter(List filters,
String innerAction)
Shorter version of addFilter.
|
ActionConfig |
filterFirst(Filter filter)
Add a list of filters that will be executed before the global filters.
|
ActionConfig |
filterFirst(Filter filter,
String innerAction)
Add a list of filters that will be executed before the global filters.
|
ActionConfig |
filterFirst(List filters)
Add a list of filters that will be executed before the global filters.
|
ActionConfig |
filterFirst(List filters,
String innerAction)
Add a list of filters that will be executed before the global filters.
|
ActionConfig |
fwdError(String page)
Shorter version of a forward on error.
|
ActionConfig |
fwdOk(String page)
Shorter version of a forward on success.
|
Action |
getAction()
Returns an action instance to be used with this request.
|
Class<? extends Object> |
getActionClass()
Returns the action class for this action config.
|
Consequence |
getAutoConsequence(String result,
String innerAction) |
Consequence |
getCatchAll() |
Consequence |
getConsequence(String result)
Gets the consequence for the given result.
|
Consequence |
getConsequence(String result,
String innerAction)
Gets the consequence for the given result of the given inner action.
|
protected String |
getDirFromClass(Class klass)
This method will imply a directory name from the action class name.
|
List<Filter> |
getFilters()
Returns the filters for this action.
|
List<Filter> |
getFilters(String innerAction)
Returns the filters for this inner action.
|
List<Filter> |
getFirstFilters(String innerAction)
Returns the filters for this inner action, that will be executed before the global filters.
|
String |
getInnerAction()
Gets the inner action that this action config represents.
|
String |
getName()
Gets the name or alias of this ActionConfig.
|
ActionConfig |
internalOnly() |
boolean |
isInternalOnly() |
ActionConfig |
methodParams(String... params) |
ActionConfig |
on(String result,
Consequence c)
Shorter version of addConsequence.
|
ActionConfig |
on(String result,
String jsp)
Shorter verions of addConsequence that will assume a forward.
|
ActionConfig |
on(String result,
String innerAction,
Consequence c)
Shorter version of addConsequence.
|
ActionConfig |
prettyURLParams(String... params) |
ActionConfig |
redirError()
Shorter version of a redir on error.
|
ActionConfig |
redirError(String page)
Shorter version of a redir on error.
|
ActionConfig |
redirError(String page,
boolean flag)
Shorter version of a redir on error.
|
ActionConfig |
redirOk()
Shorter version of a redir on success.
|
ActionConfig |
redirOk(String page)
Shorter version of a redir on success.
|
ActionConfig |
redirOk(String page,
boolean flag)
Shorter version of a redir on success.
|
boolean |
shouldBypassAuthentication() |
boolean |
shouldRedirectAfterLogin() |
String |
toString()
Returns the name of this ActionConfig.
|
public ActionConfig(Class<? extends Object> klass)
klass - The action implementation to usepublic ActionConfig(String name, Class<? extends Object> klass)
name - The name or alias of this ActionConfigklass - The action implementation to usepublic ActionConfig(String name, Class<? extends Object> klass, String innerAction)
name - The name or alias of this ActionConfigklass - The action implementation to useinnerAction - The inner action to usepublic ActionConfig(Class<? extends Object> klass, String innerAction)
klass - The action implementation to useinnerAction - The inner action to useprotected String getDirFromClass(Class klass)
klass - The action class namepublic ActionConfig addConsequence(String result, Consequence c)
result - A possible result of this ActionConfigc - The consequence for this resultpublic ActionConfig internalOnly()
public boolean isInternalOnly()
public ActionConfig bypassAuthentication()
public ActionConfig fileUpload()
public ActionConfig fileUpload(int maxInMemorySize)
public ActionConfig fileUpload(int maxInMemorySize, int maxSizeToThrowError)
public ActionConfig fileUpload(int maxInMemorySize, String tempDirInsideWebInf)
public ActionConfig fileUpload(int maxInMemorySize, int maxSizeToThrowError, String tempDirInsideWebInf)
public boolean shouldBypassAuthentication()
public ActionConfig prettyURLParams(String... params)
public ActionConfig methodParams(String... params)
public ActionConfig comeBackAfterLogin()
public boolean shouldRedirectAfterLogin()
public ActionConfig on(String result, Consequence c)
result - c - public ActionConfig on(String result, String jsp)
result - jsp - public ActionConfig addConsequence(String result, String innerAction, Consequence c)
result - A possible result of this ActionConfiginnerAction - The inner action that can return this result.c - The consequence for this resultIllegalStateException - If this method is called for a action config specific to an inner actionpublic ActionConfig on(String result, String innerAction, Consequence c)
result - innerAction - c - public ActionConfig addFilter(Filter filter)
filter - The filter to add for this action.public ActionConfig authorize(Enum<?>... es)
public ActionConfig authorize(String... groups)
public ActionConfig filter(Filter filter)
filter - public Consequence getCatchAll()
public ActionConfig catchAll(Consequence c)
public ActionConfig all(Consequence c)
public ActionConfig addFilter(Filter filter, String innerAction)
filter - The filter to add for this inner action.innerAction - the inner actionpublic ActionConfig filterFirst(List filters)
filters - public ActionConfig filterFirst(List filters, String innerAction)
filters - innerAction - public ActionConfig filterFirst(Filter filter)
filter - public ActionConfig filterFirst(Filter filter, String innerAction)
filter - innerAction - public ActionConfig addFilterFirst(List filters)
filters - public ActionConfig addFilterFirst(List filters, String innerAction)
filters - innerAction - public ActionConfig addFilterFirst(Filter filter)
filter - public ActionConfig addFilterFirst(Filter filter, String innerAction)
filter - innerAction - public ActionConfig filter(Filter filter, String innerAction)
filter - innerAction - public ActionConfig addFilter(List filters)
filters - A list of filters.public ActionConfig filter(List filters)
filters - public ActionConfig fwdOk(String page)
page - public ActionConfig fwdError(String page)
page - public ActionConfig ajaxOk(AjaxRenderer renderer)
renderer - public ActionConfig ajaxError(AjaxRenderer renderer)
renderer - public ActionConfig redirOk(String page)
page - public ActionConfig redirError(String page)
page - public ActionConfig redirOk()
public ActionConfig redirError()
public ActionConfig redirOk(String page, boolean flag)
page - flag - public ActionConfig redirError(String page, boolean flag)
page - flag - public ActionConfig chainOk(ActionConfig actionConfig)
actionConfig - public ActionConfig chainError(ActionConfig actionConfig)
actionConfig - public ActionConfig addFilter(List filters, String innerAction)
filters - A list of filtersinnerAction - the inner actionpublic ActionConfig addFilter(Filter filter, String... args)
filter - The filter to addargs - The list of inner actionspublic ActionConfig filter(Filter filter, String... args)
filter - args - public ActionConfig filter(List filters, String innerAction)
filters - innerAction - public List<Filter> getFilters()
public List<Filter> getFilters(String innerAction)
innerAction - the inner action.public List<Filter> getFirstFilters(String innerAction)
innerAction - the inner action.public String getName()
public String getInnerAction()
public Consequence getConsequence(String result)
result - The result for what to get the consequencepublic Consequence getConsequence(String result, String innerAction)
result - The result for what to get the consequenceinnerAction - The innerAction from where to get the consequence.public Consequence getAutoConsequence(String result, String innerAction)
public Action getAction()
public Class<? extends Object> getActionClass()
Copyright © 2015. All Rights Reserved.