@Test public void catchUniformExceptionTest() { String report = m_defaultRemoteRepository.getReportService("null"); logger.debug("ReportService for null-report '{}'", report); }
@Override public String getReportService(String reportId) { reportId = reportId.substring(reportId.indexOf('_') + 1); String result = ""; if (isConfigOk()) { m_webResource = m_client.resource(m_remoteRepositoryDefintion.getURI() + "reportService/" + reportId); try { result = m_webResource.get(String.class); } catch (Exception e) { logger.error("Error requesting report service by report id. Error message: '{}' URI was: '{}'", e.getMessage(), m_webResource.getURI()); e.printStackTrace(); } logger.debug("getReportService for id / result: '{}' URI was: '{}' ", reportId + " / " + result, m_webResource.getURI()); } return result; }
DefaultRemoteRepository implements ReportRepository { @Override public String getReportService(String reportId) { reportId = reportId.substring(reportId.indexOf('_') + 1); String result = ""; if (isConfigOk()) { m_webResource = m_client.resource(m_remoteRepositoryDefintion.getURI() + "reportService/" + reportId); try { result = m_webResource.get(String.class); } catch (Exception e) { logger.error("Error requesting report service by report id. Error message: '{}' URI was: '{}'", e.getMessage(), m_webResource.getURI()); e.printStackTrace(); } logger.debug("getReportService for id / result: '{}' URI was: '{}' ", reportId + " / " + result, m_webResource.getURI()); } return result; } }
DefaultRemoteRepository implements ReportRepository { @Override public String getReportService(String reportId) { reportId = reportId.substring(reportId.indexOf('_') + 1); String result = ""; if (isConfigOk()) { m_webResource = m_client.resource(m_remoteRepositoryDefintion.getURI() + "reportService/" + reportId); try { result = m_webResource.get(String.class); } catch (Exception e) { logger.error("Error requesting report service by report id. Error message: '{}' URI was: '{}'", e.getMessage(), m_webResource.getURI()); e.printStackTrace(); } logger.debug("getReportService for id / result: '{}' URI was: '{}' ", reportId + " / " + result, m_webResource.getURI()); } return result; } DefaultRemoteRepository(
            RemoteRepositoryDefinition remoteRepositoryDefinition,
            String jasperReportsVersion); }
DefaultRemoteRepository implements ReportRepository { @Override public String getReportService(String reportId) { reportId = reportId.substring(reportId.indexOf('_') + 1); String result = ""; if (isConfigOk()) { m_webResource = m_client.resource(m_remoteRepositoryDefintion.getURI() + "reportService/" + reportId); try { result = m_webResource.get(String.class); } catch (Exception e) { logger.error("Error requesting report service by report id. Error message: '{}' URI was: '{}'", e.getMessage(), m_webResource.getURI()); e.printStackTrace(); } logger.debug("getReportService for id / result: '{}' URI was: '{}' ", reportId + " / " + result, m_webResource.getURI()); } return result; } DefaultRemoteRepository(
            RemoteRepositoryDefinition remoteRepositoryDefinition,
            String jasperReportsVersion); @Override List<BasicReportDefinition> getReports(); @Override List<BasicReportDefinition> getOnlineReports(); @Override String getReportService(String reportId); @Override String getDisplayName(String reportId); @Override String getEngine(String reportId); @Override InputStream getTemplateStream(String reportId); @Override String getRepositoryId(); @Override String getRepositoryName(); @Override String getRepositoryDescription(); @Override String getManagementUrl(); @Override void loadConfiguration(); }
DefaultRemoteRepository implements ReportRepository { @Override public String getReportService(String reportId) { reportId = reportId.substring(reportId.indexOf('_') + 1); String result = ""; if (isConfigOk()) { m_webResource = m_client.resource(m_remoteRepositoryDefintion.getURI() + "reportService/" + reportId); try { result = m_webResource.get(String.class); } catch (Exception e) { logger.error("Error requesting report service by report id. Error message: '{}' URI was: '{}'", e.getMessage(), m_webResource.getURI()); e.printStackTrace(); } logger.debug("getReportService for id / result: '{}' URI was: '{}' ", reportId + " / " + result, m_webResource.getURI()); } return result; } DefaultRemoteRepository(
            RemoteRepositoryDefinition remoteRepositoryDefinition,
            String jasperReportsVersion); @Override List<BasicReportDefinition> getReports(); @Override List<BasicReportDefinition> getOnlineReports(); @Override String getReportService(String reportId); @Override String getDisplayName(String reportId); @Override String getEngine(String reportId); @Override InputStream getTemplateStream(String reportId); @Override String getRepositoryId(); @Override String getRepositoryName(); @Override String getRepositoryDescription(); @Override String getManagementUrl(); @Override void loadConfiguration();  }