Class DefaultJasperReportCacheService
- java.lang.Object
-
- de.hybris.platform.cockpit.reports.impl.DefaultJasperReportCacheService
-
- All Implemented Interfaces:
JasperReportCacheService
public class DefaultJasperReportCacheService extends java.lang.Object implements JasperReportCacheService
Default implementation forJasperReportCacheService
-
-
Constructor Summary
Constructors Constructor Description DefaultJasperReportCacheService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description net.sf.jasperreports.engine.JasperReport
getCompiledReport(JasperWidgetPreferencesModel widget)
Returns cached report.org.zkoss.image.AImage
getImageForJasperWidgetPreferences(JasperWidgetPreferencesModel widget)
Returns cached image for widget.void
invalidateAll()
Clears cacheboolean
remove(JasperWidgetPreferencesModel widget)
Removes widget from cache.void
setJasperMediaService(JasperMediaService jasperMediaService)
void
setJasperReportCompileService(JasperReportCompileService jasperReportCompileService)
void
setJasperReportExportService(JasperReportExportService jasperReportExportService)
void
setJasperReportFillService(JasperReportFillService jasperReportFillService)
boolean
update(JasperWidgetPreferencesModel widget)
Updates cached report for specific widget.
-
-
-
Method Detail
-
getCompiledReport
public net.sf.jasperreports.engine.JasperReport getCompiledReport(JasperWidgetPreferencesModel widget)
Returns cached report. If no report is in the cache, the implementing class must create one, add it to the cache and return it.- Specified by:
getCompiledReport
in interfaceJasperReportCacheService
- Parameters:
widget
- for which report is cached.
-
remove
public boolean remove(JasperWidgetPreferencesModel widget)
Removes widget from cache.- Specified by:
remove
in interfaceJasperReportCacheService
- Parameters:
widget
- to be removed from cache- Returns:
- true if widget has been removed, false otherwise
-
getImageForJasperWidgetPreferences
public org.zkoss.image.AImage getImageForJasperWidgetPreferences(JasperWidgetPreferencesModel widget) throws JasperWidgetException
Returns cached image for widget. If no image is in the cache, the implementing class must create one, add it to the cache and return it.- Specified by:
getImageForJasperWidgetPreferences
in interfaceJasperReportCacheService
- Parameters:
widget
- for which image is cached- Throws:
JasperWidgetException
- when problem with export report to image occurred
-
update
public boolean update(JasperWidgetPreferencesModel widget)
Updates cached report for specific widget.- Specified by:
update
in interfaceJasperReportCacheService
- Parameters:
widget
- to be updated
-
invalidateAll
public void invalidateAll()
Clears cache- Specified by:
invalidateAll
in interfaceJasperReportCacheService
-
setJasperMediaService
public void setJasperMediaService(JasperMediaService jasperMediaService)
- Parameters:
jasperMediaService
- the jasperMediaService to set
-
setJasperReportCompileService
public void setJasperReportCompileService(JasperReportCompileService jasperReportCompileService)
- Parameters:
jasperReportCompileService
- the jasperReportCompileService to set
-
setJasperReportFillService
public void setJasperReportFillService(JasperReportFillService jasperReportFillService)
- Parameters:
jasperReportFillService
- the jasperReportFillService to set
-
setJasperReportExportService
public void setJasperReportExportService(JasperReportExportService jasperReportExportService)
- Parameters:
jasperReportExportService
- the jasperReportExportService to set
-
-