use of jodd.madvoc.config.ActionNames in project jodd by oblac.
the class ActionMethodParser method parseActionDefinition.
/**
* Parses action class and method and creates {@link ActionDefinition parsed action definition}.
*/
public ActionDefinition parseActionDefinition(final Class<?> actionClass, final Method actionMethod) {
final ActionAnnotationValues annotationValues = detectActionAnnotationValues(actionMethod);
final ActionConfig actionConfig = resolveActionConfig(annotationValues);
final String[] packageActionNames = readPackageActionPath(actionClass);
final String[] classActionNames = readClassActionPath(actionClass);
final String[] methodActionNames = readMethodActionPath(actionMethod.getName(), annotationValues, actionConfig);
final String method = readMethodHttpMethod(actionMethod);
final ActionNames actionNames = new ActionNames(packageActionNames, classActionNames, methodActionNames, method);
final ActionNamingStrategy namingStrategy;
try {
namingStrategy = ClassUtil.newInstance(actionConfig.getNamingStrategy());
contextInjectorComponent.injectContext(namingStrategy);
} catch (final Exception ex) {
throw new MadvocException(ex);
}
return namingStrategy.buildActionDef(actionClass, actionMethod, actionNames);
}
Aggregations