ActionProperties aps = super.prepareActionProperties(requestPath, requestHttpMethod, request);
RequestInfo requestInfo = new RequestInfo(requestPath, requestHttpMethod);
log.debug(" requestInfo: " + requestInfo);
RouteInfo routeInfo = MatchMaker.getInstance().match(requestInfo);
log.debug("matched route: " + routeInfo);
//setup field values
Map<String, String> requiredFieldValues = routeInfo.getRequiredFieldValues();
if (requiredFieldValues != null) {
CurrentThreadCacheClient.cacheFieldValues(requiredFieldValues);
for(Map.Entry<String, String> entry : requiredFieldValues.entrySet()) {
request.setAttribute(entry.getKey(), entry.getValue());
}
}
aps.controller = routeInfo.getController();
aps.controllerClassName = routeInfo.getControllerClassName();
aps.action = routeInfo.getAction();
aps.model = routeInfo.getModel();
aps.format = routeInfo.getFormat();
aps.resource = routeInfo.getResourceName();
aps.routeType = routeInfo.getRouteType();
aps.requiredFieldValues = requiredFieldValues;
aps.cacheable = routeInfo.getCacheable();
return aps;
}