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
-
Field Summary
Fields inherited from class com.avoka.fc.core.service.AbstractRenderReceiptService
CONTENT_TYPE_PDF
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendContextDebugInfo
(StringBuilder context, String htmlFilePath, LocalProcessRenderReceiptService.ProcessParams params, Submission submission) Set the fallback timeout in milliseconds.protected abstract Semaphore
protected DataDocument
getReceiptDocument
(Submission submission, 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 String
protected abstract boolean
protected abstract LocalProcessRenderReceiptService.ProcessParams
populateProcessParams
(LocalProcessRenderReceiptService.ProcessParams params, String workDir) protected void
rasterize
(LocalProcessRenderReceiptService.ProcessParams params, Submission submission) boolean
Returns false as this service does not require LiveCycle.void
setFallbackTimeout
(Integer value) Set the fallback timeout in milliseconds.void
setReceiptPropertiesJson
(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, updateReceiptMode
Methods 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, toMap
Methods 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, HttpServletRequest request, RequestLog requestLog, String receiptMode) throws ApplicationException Description copied from class:AbstractRenderReceiptService
Return the PDF Receipt DataDocument for the submission, request and requestLog.- Specified by:
getReceiptDocument
in 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:
TimeoutException
IOException
-
appendContextDebugInfo
protected void appendContextDebugInfo(StringBuilder context, String htmlFilePath, LocalProcessRenderReceiptService.ProcessParams params, Submission submission)
-