@Test public void testGetOnlineReports() throws Exception { assertEquals("Test get mocked *ONLINE* reports from configured local repository", 1, m_legacyLocalReportRepository.getOnlineReports().size()); }
@Override public List<BasicReportDefinition> getOnlineReports() { List<BasicReportDefinition> resultList = new ArrayList<BasicReportDefinition>(); for (BasicReportDefinition report : m_localReportsDao.getOnlineReports()) { BasicReportDefinition resultReport = new LegacyLocalReportDefinition(); try { BeanUtils.copyProperties(resultReport, report); resultReport.setId(REPOSITORY_ID + "_" + report.getId()); resultReport.setAllowAccess(true); } catch (IllegalAccessException e) { logger.error("IllegalAccessException during BeanUtils.copyProperties for BasicReportDefinion '{}'", e.getMessage()); e.printStackTrace(); } catch (InvocationTargetException e) { logger.error("InvocationTargetException during BeanUtils.copyProperties for BasicReportDefinion '{}'", e.getMessage()); e.printStackTrace(); } resultList.add(resultReport); } return resultList; }
LegacyLocalReportRepository implements ReportRepository { @Override public List<BasicReportDefinition> getOnlineReports() { List<BasicReportDefinition> resultList = new ArrayList<BasicReportDefinition>(); for (BasicReportDefinition report : m_localReportsDao.getOnlineReports()) { BasicReportDefinition resultReport = new LegacyLocalReportDefinition(); try { BeanUtils.copyProperties(resultReport, report); resultReport.setId(REPOSITORY_ID + "_" + report.getId()); resultReport.setAllowAccess(true); } catch (IllegalAccessException e) { logger.error("IllegalAccessException during BeanUtils.copyProperties for BasicReportDefinion '{}'", e.getMessage()); e.printStackTrace(); } catch (InvocationTargetException e) { logger.error("InvocationTargetException during BeanUtils.copyProperties for BasicReportDefinion '{}'", e.getMessage()); e.printStackTrace(); } resultList.add(resultReport); } return resultList; } }
LegacyLocalReportRepository implements ReportRepository { @Override public List<BasicReportDefinition> getOnlineReports() { List<BasicReportDefinition> resultList = new ArrayList<BasicReportDefinition>(); for (BasicReportDefinition report : m_localReportsDao.getOnlineReports()) { BasicReportDefinition resultReport = new LegacyLocalReportDefinition(); try { BeanUtils.copyProperties(resultReport, report); resultReport.setId(REPOSITORY_ID + "_" + report.getId()); resultReport.setAllowAccess(true); } catch (IllegalAccessException e) { logger.error("IllegalAccessException during BeanUtils.copyProperties for BasicReportDefinion '{}'", e.getMessage()); e.printStackTrace(); } catch (InvocationTargetException e) { logger.error("InvocationTargetException during BeanUtils.copyProperties for BasicReportDefinion '{}'", e.getMessage()); e.printStackTrace(); } resultList.add(resultReport); } return resultList; } LegacyLocalReportRepository(LocalReportsDao localReportsDao, LocalJasperReportsDao localJasperReportsDao); }
LegacyLocalReportRepository implements ReportRepository { @Override public List<BasicReportDefinition> getOnlineReports() { List<BasicReportDefinition> resultList = new ArrayList<BasicReportDefinition>(); for (BasicReportDefinition report : m_localReportsDao.getOnlineReports()) { BasicReportDefinition resultReport = new LegacyLocalReportDefinition(); try { BeanUtils.copyProperties(resultReport, report); resultReport.setId(REPOSITORY_ID + "_" + report.getId()); resultReport.setAllowAccess(true); } catch (IllegalAccessException e) { logger.error("IllegalAccessException during BeanUtils.copyProperties for BasicReportDefinion '{}'", e.getMessage()); e.printStackTrace(); } catch (InvocationTargetException e) { logger.error("InvocationTargetException during BeanUtils.copyProperties for BasicReportDefinion '{}'", e.getMessage()); e.printStackTrace(); } resultList.add(resultReport); } return resultList; } LegacyLocalReportRepository(LocalReportsDao localReportsDao, LocalJasperReportsDao localJasperReportsDao); @Override List<BasicReportDefinition> getReports(); @Override List<BasicReportDefinition> getOnlineReports(); @Override String getReportService(String id); @Override String getDisplayName(String id); @Override String getEngine(String id); @Override InputStream getTemplateStream(String id); @Override String getRepositoryId(); @Override String getRepositoryName(); @Override String getRepositoryDescription(); @Override String getManagementUrl(); void setLocalReportsDao(LocalReportsDao localReportsDao); LocalReportsDao getLocalReportsDao(); void setLocalJasperReportsDao(LocalJasperReportsDao localJasperReportsDao); LocalJasperReportsDao getLocalJasperReportsDao(); @Override void loadConfiguration(); }
LegacyLocalReportRepository implements ReportRepository { @Override public List<BasicReportDefinition> getOnlineReports() { List<BasicReportDefinition> resultList = new ArrayList<BasicReportDefinition>(); for (BasicReportDefinition report : m_localReportsDao.getOnlineReports()) { BasicReportDefinition resultReport = new LegacyLocalReportDefinition(); try { BeanUtils.copyProperties(resultReport, report); resultReport.setId(REPOSITORY_ID + "_" + report.getId()); resultReport.setAllowAccess(true); } catch (IllegalAccessException e) { logger.error("IllegalAccessException during BeanUtils.copyProperties for BasicReportDefinion '{}'", e.getMessage()); e.printStackTrace(); } catch (InvocationTargetException e) { logger.error("InvocationTargetException during BeanUtils.copyProperties for BasicReportDefinion '{}'", e.getMessage()); e.printStackTrace(); } resultList.add(resultReport); } return resultList; } LegacyLocalReportRepository(LocalReportsDao localReportsDao, LocalJasperReportsDao localJasperReportsDao); @Override List<BasicReportDefinition> getReports(); @Override List<BasicReportDefinition> getOnlineReports(); @Override String getReportService(String id); @Override String getDisplayName(String id); @Override String getEngine(String id); @Override InputStream getTemplateStream(String id); @Override String getRepositoryId(); @Override String getRepositoryName(); @Override String getRepositoryDescription(); @Override String getManagementUrl(); void setLocalReportsDao(LocalReportsDao localReportsDao); LocalReportsDao getLocalReportsDao(); void setLocalJasperReportsDao(LocalJasperReportsDao localJasperReportsDao); LocalJasperReportsDao getLocalJasperReportsDao(); @Override void loadConfiguration();  }