Class DefaultGlobalReportRepository
- java.lang.Object
-
- org.opennms.features.reporting.repository.global.DefaultGlobalReportRepository
-
- All Implemented Interfaces:
GlobalReportRepository
public class DefaultGlobalReportRepository extends java.lang.Object implements GlobalReportRepository
DefaultGlobalReportRepository class.
Class realize the global report repository. It provides access to a local-repository and all configured remote-repositories.- Since:
- 1.10
- Version:
- $Id: $
- Author:
- Markus Neumann
, Ronny Trommer
-
-
Constructor Summary
Constructors Constructor Description DefaultGlobalReportRepository(RemoteRepositoryConfigDao remoteRepositoryConfigDao, ReportRepository localReportRepository)
Default constructor creates one local-repository and all configured remote-repositories.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addReportRepository(ReportRepository repository)
Add a report repository.java.util.List<BasicReportDefinition>
getAllOnlineReports()
java.util.List<BasicReportDefinition>
getAllReports()
java.lang.String
getDisplayName(java.lang.String reportId)
java.lang.String
getEngine(java.lang.String reportId)
java.util.List<BasicReportDefinition>
getOnlineReports(java.lang.String repositoryId)
RemoteRepositoryConfigDao
getRemoteRepositoryConfigDao()
getRemoteRepositoryConfigDaoReportRepository
getReportRepository()
getReportRepositoryjava.util.List<BasicReportDefinition>
getReports(java.lang.String repositoryId)
java.lang.String
getReportService(java.lang.String reportId)
ReportRepository
getRepositoryById(java.lang.String repositoryId)
Get a specific repository identified by repository id.protected ReportRepository
getRepositoryForReport(java.lang.String reportId)
Get a specific repository identified by a report id.java.util.List<ReportRepository>
getRepositoryList()
java.io.InputStream
getTemplateStream(java.lang.String reportId)
void
reloadConfigurationFiles()
void
setLocalReportRepository(ReportRepository reportRepository)
setLocalReportRepositoryvoid
setRemoteRepositoryConfigDao(RemoteRepositoryConfigDao remoteRepositoryConfigDao)
setRemoteRepositoryConfigDao
-
-
-
Constructor Detail
-
DefaultGlobalReportRepository
public DefaultGlobalReportRepository(RemoteRepositoryConfigDao remoteRepositoryConfigDao, ReportRepository localReportRepository)
Default constructor creates one local-repository and all configured remote-repositories.
-
-
Method Detail
-
getAllReports
public java.util.List<BasicReportDefinition> getAllReports()
- Specified by:
getAllReports
in interfaceGlobalReportRepository
-
getReports
public java.util.List<BasicReportDefinition> getReports(java.lang.String repositoryId)
- Specified by:
getReports
in interfaceGlobalReportRepository
-
getAllOnlineReports
public java.util.List<BasicReportDefinition> getAllOnlineReports()
- Specified by:
getAllOnlineReports
in interfaceGlobalReportRepository
-
getOnlineReports
public java.util.List<BasicReportDefinition> getOnlineReports(java.lang.String repositoryId)
- Specified by:
getOnlineReports
in interfaceGlobalReportRepository
-
getReportService
public java.lang.String getReportService(java.lang.String reportId)
- Specified by:
getReportService
in interfaceGlobalReportRepository
-
getDisplayName
public java.lang.String getDisplayName(java.lang.String reportId)
- Specified by:
getDisplayName
in interfaceGlobalReportRepository
-
getEngine
public java.lang.String getEngine(java.lang.String reportId)
- Specified by:
getEngine
in interfaceGlobalReportRepository
-
getTemplateStream
public java.io.InputStream getTemplateStream(java.lang.String reportId)
- Specified by:
getTemplateStream
in interfaceGlobalReportRepository
-
getRepositoryList
public java.util.List<ReportRepository> getRepositoryList()
- Specified by:
getRepositoryList
in interfaceGlobalReportRepository
-
addReportRepository
public void addReportRepository(ReportRepository repository)
Add a report repository.- Specified by:
addReportRepository
in interfaceGlobalReportRepository
- Parameters:
repository
- a ReportRepository
-
getRepositoryById
public ReportRepository getRepositoryById(java.lang.String repositoryId)
Get a specific repository identified by repository id.- Specified by:
getRepositoryById
in interfaceGlobalReportRepository
- Parameters:
repositoryId
- a String as repository identifier- Returns:
- report repository as
ReportRepository
object
-
getRepositoryForReport
protected ReportRepository getRepositoryForReport(java.lang.String reportId)
Get a specific repository identified by a report id.- Parameters:
reportId
- a String as report identifier- Returns:
- report repository as
ReportRepository
object
-
setLocalReportRepository
public void setLocalReportRepository(ReportRepository reportRepository)
setLocalReportRepository
Set the legacy local repository which provides all OpenNMS community reports- Parameters:
reportRepository
- aLegacyLocalReportRepository
object
-
getReportRepository
public ReportRepository getReportRepository()
getReportRepository
Get the legacy local repository which provides all OpenNMS community reports- Returns:
- a
LegacyLocalReportRepository
object
-
setRemoteRepositoryConfigDao
public void setRemoteRepositoryConfigDao(RemoteRepositoryConfigDao remoteRepositoryConfigDao)
setRemoteRepositoryConfigDao
Set the default remote report repository which provides access to OpenNMS CONNECT reports- Parameters:
remoteRepositoryConfigDao
- aDefaultRemoteRepository
object
-
getRemoteRepositoryConfigDao
public RemoteRepositoryConfigDao getRemoteRepositoryConfigDao()
getRemoteRepositoryConfigDao
Get config Dao for remote-repositories- Returns:
- a
DefaultRemoteRepository
object
-
reloadConfigurationFiles
public void reloadConfigurationFiles()
- Specified by:
reloadConfigurationFiles
in interfaceGlobalReportRepository
-
-