jodd.madvoc.component
Class ActionsManager

java.lang.Object
  extended by jodd.madvoc.component.ActionsManager

public class ActionsManager
extends java.lang.Object

Manages all Madvoc action registrations.


Nested Class Summary
protected  class ActionsManager.ActionPathChunksBinarySearch
          Binary search for action paths chunks.
 
Field Summary
protected  ActionMethodParser actionMethodParser
           
protected  int actionsCount
           
protected  jodd.util.collection.SortedArrayList<ActionConfigSet> list
           
protected  jodd.util.BinarySearch<ActionConfigSet> listBS
           
protected  ActionsManager.ActionPathChunksBinarySearch listMatch
           
protected  MadvocConfig madvocConfig
           
protected  java.util.HashMap<java.lang.String,ActionConfigSet> map
           
 
Constructor Summary
ActionsManager()
           
 
Method Summary
 int getActionsCount()
          Returns total number of registered actions.
 java.util.List<ActionConfig> getAllActionConfigurations()
          Returns all registered action configurations.
 ActionConfig lookup(java.lang.String actionPath, java.lang.String[] actionChunks, java.lang.String method)
          Returns action configurations for provided action path.
protected  int matchChunk(java.lang.String chunk, int chunkNdx, int macroNdx, int low, int high)
           
 ActionConfig register(java.lang.Class actionClass, java.lang.reflect.Method actionMethod)
           
 ActionConfig register(java.lang.Class actionClass, java.lang.reflect.Method actionMethod, java.lang.String actionPath)
           
 ActionConfig register(java.lang.Class actionClass, java.lang.String actionMethod)
          Registers action with provided action class and method name.
 ActionConfig register(java.lang.Class actionClass, java.lang.String actionMethod, java.lang.String actionPath)
          Registers action with provided action path, class and method name.
 ActionConfig register(java.lang.String actionSignature)
          Registers action with provided action signature.
 ActionConfig register(java.lang.String actionSignature, java.lang.String actionPath)
          Registers action with provided action signature.
protected  ActionConfig registerAction(java.lang.Class actionClass, java.lang.reflect.Method actionMethod, java.lang.String actionPath)
          Registration single point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actionMethodParser

@PetiteInject
protected ActionMethodParser actionMethodParser

madvocConfig

@PetiteInject
protected MadvocConfig madvocConfig

actionsCount

protected int actionsCount

map

protected final java.util.HashMap<java.lang.String,ActionConfigSet> map

list

protected final jodd.util.collection.SortedArrayList<ActionConfigSet> list

listMatch

protected final ActionsManager.ActionPathChunksBinarySearch listMatch

listBS

protected final jodd.util.BinarySearch<ActionConfigSet> listBS
Constructor Detail

ActionsManager

public ActionsManager()
Method Detail

getAllActionConfigurations

public java.util.List<ActionConfig> getAllActionConfigurations()
Returns all registered action configurations.


getActionsCount

public int getActionsCount()
Returns total number of registered actions.


register

public ActionConfig register(java.lang.String actionSignature)
Registers action with provided action signature.


register

public ActionConfig register(java.lang.String actionSignature,
                             java.lang.String actionPath)
Registers action with provided action signature.


register

public ActionConfig register(java.lang.Class actionClass,
                             java.lang.String actionMethod)
Registers action with provided action class and method name.


register

public ActionConfig register(java.lang.Class actionClass,
                             java.lang.String actionMethod,
                             java.lang.String actionPath)
Registers action with provided action path, class and method name.


register

public ActionConfig register(java.lang.Class actionClass,
                             java.lang.reflect.Method actionMethod,
                             java.lang.String actionPath)

register

public ActionConfig register(java.lang.Class actionClass,
                             java.lang.reflect.Method actionMethod)

registerAction

protected ActionConfig registerAction(java.lang.Class actionClass,
                                      java.lang.reflect.Method actionMethod,
                                      java.lang.String actionPath)
Registration single point. Optionally, if action path with the same name already exist, exception will be thrown. Returns created ActionConfig.


lookup

public ActionConfig lookup(java.lang.String actionPath,
                           java.lang.String[] actionChunks,
                           java.lang.String method)
Returns action configurations for provided action path. Returns null if action path is not registered.


matchChunk

protected int matchChunk(java.lang.String chunk,
                         int chunkNdx,
                         int macroNdx,
                         int low,
                         int high)


Copyright © 2003-2011 Jodd Team