public class CoCActionConfig extends ActionConfig
A action config that uses Convention over Configuration. It is not nescessary to configure the which action class will threat each url, neither which consequence will be applied for each result.
The entire classpath will be scanned. All classes that ends with the "Action" sufix will be loaded by the ActionConfig.
For define which consequences will be executed for each result, the CoCActionConfig uses a CoCConsequenceProvider. The CoCConsequenceProvider will provide a consequence based on it's own convention. The default CoCConsequenceProvider implementation is the ForwardCoCConsequenceProvider, but it can be changed by the setConsequenceProvider() method.
actionClass| Constructor and Description |
|---|
CoCActionConfig(String name) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
static void |
loadAllActions() |
static void |
setConsequenceProvider(ConsequenceProvider consequenceProvider) |
addConsequence, addConsequence, addFilter, addFilter, addFilter, addFilter, addFilter, addFilterFirst, addFilterFirst, addFilterFirst, addFilterFirst, ajaxError, ajaxOk, all, authorize, authorize, bypassAuthentication, catchAll, chainError, chainOk, comeBackAfterLogin, fileUpload, fileUpload, fileUpload, fileUpload, fileUpload, filter, filter, filter, filter, filter, filterFirst, filterFirst, filterFirst, filterFirst, fwdError, fwdOk, getAction, getActionClass, getAutoConsequence, getCatchAll, getDirFromClass, getFilters, getFilters, getFirstFilters, getInnerAction, getName, internalOnly, isInternalOnly, methodParams, on, on, on, prettyURLParams, redirError, redirError, redirError, redirOk, redirOk, redirOk, shouldBypassAuthentication, shouldRedirectAfterLogin, toStringpublic CoCActionConfig(String name)
public static void loadAllActions()
public Consequence getConsequence(String result)
ActionConfiggetConsequence in class ActionConfigresult - The result for what to get the consequencepublic Consequence getConsequence(String result, String innerAction)
ActionConfiggetConsequence in class ActionConfigresult - The result for what to get the consequenceinnerAction - The innerAction from where to get the consequence.public static void setConsequenceProvider(ConsequenceProvider consequenceProvider)
Copyright © 2015. All Rights Reserved.