|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.opensagres.xdocreport.core.registry.AbstractRegistry<IXDocReportFactoryDiscovery> fr.opensagres.xdocreport.document.registry.XDocReportRegistry
public class XDocReportRegistry
Registry for loading and cahing IXDocReport
instances.
Constructor Summary | |
---|---|
XDocReportRegistry()
|
Method Summary | |
---|---|
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)
Register the instance in the registry. |
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. |
Methods inherited from class fr.opensagres.xdocreport.core.registry.AbstractRegistry |
---|
dispose, initialize, initializeIfNeeded, onEndInitialization, onStartInitialization |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XDocReportRegistry()
Method Detail |
---|
protected ICacheStorage<String,IXDocReport> createCache()
public static XDocReportRegistry getRegistry()
public IXDocReport loadReport(InputStream sourceStream) throws IOException, XDocReportException
sourceStream
- reportId
-
IOException
XDocReportException
public IXDocReport loadReport(InputStream sourceStream, boolean cacheReport) throws IOException, XDocReportException
sourceStream
- reportId
-
IOException
XDocReportException
public IXDocReport loadReport(InputStream sourceStream, String reportId) throws IOException, XDocReportException
sourceStream
- reportId
-
IOException
XDocReportException
public IXDocReport loadReport(InputStream sourceStream, String reportId, boolean cacheReport) throws IOException, XDocReportException
sourceStream
- reportId
-
IOException
XDocReportException
public IXDocReport loadReport(InputStream sourceStream, String reportId, ITemplateEngine templateEngine) throws IOException, XDocReportException
sourceStream
- reportId
-
IOException
XDocReportException
public IXDocReport loadReport(InputStream sourceStream, String reportId, ITemplateEngine templateEngine, boolean cacheReport) throws IOException, XDocReportException
sourceStream
- reportId
-
IOException
XDocReportException
public IXDocReport loadReport(InputStream sourceStream, String reportId, String templateEngineKind) throws IOException, XDocReportException
sourceStream
- reportId
-
IOException
XDocReportException
public IXDocReport loadReport(InputStream sourceStream, String reportId, String templateEngineKind, boolean cacheReport) throws IOException, XDocReportException
sourceStream
- reportId
-
IOException
XDocReportException
public IXDocReport loadReport(InputStream sourceStream, String reportId, TemplateEngineKind templateEngineKind) throws IOException, XDocReportException
sourceStream
- reportId
-
IOException
XDocReportException
public IXDocReport loadReport(InputStream sourceStream, String reportId, TemplateEngineKind templateEngineKind, boolean cacheReport) throws IOException, XDocReportException
sourceStream
- reportId
-
IOException
XDocReportException
public IXDocReport loadReport(InputStream sourceStream, ITemplateEngine templateEngine) throws IOException, XDocReportException
sourceStream
- templateEngine
-
IOException
XDocReportException
public IXDocReport loadReport(InputStream sourceStream, ITemplateEngine templateEngine, boolean cacheReport) throws IOException, XDocReportException
sourceStream
- templateEngine
-
IOException
XDocReportException
public IXDocReport loadReport(InputStream sourceStream, TemplateEngineKind templateEngineKind) throws IOException, XDocReportException
sourceStream
- templateEngine
-
IOException
XDocReportException
public IXDocReport loadReport(InputStream sourceStream, TemplateEngineKind templateEngineKind, boolean cacheReport) throws IOException, XDocReportException
sourceStream
- templateEngine
-
IOException
XDocReportException
public IXDocReport createReport(InputStream sourceStream) throws IOException, XDocReportException
IOException
XDocReportException
public IXDocReport createReport(XDocArchive documentArchive) throws IOException, XDocReportException
IOException
XDocReportException
public void registerReport(IXDocReport report) throws XDocReportException
report
-
XDocReportException
public 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).
XDocReportException
public void checkReportId(String reportId) throws XDocReportException
reportId
-
XDocReportException
public IXDocReport getReport(String reportId)
reportId
-
public boolean existsReport(String reportId)
existsReport
in interface ITemplateCacheInfoProvider
id
-
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
-
IOException
XDocReportException
public String generateUniqueReportId(String reportId)
reportId
-
public IEntryInfo getTemplateCacheInfo(String reportId, String entryName)
getTemplateCacheInfo
in interface ITemplateCacheInfoProvider
protected void doDispose()
doDispose
in class AbstractRegistry<IXDocReportFactoryDiscovery>
protected boolean registerInstance(IXDocReportFactoryDiscovery instance)
AbstractRegistry
registerInstance
in class AbstractRegistry<IXDocReportFactoryDiscovery>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |