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.indexOf("Jasper") != -1) {
} else if (resultClassName.indexOf("XSLT") != -1) {
} else if (resultClassName.indexOf("Redirect") != -1) {
// check if the redirect is to an action -- if so, link it
String locationConfig = (String) resultConfig.getParams().get("location");
if (locationConfig == null) {
locationConfig = (String) 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);
}
}
}
}
}
}
// now look for links in the view
for (Iterator iterator = viewMap.entrySet().iterator(); iterator.hasNext();) {
Map.Entry entry = (Map.Entry) iterator.next();
ViewNode view = (ViewNode) entry.getKey();
View viewFile = (View) entry.getValue();
Set targets = viewFile.getTargets();
for (Iterator iterator1 = targets.iterator(); iterator1.hasNext();) {
Target target = (Target) iterator1.next();
String viewTarget = target.getTarget();
addTempLink(view, viewTarget, target.getType(), "");
}