@Transactional(readOnly = true) private HashMap<String, OnmsCategory> loadCategoryMap() { final HashMap<String, OnmsCategory> categoryMap = new HashMap<String, OnmsCategory>(); for (final OnmsCategory category : m_categoryDao.findAll()) { categoryMap.put(category.getName(), category); } return categoryMap; }
/** {@inheritDoc} */ @Override protected Map<String, Object> referenceData(HttpServletRequest req) throws Exception { String reportId = req.getParameter("reportId"); Map<String, Object> data = new HashMap<String, Object>(); List<ReportFormat> formats = m_reportWrapperService.getFormats(reportId); data.put("formats", formats); List<String> onmsCategories = m_categoryDao.getAllCategoryNames(); data.put("onmsCategories", onmsCategories); List<String> categories = m_catConfigService.getCategoriesList(); data.put("categories", categories); return data; }