Search in sources :

Example 11 with ReportRepository

use of org.opennms.features.reporting.repository.ReportRepository in project opennms by OpenNMS.

the class DefaultDatabaseReportListService method getAllOnline.

/**
 * <p>
 * getAll Reports from all Repositories
 * </p>
 *
 * @return a {@link java.util.List} object.
 */
@Deprecated
@Override
public List<DatabaseReportDescription> getAllOnline() {
    List<DatabaseReportDescription> onlineReports = new ArrayList<>();
    for (ReportRepository m_repo : m_globalReportRepository.getRepositoryList()) {
        for (BasicReportDefinition report : m_repo.getOnlineReports()) {
            DatabaseReportDescription summary = new DatabaseReportDescription();
            summary.setRepositoryId(m_repo.getRepositoryId());
            summary.setId(report.getId());
            summary.setDisplayName(report.getDisplayName());
            summary.setDescription(report.getDescription());
            summary.setIsOnline(report.getOnline());
            summary.setAllowAccess(report.getAllowAccess());
            onlineReports.add(summary);
        }
    }
    return onlineReports;
}
Also used : DatabaseReportDescription(org.opennms.web.svclayer.model.DatabaseReportDescription) ArrayList(java.util.ArrayList) GlobalReportRepository(org.opennms.features.reporting.repository.global.GlobalReportRepository) ReportRepository(org.opennms.features.reporting.repository.ReportRepository) BasicReportDefinition(org.opennms.features.reporting.model.basicreport.BasicReportDefinition)

Aggregations

ReportRepository (org.opennms.features.reporting.repository.ReportRepository)11 ArrayList (java.util.ArrayList)7 BasicReportDefinition (org.opennms.features.reporting.model.basicreport.BasicReportDefinition)6 GlobalReportRepository (org.opennms.features.reporting.repository.global.GlobalReportRepository)3 DatabaseReportDescription (org.opennms.web.svclayer.model.DatabaseReportDescription)2 InputStream (java.io.InputStream)1 ReportRepositoryDescription (org.opennms.web.svclayer.model.ReportRepositoryDescription)1