use of org.opennms.features.reporting.model.basicreport.BasicReportDefinition in project opennms by OpenNMS.
the class DefaultRemoteRepositoryTest method reportIdsStartWithRepositoryIdTest.
@Test
public void reportIdsStartWithRepositoryIdTest() {
List<BasicReportDefinition> reports = m_defaultRemoteRepository.getReports();
logger.debug("reportIdsStartWithRepositoryIdTest");
for (BasicReportDefinition report : reports) {
assertTrue(report.getId().startsWith(m_defaultRemoteRepository.getRepositoryId()));
logger.debug(report.getId());
logger.debug("'{}'", report.getRepositoryId());
}
}
use of org.opennms.features.reporting.model.basicreport.BasicReportDefinition in project opennms by OpenNMS.
the class DefaultRemoteRepositoryTest method getReports.
@Test
public void getReports() {
List<BasicReportDefinition> reports = m_defaultRemoteRepository.getReports();
logger.debug("getReports");
for (BasicReportDefinition report : reports) {
logger.debug(report.toString());
}
}
use of org.opennms.features.reporting.model.basicreport.BasicReportDefinition in project opennms by OpenNMS.
the class DefaultReportStoreService method getFormatMap.
/**
* <p>getFormatMap</p>
*
* @return a {@link java.util.Map} object.
*/
@Override
public Map<String, Object> getFormatMap() {
final HashMap<String, Object> formatMap = new HashMap<String, Object>();
for (final BasicReportDefinition report : m_globalReportRepository.getAllReports()) {
final List<ReportFormat> formats = m_reportServiceLocator.getReportService(report.getReportService()).getFormats(report.getId());
formatMap.put(report.getId(), formats);
}
return formatMap;
}
use of org.opennms.features.reporting.model.basicreport.BasicReportDefinition in project opennms by OpenNMS.
the class DefaultGlobalReportRepository method getAllReports.
/**
* {@inheritDoc}
*/
@Override
public List<BasicReportDefinition> getAllReports() {
List<BasicReportDefinition> results = new ArrayList<>();
for (ReportRepository repository : m_repositoryList) {
results.addAll(repository.getReports());
}
logger.debug("getAllReports was called result: '{}'", results);
return results;
}
use of org.opennms.features.reporting.model.basicreport.BasicReportDefinition in project opennms by OpenNMS.
the class DefaultGlobalReportRepository method getReports.
/**
* {@inheritDoc}
*/
@Override
public List<BasicReportDefinition> getReports(String repositoryId) {
List<BasicReportDefinition> results = new ArrayList<>();
ReportRepository repository = this.getRepositoryById(repositoryId);
if (repository != null) {
results.addAll(repository.getReports());
}
logger.debug("getReports was called for: '{}' result: '{}'", repositoryId, results);
return results;
}
Aggregations