Package com.storedobject.core
Interface ContentProducer
- All Superinterfaces:
ContentType
,Executable
,RequiresTransactionManager
,Runnable
- All Known Implementing Classes:
AbstractSpreadSheet
,AccountStatement
,CombinedPDFReport
,Content
,CSVReport
,DataDownload
,Excel
,ExcelReport
,FileCirculationStatus
,FileExpiryReport
,ImageProducer
,ItemMovementReport
,IteratorODTReport
,JournalReport
,ObjectGridReport
,ObjectList
,ObjectListExcel
,ODS
,ODSReport
,ODT
,ODTObjectReport
,ODTReport
,PDF
,PDFContent
,PDFObjectReport
,PDFReport
,StockAvailability
,StockMovementReport
,StockReport
,StockReportExcel
,StreamContentProducer
,StreamDataContent
,SVGContentGenerator
,TextContentProducer
,TextReport
,TrialBalance
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
This method may be called when the content generation is aborted due to some error.default void
execute()
The functional interface method specified by this interface.default InputStream
default Entity
default Throwable
getError()
Get the current error (set viaabort(Throwable)
).default StreamData
default StreamDataProvider
default SystemEntity
default TransactionManager
Retrieves the transaction manager associated with this object.void
produce()
Produce the content.default void
ready()
default FileData
saveTo
(FileData fileData, Transaction transaction) default FileData
saveTo
(FileData fileData, TransactionManager tm) default FileData
saveTo
(String folderPath, Transaction transaction) default FileData
saveTo
(String folderPath, TransactionManager tm) Methods inherited from interface com.storedobject.core.ContentType
getContentType, getLink, getMimeType, isAudio, isHTML, isImage, isLink, isMedia, isPDF, isText, isVideo
Methods inherited from interface com.storedobject.common.Executable
act, run
Methods inherited from interface com.storedobject.core.RequiresTransactionManager
setTransactionManager
-
Method Details
-
produce
void produce()Produce the content. -
getContent
- Throws:
Exception
-
getFileExtension
String getFileExtension() -
getFileName
String getFileName() -
ready
default void ready() -
getTransactionManager
Description copied from interface:RequiresTransactionManager
Retrieves the transaction manager associated with this object.- Specified by:
getTransactionManager
in interfaceRequiresTransactionManager
- Returns:
- the transaction manager responsible for managing transaction boundaries
-
getSystemEntity
-
getEntity
-
extractContent
- Throws:
Exception
-
getStreamDataProvider
-
getStreamData
-
execute
default void execute()Description copied from interface:Executable
The functional interface method specified by this interface.- Specified by:
execute
in interfaceExecutable
-
saveTo
- Throws:
Exception
-
saveTo
- Throws:
Exception
-
saveTo
- Throws:
Exception
-
saveTo
- Throws:
Exception
-
abort
This method may be called when the content generation is aborted due to some error.Note: This could be invoked multiple times.
- Parameters:
error
- Error.
-
getError
Get the current error (set viaabort(Throwable)
).- Returns:
- Current error if any.
-