|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.madvoc.component.ActionMethodParser
public class ActionMethodParser
Creates action configurations from action java method.
Reads all annotations and builds action path (i.e. configuration).
Invoked only during registration, therefore performance is not most important.
ActionPathMapper| Field Summary | |
|---|---|
protected static java.lang.String |
MACRO_CLASS
|
protected static java.lang.String |
MACRO_EXTENSION
|
protected static java.lang.String |
MACRO_METHOD
|
protected static java.lang.String |
MACRO_PACKAGE
|
protected MadvocConfig |
madvocConfig
|
| Constructor Summary | |
|---|---|
ActionMethodParser()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
buildActionPath(java.lang.String packageActionPath,
java.lang.String classActionPath,
java.lang.String methodActionPath,
java.lang.String extension,
java.lang.String httpMethod)
Builds action path. |
protected java.lang.String |
convertClassNameToActionName(java.lang.String name)
Builds class action path from the class name. |
protected ActionConfig |
createActionConfig(java.lang.Class actionClass,
java.lang.reflect.Method actionMethod,
java.lang.Class<? extends ActionInterceptor>[] interceptorClasses,
java.lang.String actionPath)
Creates new instance of action configuration. |
ActionConfig |
parse(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod)
|
ActionConfig |
parse(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod,
java.lang.String actionPath)
Parses java action method annotations and returns its action configuration. |
protected java.lang.String |
readClassActionPath(java.lang.Class actionClass)
Reads action path from class. |
protected java.lang.Class<? extends ActionInterceptor>[] |
readClassInterceptors(java.lang.Class actionClass)
Reads class interceptors when method interceptors are not availiable. |
protected java.lang.String |
readMethodActionPath(java.lang.reflect.Method actionMethod)
Reads action method. |
protected java.lang.String |
readMethodAlias(java.lang.reflect.Method actionMethod)
Reads method's alias value. |
protected java.lang.String |
readMethodExtension(java.lang.reflect.Method actionMethod)
Reads method's extension. |
protected java.lang.Class<? extends ActionInterceptor>[] |
readMethodInterceptors(java.lang.reflect.Method actionMethod)
Reads method interceptors. |
protected java.lang.String |
readPackageActionPath(java.lang.Class actionClass)
Reads action path for package. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String MACRO_PACKAGE
protected static final java.lang.String MACRO_CLASS
protected static final java.lang.String MACRO_METHOD
protected static final java.lang.String MACRO_EXTENSION
@PetiteInject protected MadvocConfig madvocConfig
| Constructor Detail |
|---|
public ActionMethodParser()
| Method Detail |
|---|
public ActionConfig parse(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod)
public ActionConfig parse(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod,
java.lang.String actionPath)
null if method is not a madvoc action.
protected java.lang.String buildActionPath(java.lang.String packageActionPath,
java.lang.String classActionPath,
java.lang.String methodActionPath,
java.lang.String extension,
java.lang.String httpMethod)
null.
packageActionPath - action path from package (optional)classActionPath - action path from classmethodActionPath - action path from method (optional)extension - extension (optional)httpMethod - (optional)protected java.lang.Class<? extends ActionInterceptor>[] readClassInterceptors(java.lang.Class actionClass)
protected java.lang.Class<? extends ActionInterceptor>[] readMethodInterceptors(java.lang.reflect.Method actionMethod)
protected java.lang.String readPackageActionPath(java.lang.Class actionClass)
madvoc configuration.
If annotation is not set on package-level, class package will be used for
package action path part.
protected java.lang.String readClassActionPath(java.lang.Class actionClass)
MadvocAction annotation,
class action path will be read from annotation value. Otherwise, action class path will be built from the
class name. This is done by removing the package name and the last contained word
(if there is more then one) from the class name. Such name is finally uncapitalized.
If this method returns null class will be ignored.
protected java.lang.String convertClassNameToActionName(java.lang.String name)
protected java.lang.String readMethodActionPath(java.lang.reflect.Method actionMethod)
protected java.lang.String readMethodExtension(java.lang.reflect.Method actionMethod)
protected java.lang.String readMethodAlias(java.lang.reflect.Method actionMethod)
protected ActionConfig createActionConfig(java.lang.Class actionClass,
java.lang.reflect.Method actionMethod,
java.lang.Class<? extends ActionInterceptor>[] interceptorClasses,
java.lang.String actionPath)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||