Package io.jmix.reports.impl
Class ReportExecutionHistoryRecorderImpl
java.lang.Object
io.jmix.reports.impl.ReportExecutionHistoryRecorderImpl
- All Implemented Interfaces:
 ReportExecutionHistoryRecorder
@Component("report_ExecutionHistoryRecorder")
public class ReportExecutionHistoryRecorderImpl
extends Object
implements ReportExecutionHistoryRecorder
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CurrentAuthenticationprotected DataManagerprotected jakarta.persistence.EntityManagerprotected EntityStatesprotected FileStorageprotected FileStorageLocatorprotected Metadataprotected ReportsPropertiesprotected SystemAuthenticatorprotected TimeSourceprotected org.springframework.transaction.support.TransactionTemplate - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionShould be invoked as scheduled task.protected FileStorageprotected voidhandleSessionExpired(Runnable action) It is not rare for large reports to execute for a long time.voidmarkAsCancelled(ReportExecution execution) voidmarkAsError(ReportExecution execution, Exception e) voidmarkAsSuccess(ReportExecution execution, ReportOutputDocument document) protected FileRefsaveDocument(ReportOutputDocument document) protected voidsetParametersString(ReportExecution reportExecution, Map<String, Object> params) protected booleanshouldSaveDocument(ReportExecution execution, ReportOutputDocument document) startExecution(Report report, Map<String, Object> params)  
- 
Field Details
- 
metadata
 - 
dataManager
 - 
currentAuthentication
 - 
timeSource
 - 
reportsProperties
 - 
transaction
@Autowired protected org.springframework.transaction.support.TransactionTemplate transaction - 
entityManager
protected jakarta.persistence.EntityManager entityManager - 
fileStorageLocator
 - 
entityStates
 - 
systemAuthenticator
 - 
fileStorage
 
 - 
 - 
Constructor Details
- 
ReportExecutionHistoryRecorderImpl
public ReportExecutionHistoryRecorderImpl() 
 - 
 - 
Method Details
- 
startExecution
- Specified by:
 startExecutionin interfaceReportExecutionHistoryRecorder
 - 
markAsSuccess
- Specified by:
 markAsSuccessin interfaceReportExecutionHistoryRecorder
 - 
markAsCancelled
- Specified by:
 markAsCancelledin interfaceReportExecutionHistoryRecorder
 - 
markAsError
- Specified by:
 markAsErrorin interfaceReportExecutionHistoryRecorder
 - 
setParametersString
 - 
shouldSaveDocument
 - 
saveDocument
- Throws:
 FileStorageException
 - 
handleSessionExpired
It is not rare for large reports to execute for a long time. In this case when report is finished - user session is already expired and can't be used to make changes to database.- Parameters:
 action- action for the execution
 - 
cleanupHistory
Description copied from interface:ReportExecutionHistoryRecorderShould be invoked as scheduled task.- Specified by:
 cleanupHistoryin interfaceReportExecutionHistoryRecorder- Returns:
 - count of deleted 
ReportExecutionentities 
 - 
getFileStorage
 
 -