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 voidThis method may be called when the content generation is aborted due to some error.default voidexecute()The functional interface method specified by this interface.default InputStreamdefault Entitydefault ThrowablegetError()Get the current error (set viaabort(Throwable)).default StreamDatadefault StreamDataProviderdefault SystemEntitydefault TransactionManagerRetrieves the transaction manager associated with this object.voidproduce()Produce the content.default voidready()default FileDatasaveTo(FileData fileData, Transaction transaction) default FileDatasaveTo(FileData fileData, TransactionManager tm) default FileDatasaveTo(String folderPath, Transaction transaction) default FileDatasaveTo(String folderPath, TransactionManager tm) Methods inherited from interface com.storedobject.core.ContentType
getContentType, getLink, getMimeType, isAudio, isHTML, isImage, isLink, isMedia, isPDF, isText, isVideoMethods inherited from interface com.storedobject.common.Executable
act, runMethods 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:RequiresTransactionManagerRetrieves the transaction manager associated with this object.- Specified by:
getTransactionManagerin 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:ExecutableThe functional interface method specified by this interface.- Specified by:
executein 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.
-