org.mentawai.coc
Class CoCActionConfig
java.lang.Object
org.mentawai.core.ActionConfig
org.mentawai.coc.CoCActionConfig
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.
- Author:
- Rubem Azenha (rubem.azenha@gmail.com)
| Methods inherited from class org.mentawai.core.ActionConfig |
addConsequence, addConsequence, addFilter, addFilter, addFilter, addFilter, addFilter, addFilterFirst, addFilterFirst, addFilterFirst, addFilterFirst, ajaxError, ajaxOk, all, authorize, authorize, bypassAuthentication, catchAll, chainError, chainOk, 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, on, on, on, pojoParams, prettyURLParams, redirectAfterLogin, redirError, redirError, redirError, redirOk, redirOk, redirOk, shouldBypassAuthentication, shouldRedirectAfterLogin, toString |
CoCActionConfig
public CoCActionConfig(String name)
loadAllActions
public static void loadAllActions()
getConsequence
public Consequence getConsequence(String result)
- Description copied from class:
ActionConfig
- Gets the consequence for the given result.
- Overrides:
getConsequence in class ActionConfig
- Parameters:
result - The result for what to get the consequence
- Returns:
- The consequence associated with the result.
getConsequence
public Consequence getConsequence(String result,
String innerAction)
- Description copied from class:
ActionConfig
- Gets the consequence for the given result of the given inner action.
- Overrides:
getConsequence in class ActionConfig
- Parameters:
result - The result for what to get the consequenceinnerAction - The innerAction from where to get the consequence.
- Returns:
- The consequence associated with the result and the inner action.
setConsequenceProvider
public static void setConsequenceProvider(ConsequenceProvider consequenceProvider)
Copyright © 2012. All Rights Reserved.