Package com.avoka.fc.core.service
Class LocalProcessRenderReceiptService
java.lang.Object
com.avoka.fc.core.service.BaseService
com.avoka.fc.core.service.CayenneService
com.avoka.fc.core.service.AbstractRenderReceiptService
com.avoka.fc.core.service.LocalProcessRenderReceiptService
- All Implemented Interfaces:
IRenderReceiptService,IServiceDefinitionAware
- Direct Known Subclasses:
PhantomJSRenderReceiptServiceV2,PuppeteerRenderReceiptService
Provides a receipt render service executing a local executable (
omJS, Chromium Puppeteer)
- Since:
- 19.5.0
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class com.avoka.fc.core.service.AbstractRenderReceiptService
CONTENT_TYPE_PDF -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendContextDebugInfo(StringBuilder context, String htmlFilePath, LocalProcessRenderReceiptService.ProcessParams params, Submission submission) Set the fallback timeout in milliseconds.protected abstract Semaphoreprotected DataDocumentgetReceiptDocument(Submission submission, jakarta.servlet.http.HttpServletRequest request, RequestLog requestLog, String receiptMode) Return the PDF Receipt DataDocument for the submission, request and requestLog.Return the system default JSON string containing the receipt properties.protected abstract Stringprotected abstract booleanprotected abstract LocalProcessRenderReceiptService.ProcessParamspopulateProcessParams(LocalProcessRenderReceiptService.ProcessParams params, String workDir) protected voidrasterize(LocalProcessRenderReceiptService.ProcessParams params, Submission submission) booleanReturns false as this service does not require LiveCycle.voidsetFallbackTimeout(Integer value) Set the fallback timeout in milliseconds.voidsetReceiptPropertiesJson(String value) Set the JSON string containing the receipt properties.Methods inherited from class com.avoka.fc.core.service.AbstractRenderReceiptService
getMaxProcesses, getServiceDefinition, renderReceipt, renderReceipt, setMaxProcesses, setServiceDefinition, setTestMode, updateReceiptMode, updateReceiptModeMethods inherited from class com.avoka.fc.core.service.CayenneService
commitChanges, deleteObject, deleteObjects, findObject, getDataContext, getDataDomain, getObjectForPK, getObjectStore, newObject, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, refetchEntity, refetchObject, registerNewObject, rollbackChanges, toMap, toMapMethods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
Field Details
-
fallbackTimeout
-
subfolder
-
receiptPropertiesJson
-
-
Constructor Details
-
LocalProcessRenderReceiptService
public LocalProcessRenderReceiptService()
-
-
Method Details
-
requiresLiveCycle
public boolean requiresLiveCycle()Returns false as this service does not require LiveCycle.- Returns:
- false
- See Also:
-
getFallbackTimeout
Set the fallback timeout in milliseconds. After this time, the receipt rendering process is terminated by TM.- Returns:
- the fallback process timeout in milliseconds.
-
setFallbackTimeout
Set the fallback timeout in milliseconds. After this time, the receipt rendering process is terminated by TM.- Parameters:
value- the fallback process timeout in milliseconds.
-
getReceiptPropertiesJson
Return the system default JSON string containing the receipt properties. This can be overridden on the organization and form version level.- Returns:
- the JSON properties
-
setReceiptPropertiesJson
Set the JSON string containing the receipt properties.- Parameters:
value- the JSON properties
-
isDeleteFiles
protected abstract boolean isDeleteFiles() -
getMaxProcessesSemphore
-
getReceiptSubdirectory
-
populateProcessParams
protected abstract LocalProcessRenderReceiptService.ProcessParams populateProcessParams(LocalProcessRenderReceiptService.ProcessParams params, String workDir) -
getReceiptDocument
protected DataDocument getReceiptDocument(Submission submission, jakarta.servlet.http.HttpServletRequest request, RequestLog requestLog, String receiptMode) throws ApplicationException Description copied from class:AbstractRenderReceiptServiceReturn the PDF Receipt DataDocument for the submission, request and requestLog.- Specified by:
getReceiptDocumentin classAbstractRenderReceiptService- Parameters:
submission- the form submissionrequest- the servlet requestrequestLog- the request logreceiptMode- receipt mode in [ Web | Email | Delivery ]- Returns:
- the PDF Receipt DataDocument for the submission, request and requestLog
- Throws:
ApplicationException
-
rasterize
protected void rasterize(LocalProcessRenderReceiptService.ProcessParams params, Submission submission) throws TimeoutException, IOException - Throws:
TimeoutExceptionIOException
-
appendContextDebugInfo
protected void appendContextDebugInfo(StringBuilder context, String htmlFilePath, LocalProcessRenderReceiptService.ProcessParams params, Submission submission)
-