} catch (IOException e) {
throw new CommandExecutionException(e);
}
}
ReportRequest request = new ReportRequest();
request.setProfileIds(profileIds);
List<ReportSpec> reportSpecs = reportManager.listReportSpecs();
for (ReportSpec reportSpec : reportSpecs) {
if (reportSpec.getName().equals(reportType)) {
request.setReportSpec(reportSpec);
break;
}
}
if (request.getReportSpec() == null) {
throw new CommandExecutionException(
String.format("Report [%s] not found.", reportType));
}
writeReport(request, filter);