if (!namespace.startsWith(ns)) {
continue;
}
SubGraph subGraph = graph.create(namespace);
Set actionNames = StrutsConfigRetriever.getActionNames(namespace);
for (Iterator iterator = actionNames.iterator(); iterator.hasNext();) {
String actionName = (String) iterator.next();
ActionConfig actionConfig = StrutsConfigRetriever.getActionConfig(namespace,
actionName);
ActionNode action = new ActionNode(actionName);
subGraph.addNode(action);
Set resultNames = actionConfig.getResults().keySet();
for (Iterator iterator2 = resultNames.iterator(); iterator2.hasNext();) {
String resultName = (String) iterator2.next();
ResultConfig resultConfig = ((ResultConfig) actionConfig.getResults().get(resultName));
String resultClassName = resultConfig.getClassName();
if (resultClassName.equals(ActionChainResult.class.getName())) {
} else if (resultClassName.indexOf("Dispatcher") != -1
|| resultClassName.indexOf("Velocity") != -1
|| resultClassName.indexOf("Freemarker") != -1) {
if (resultConfig.getParams().get("location") == null) {
continue;
}
String location = getViewLocation((String) 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.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) {