ActionNode action = new ActionNode(actionName);
subGraph.addNode(action);
Set<String> resultNames = actionConfig.getResults().keySet();
for (String resultName : resultNames) {
ResultConfig resultConfig = actionConfig.getResults().get(resultName);
String resultClassName = resultConfig.getClassName();
if (resultClassName.equals(ActionChainResult.class.getName())) {
} else if (resultClassName.contains("Dispatcher")
|| resultClassName.contains("Velocity")
|| resultClassName.contains("Freemarker")) {
if (resultConfig.getParams().get("location") == null) {
continue;
}
String location = getViewLocation(resultConfig.getParams().get("location"), namespace);
// FIXME: work with new configuration style
if (location.endsWith("action")) {
addTempLink(action, location, Link.TYPE_RESULT, resultConfig.getName());
} else {
ViewNode view = new ViewNode(stripLocation(location));
subGraph.addNode(view);
addTempLink(action, location, Link.TYPE_RESULT, resultConfig.getName());
View viewFile = getView(namespace, actionName, resultName, location);
if (viewFile != null) {
viewMap.put(view, viewFile);
}
}
} else if (resultClassName.contains("Jasper")) {
} else if (resultClassName.contains("XSLT")) {
} else if (resultClassName.contains("Redirect")) {
// check if the redirect is to an action -- if so, link it
String locationConfig = resultConfig.getParams().get("location");
if (locationConfig == null) {
locationConfig = resultConfig.getParams().get("actionName");
}
String location = getViewLocation(locationConfig, namespace);
// FIXME: work with new configuration style
if (location.endsWith("action")) {
addTempLink(action, location, Link.TYPE_REDIRECT, resultConfig.getName());
} else {
ViewNode view = new ViewNode(stripLocation(location));
subGraph.addNode(view);
addTempLink(action, location, Link.TYPE_REDIRECT, resultConfig.getName());
View viewFile = getView(namespace, actionName, resultName, location);
if (viewFile != null) {
viewMap.put(view, viewFile);
}