private static ReportSessionInfo getReportSessionInfo(String reportPath,HttpSession session) throws Exception {
Map<String,ReportSessionInfo> reportSessionInfos = (Map<String,ReportSessionInfo>)session.getAttribute(AttributeNames.reportSessionInfos);
if (reportSessionInfos == null) {
String error = "No reportSessionInfos in session when trying to get reportSessionInfo with Ajax";
Exception e = new InvalidSessionException(error);
log.error(error,e);
throw e;
}
ReportSessionInfo reportSessionInfo = reportSessionInfos.get(reportPath);
if (reportSessionInfo == null) {
String error = "No reportSessionInfo in session when trying to get with Ajax";
Exception e = new InvalidSessionException(error);
log.error(error,e);
throw e;
}
return reportSessionInfo;
}