public class XDocReportRegistry extends AbstractRegistry<IXDocReportFactoryDiscovery> implements ITemplateCacheInfoProvider, Serializable
IXDocReport instances.| Constructor and Description |
|---|
XDocReportRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkReportId(String reportId)
Check if registry can register the report with this id.
|
void |
clear()
Clear the cached reports.
|
protected ICacheStorage<String,IXDocReport> |
createCache()
Create the storage cache to store instances of IXDocReport.
|
IXDocReport |
createReport(InputStream sourceStream) |
IXDocReport |
createReport(XDocArchive documentArchive) |
protected void |
doDispose() |
boolean |
existsReport(String reportId)
Returns true if report identified with the given id exists in the registry and false otherwise.
|
String |
generateUniqueReportId(String reportId)
Generate unique report id.
|
Collection<IXDocReport> |
getCachedReports()
Returns cached report
IXDocReport; |
MimeMapping |
getMimeMapping(String fileExtension)
Returns mime mapping for the file extension.
|
static XDocReportRegistry |
getRegistry() |
IXDocReport |
getReport(String reportId)
Returns the report identified with the given id.
|
Collection<IXDocReportFactoryDiscovery> |
getReportFactoryDiscoveries()
Returns list of report factory discoveries.
|
IEntryInfo |
getTemplateCacheInfo(String reportId,
String entryName) |
IXDocReport |
loadReport(InputStream sourceStream)
Load report.
|
IXDocReport |
loadReport(InputStream sourceStream,
boolean cacheReport)
Load report.
|
IXDocReport |
loadReport(InputStream sourceStream,
ITemplateEngine templateEngine)
Load report.
|
IXDocReport |
loadReport(InputStream sourceStream,
ITemplateEngine templateEngine,
boolean cacheReport)
Load report.
|
IXDocReport |
loadReport(InputStream sourceStream,
String reportId)
Load report.
|
IXDocReport |
loadReport(InputStream sourceStream,
String reportId,
boolean cacheReport)
Load report.
|
IXDocReport |
loadReport(InputStream sourceStream,
String reportId,
ITemplateEngine templateEngine)
Load report.
|
IXDocReport |
loadReport(InputStream sourceStream,
String reportId,
ITemplateEngine templateEngine,
boolean cacheReport)
Load report.
|
IXDocReport |
loadReport(InputStream sourceStream,
String reportId,
String templateEngineKind)
Load report.
|
IXDocReport |
loadReport(InputStream sourceStream,
String reportId,
String templateEngineKind,
boolean cacheReport)
Load report.
|
IXDocReport |
loadReport(InputStream sourceStream,
String reportId,
TemplateEngineKind templateEngineKind)
Load report.
|
IXDocReport |
loadReport(InputStream sourceStream,
String reportId,
TemplateEngineKind templateEngineKind,
boolean cacheReport)
Load report.
|
IXDocReport |
loadReport(InputStream sourceStream,
TemplateEngineKind templateEngineKind)
Load report.
|
IXDocReport |
loadReport(InputStream sourceStream,
TemplateEngineKind templateEngineKind,
boolean cacheReport)
Load report.
|
protected boolean |
registerInstance(IXDocReportFactoryDiscovery instance) |
void |
registerReport(IXDocReport report)
Register report and throws XDocReportException if it already exists a report in the registry with the same id .
|
void |
registerReport(IXDocReport report,
boolean force)
Register report.
|
void |
setClearTimeout(long timeout) |
void |
unregisterReport(IXDocReport report)
Unregister report.
|
void |
unregisterReport(String reportId)
Unregister report identified with the given id.
|
dispose, initialize, initializeIfNeeded, onEndInitialization, onStartInitializationprotected ICacheStorage<String,IXDocReport> createCache()
public static XDocReportRegistry getRegistry()
public IXDocReport loadReport(InputStream sourceStream) throws IOException, XDocReportException
sourceStream - reportId - IOExceptionXDocReportExceptionpublic IXDocReport loadReport(InputStream sourceStream, boolean cacheReport) throws IOException, XDocReportException
sourceStream - reportId - IOExceptionXDocReportExceptionpublic IXDocReport loadReport(InputStream sourceStream, String reportId) throws IOException, XDocReportException
sourceStream - reportId - IOExceptionXDocReportExceptionpublic IXDocReport loadReport(InputStream sourceStream, String reportId, boolean cacheReport) throws IOException, XDocReportException
sourceStream - reportId - IOExceptionXDocReportExceptionpublic IXDocReport loadReport(InputStream sourceStream, String reportId, ITemplateEngine templateEngine) throws IOException, XDocReportException
sourceStream - reportId - IOExceptionXDocReportExceptionpublic IXDocReport loadReport(InputStream sourceStream, String reportId, ITemplateEngine templateEngine, boolean cacheReport) throws IOException, XDocReportException
sourceStream - reportId - IOExceptionXDocReportExceptionpublic IXDocReport loadReport(InputStream sourceStream, String reportId, String templateEngineKind) throws IOException, XDocReportException
sourceStream - reportId - IOExceptionXDocReportExceptionpublic IXDocReport loadReport(InputStream sourceStream, String reportId, String templateEngineKind, boolean cacheReport) throws IOException, XDocReportException
sourceStream - reportId - IOExceptionXDocReportExceptionpublic IXDocReport loadReport(InputStream sourceStream, String reportId, TemplateEngineKind templateEngineKind) throws IOException, XDocReportException
sourceStream - reportId - IOExceptionXDocReportExceptionpublic IXDocReport loadReport(InputStream sourceStream, String reportId, TemplateEngineKind templateEngineKind, boolean cacheReport) throws IOException, XDocReportException
sourceStream - reportId - IOExceptionXDocReportExceptionpublic IXDocReport loadReport(InputStream sourceStream, ITemplateEngine templateEngine) throws IOException, XDocReportException
sourceStream - templateEngine - IOExceptionXDocReportExceptionpublic IXDocReport loadReport(InputStream sourceStream, ITemplateEngine templateEngine, boolean cacheReport) throws IOException, XDocReportException
sourceStream - templateEngine - IOExceptionXDocReportExceptionpublic IXDocReport loadReport(InputStream sourceStream, TemplateEngineKind templateEngineKind) throws IOException, XDocReportException
sourceStream - templateEngine - IOExceptionXDocReportExceptionpublic IXDocReport loadReport(InputStream sourceStream, TemplateEngineKind templateEngineKind, boolean cacheReport) throws IOException, XDocReportException
sourceStream - templateEngine - IOExceptionXDocReportExceptionpublic IXDocReport createReport(InputStream sourceStream) throws IOException, XDocReportException
IOExceptionXDocReportExceptionpublic IXDocReport createReport(XDocArchive documentArchive) throws IOException, XDocReportException
IOExceptionXDocReportExceptionpublic void registerReport(IXDocReport report) throws XDocReportException
report - XDocReportExceptionpublic void registerReport(IXDocReport report, boolean force) throws XDocReportException
report - the report to registerforce - true if report must be forced (if report already exists with the same id) and false otherwise (throw
XDocReportException if report exists with the same id).XDocReportExceptionpublic void checkReportId(String reportId) throws XDocReportException
reportId - XDocReportExceptionpublic IXDocReport getReport(String reportId)
reportId - public boolean existsReport(String reportId)
existsReport in interface ITemplateCacheInfoProviderid - public void unregisterReport(String reportId)
reportId - public void unregisterReport(IXDocReport report)
report - public Collection<IXDocReportFactoryDiscovery> getReportFactoryDiscoveries()
public Collection<IXDocReport> getCachedReports()
IXDocReport;public void setClearTimeout(long timeout)
public void clear()
public MimeMapping getMimeMapping(String fileExtension) throws IOException, XDocReportException
fileExtension - IOExceptionXDocReportExceptionpublic String generateUniqueReportId(String reportId)
reportId - public IEntryInfo getTemplateCacheInfo(String reportId, String entryName)
getTemplateCacheInfo in interface ITemplateCacheInfoProviderprotected void doDispose()
doDispose in class AbstractRegistry<IXDocReportFactoryDiscovery>protected boolean registerInstance(IXDocReportFactoryDiscovery instance)
registerInstance in class AbstractRegistry<IXDocReportFactoryDiscovery>Copyright © 2015. All Rights Reserved.