jodd.madvoc.component
Class ActionPathMapper

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

public class ActionPathMapper
extends java.lang.Object

Resolves action configuration from action path on each request. Should be built with great performances.

See Also:
ActionMethodParser

Field Summary
protected  ActionsManager actionsManager
           
protected  java.lang.String defaultMethodName1
           
protected  java.lang.String defaultMethodName2
           
protected static java.lang.String FALLBACK_ACTION_METHOD_NAME
           
protected  MadvocConfig madvocConfig
           
 
Constructor Summary
ActionPathMapper()
           
 
Method Summary
protected  java.lang.String buildSignature(java.lang.String packageName, java.lang.String className, java.lang.String methodName, java.lang.String extension, java.lang.String httpMethod)
          Builds action method signature based on provided names.
protected  ActionConfig lookupActionConfig(java.lang.String actionPath)
          Lookups action configuration from action path and resolves unregistered paths.
protected  java.lang.String mapActionPathToSignature(java.lang.String actionPath, java.lang.String packageRoot)
          Maps action path to method signature.
protected  void registerActionPath(java.lang.String actionPath, java.lang.String packageRoot)
          Tries to registers action path using CoC mapping.
protected  void registerSupplementAction(java.lang.String actionPath)
          Registers supplement action for all actions that ends with default extension.
 ActionConfig resolveActionConfig(java.lang.String actionPath, java.lang.String method)
          Performs action config lookup from action path and http request method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FALLBACK_ACTION_METHOD_NAME

protected static final java.lang.String FALLBACK_ACTION_METHOD_NAME
See Also:
Constant Field Values

defaultMethodName1

protected java.lang.String defaultMethodName1

defaultMethodName2

protected java.lang.String defaultMethodName2

actionsManager

@PetiteInject
protected ActionsManager actionsManager

madvocConfig

@PetiteInject
protected MadvocConfig madvocConfig
Constructor Detail

ActionPathMapper

public ActionPathMapper()
Method Detail

lookupActionConfig

protected ActionConfig lookupActionConfig(java.lang.String actionPath)
Lookups action configuration from action path and resolves unregistered paths. Lookup may be optionally disabled if mapping is not used.


resolveActionConfig

public ActionConfig resolveActionConfig(java.lang.String actionPath,
                                        java.lang.String method)
Performs action config lookup from action path and http request method.


registerActionPath

protected void registerActionPath(java.lang.String actionPath,
                                  java.lang.String packageRoot)
Tries to registers action path using CoC mapping.


mapActionPathToSignature

protected java.lang.String mapActionPathToSignature(java.lang.String actionPath,
                                                    java.lang.String packageRoot)
Maps action path to method signature. Actually, just parse the action path and calls the buildSignature(String, String, String, String, String).


buildSignature

protected java.lang.String buildSignature(java.lang.String packageName,
                                          java.lang.String className,
                                          java.lang.String methodName,
                                          java.lang.String extension,
                                          java.lang.String httpMethod)
Builds action method signature based on provided names. Http method is ignored.


registerSupplementAction

protected void registerSupplementAction(java.lang.String actionPath)
Registers supplement action for all actions that ends with default extension.



Copyright © 2003-2011 Jodd Team