public class ActionsManager
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ActionsManager.ActionConfigSetComparator
Comparator that considers first chunks number then action path.
|
| Modifier and Type | Field and Description |
|---|---|
protected ActionMethodParser |
actionMethodParser |
protected ActionPathMacroManager |
actionPathMacroManager |
protected int |
actionsCount |
protected boolean |
asyncMode |
protected java.util.HashMap<java.lang.String,ActionConfig> |
configs |
protected jodd.util.collection.SortedArrayList<ActionConfigSet> |
list |
protected MadvocConfig |
madvocConfig |
protected java.util.HashMap<java.lang.String,ActionConfigSet> |
map |
protected java.util.Map<java.lang.String,java.lang.String> |
pathAliases |
| Constructor and Description |
|---|
ActionsManager() |
| Modifier and Type | Method and Description |
|---|---|
protected ActionConfigSet |
createActionConfigSet(java.lang.String actionPath)
Creates new action config set from the action path.
|
int |
getActionsCount()
Returns total number of registered actions.
|
java.util.List<ActionConfig> |
getAllActionConfigurations()
Returns all registered action configurations.
|
boolean |
isAsyncModeOn()
Returns
true if at least one action has
async mode turned on. |
ActionConfig |
lookup(java.lang.String actionString)
Lookups action config for given action class and method string (aka 'action string').
|
ActionConfig |
lookup(java.lang.String actionPath,
java.lang.String method)
Returns action configurations for provided action path.
|
java.lang.String |
lookupPathAlias(java.lang.String alias)
Returns path alias.
|
ActionConfig |
register(java.lang.Class actionClass,
java.lang.reflect.Method actionMethod) |
ActionConfig |
register(java.lang.Class actionClass,
java.lang.reflect.Method actionMethod,
ActionDef actionDef) |
ActionConfig |
register(java.lang.Class actionClass,
java.lang.String actionMethodName)
Registers action with provided action class and method name.
|
ActionConfig |
register(java.lang.Class actionClass,
java.lang.String actionMethodName,
ActionDef actionDef) |
ActionConfig |
register(java.lang.String actionSignature)
Registers action with provided action signature.
|
ActionConfig |
register(java.lang.String actionSignature,
ActionDef actionDef)
Registers action with provided action signature.
|
ActionConfig |
registerAction(ActionConfig actionConfig)
Registers manually created
action configurations. |
protected ActionConfig |
registerAction(java.lang.Class actionClass,
java.lang.reflect.Method actionMethod,
ActionDef actionDef)
Registration main point.
|
void |
registerPathAlias(java.lang.String alias,
java.lang.String path)
Registers new path alias.
|
java.lang.reflect.Method |
resolveActionMethod(java.lang.Class<?> actionClass,
java.lang.String methodName)
Resolves action method for given action class ane method name.
|
@PetiteInject protected ActionMethodParser actionMethodParser
@PetiteInject protected ActionPathMacroManager actionPathMacroManager
@PetiteInject protected MadvocConfig madvocConfig
protected int actionsCount
protected boolean asyncMode
protected final java.util.HashMap<java.lang.String,ActionConfigSet> map
protected final jodd.util.collection.SortedArrayList<ActionConfigSet> list
protected final java.util.HashMap<java.lang.String,ActionConfig> configs
protected java.util.Map<java.lang.String,java.lang.String> pathAliases
public java.util.List<ActionConfig> getAllActionConfigurations()
public int getActionsCount()
public boolean isAsyncModeOn()
true if at least one action has
async mode turned on.public java.lang.reflect.Method resolveActionMethod(java.lang.Class<?> actionClass,
java.lang.String methodName)
public ActionConfig register(java.lang.String actionSignature)
public ActionConfig register(java.lang.String actionSignature, ActionDef actionDef)
public ActionConfig register(java.lang.Class actionClass, java.lang.reflect.Method actionMethod)
public ActionConfig register(java.lang.Class actionClass, java.lang.reflect.Method actionMethod, ActionDef actionDef)
public ActionConfig register(java.lang.Class actionClass, java.lang.String actionMethodName)
public ActionConfig register(java.lang.Class actionClass, java.lang.String actionMethodName, ActionDef actionDef)
protected ActionConfig registerAction(java.lang.Class actionClass, java.lang.reflect.Method actionMethod, ActionDef actionDef)
parse action
and creates ActionConfigregisters created ActionConfigActionConfig.registerAction(jodd.madvoc.ActionConfig)public ActionConfig registerAction(ActionConfig actionConfig)
action configurations.
Optionally, if action path with the same name already exist,
exception will be thrown.protected ActionConfigSet createActionConfigSet(java.lang.String actionPath)
public ActionConfig lookup(java.lang.String actionPath, java.lang.String method)
actionPath.
If action path is not registered, it is split into chunks
and match against macros.
Returns null if action path is not registered.
method must be in uppercase.public ActionConfig lookup(java.lang.String actionString)
className#methodName.ActionConfig.getActionString()public void registerPathAlias(java.lang.String alias,
java.lang.String path)
public java.lang.String lookupPathAlias(java.lang.String alias)
Copyright © 2003-2013 Jodd Team