@Test public void testJasperTemplateLocation() throws Exception { assertEquals("Test jasper sample-report template location", "sample-report.jrxml", m_localJasperReportsDao.getTemplateLocation("sample-report")); assertEquals("Test jasper online-sample-report template location", "sample-report.jrxml", m_localJasperReportsDao.getTemplateLocation("online-sample-report")); assertEquals("Test jasper not-online-sample-report template location","sample-report.jrxml", m_localJasperReportsDao.getTemplateLocation("not-online-sample-report")); }
@Override public String getTemplateLocation(String id) { for (JasperReportDefinition report : m_LocalJasperReports.getReportList()) { if (id.equals(report.getId())) { return report.getTemplate(); } } return null; }
LegacyLocalJasperReportsDao implements LocalJasperReportsDao { @Override public String getTemplateLocation(String id) { for (JasperReportDefinition report : m_LocalJasperReports.getReportList()) { if (id.equals(report.getId())) { return report.getTemplate(); } } return null; } }
LegacyLocalJasperReportsDao implements LocalJasperReportsDao { @Override public String getTemplateLocation(String id) { for (JasperReportDefinition report : m_LocalJasperReports.getReportList()) { if (id.equals(report.getId())) { return report.getTemplate(); } } return null; } LegacyLocalJasperReportsDao(Resource configResource, Resource jrTemplateResource); }
LegacyLocalJasperReportsDao implements LocalJasperReportsDao { @Override public String getTemplateLocation(String id) { for (JasperReportDefinition report : m_LocalJasperReports.getReportList()) { if (id.equals(report.getId())) { return report.getTemplate(); } } return null; } LegacyLocalJasperReportsDao(Resource configResource, Resource jrTemplateResource); @Override void loadConfiguration(); @Override void setConfigResource(Resource configResource); @Override Resource getConfigResource(); @Override void setJrTemplateResource(Resource jrTemplateResource); @Override Resource getJrTemplateResource(); @Override String getTemplateLocation(String id); @Override String getEngine(String id); @Override InputStream getTemplateStream(String id); LocalJasperReports getLocalJasperReports(); void setLocalJasperReports(LocalJasperReports localJasperReports); }
LegacyLocalJasperReportsDao implements LocalJasperReportsDao { @Override public String getTemplateLocation(String id) { for (JasperReportDefinition report : m_LocalJasperReports.getReportList()) { if (id.equals(report.getId())) { return report.getTemplate(); } } return null; } LegacyLocalJasperReportsDao(Resource configResource, Resource jrTemplateResource); @Override void loadConfiguration(); @Override void setConfigResource(Resource configResource); @Override Resource getConfigResource(); @Override void setJrTemplateResource(Resource jrTemplateResource); @Override Resource getJrTemplateResource(); @Override String getTemplateLocation(String id); @Override String getEngine(String id); @Override InputStream getTemplateStream(String id); LocalJasperReports getLocalJasperReports(); void setLocalJasperReports(LocalJasperReports localJasperReports);  }