use of org.opennms.features.reporting.repository.ReportRepository in project opennms by OpenNMS.
the class DefaultDatabaseReportListService method getAll.
/**
* <p>
* getAll Reports from all Repositories
* </p>
*
* @return a {@link java.util.List} object.
*/
@Deprecated
@Override
public List<DatabaseReportDescription> getAll() {
List<DatabaseReportDescription> allReports = new ArrayList<>();
for (ReportRepository globalRepository : m_globalReportRepository.getRepositoryList()) {
for (BasicReportDefinition report : globalRepository.getReports()) {
DatabaseReportDescription summary = new DatabaseReportDescription();
summary.setRepositoryId(globalRepository.getRepositoryId());
summary.setId(report.getId());
summary.setDisplayName(report.getDisplayName());
summary.setDescription(report.getDescription());
summary.setIsOnline(report.getOnline());
summary.setAllowAccess(report.getAllowAccess());
allReports.add(summary);
}
}
return allReports;
}
use of org.opennms.features.reporting.repository.ReportRepository in project opennms by OpenNMS.
the class DefaultGlobalReportRepository method getOnlineReports.
/**
* {@inheritDoc}
*/
@Override
public List<BasicReportDefinition> getOnlineReports(String repositoryId) {
List<BasicReportDefinition> results = new ArrayList<>();
ReportRepository repository = this.getRepositoryById(repositoryId);
if (repository != null) {
results.addAll(repository.getOnlineReports());
}
logger.debug("getOnlineReports was called for: '{}' result: '{}'", repositoryId, results);
return results;
}
use of org.opennms.features.reporting.repository.ReportRepository in project opennms by OpenNMS.
the class DefaultGlobalReportRepository method getEngine.
/**
* {@inheritDoc}
*/
@Override
public String getEngine(String reportId) {
String result = "";
ReportRepository repository = this.getRepositoryForReport(reportId);
if (repository != null) {
result = repository.getEngine(reportId);
}
logger.debug("getEngine was called for: '{}' result: '{}'", reportId, result);
return result;
}
use of org.opennms.features.reporting.repository.ReportRepository in project opennms by OpenNMS.
the class DefaultGlobalReportRepository method getAllOnlineReports.
/**
* {@inheritDoc}
*/
@Override
public List<BasicReportDefinition> getAllOnlineReports() {
List<BasicReportDefinition> results = new ArrayList<>();
for (ReportRepository repository : m_repositoryList) {
results.addAll(repository.getOnlineReports());
}
logger.debug("getAllOnlineReports was called result: '{}'", results);
return results;
}
use of org.opennms.features.reporting.repository.ReportRepository in project opennms by OpenNMS.
the class DefaultDatabaseReportListService method getActiveRepositories.
@Override
public List<ReportRepositoryDescription> getActiveRepositories() {
List<ReportRepositoryDescription> result = new ArrayList<>();
List<ReportRepository> reportRepositoryList = new ArrayList<>();
reportRepositoryList = m_globalReportRepository.getRepositoryList();
for (ReportRepository repository : reportRepositoryList) {
ReportRepositoryDescription reportRepositoryDescription = new ReportRepositoryDescription();
reportRepositoryDescription.setId(repository.getRepositoryId());
reportRepositoryDescription.setDescription(repository.getRepositoryDescription());
reportRepositoryDescription.setDisplayName(repository.getRepositoryName());
reportRepositoryDescription.setManagementUrl(repository.getManagementUrl());
result.add(reportRepositoryDescription);
}
return result;
}
Aggregations