private static Report buildResourceReport( ResourceService service, OnmsResource parentResource, String title) { Report report = new Report(); report.setTitle(title); report.setShow_timespan_button(true); report.setShow_graphtype_button(true); List<OnmsResource> resources = service.findChildResources(parentResource, "interfaceSnmp"); for (OnmsResource resource : resources) { PrefabGraph[] graphs = service.findPrefabGraphsForResource(resource); if (graphs.length == 0) { continue; } Graph graph = new Graph(); graph.setTitle(""); graph.setResourceId(resource.getId()); graph.setTimespan("7_day"); graph.setGraphtype(graphs[0].getName()); report.addGraph(graph); } return report; }