Package com.avoka.fc.core.service.impl
Class GroovyRenderReceiptService
java.lang.Object
com.avoka.fc.core.service.BaseService
com.avoka.fc.core.service.AbstractGroovyService
com.avoka.fc.core.service.impl.GroovyRenderReceiptService
- All Implemented Interfaces:
IRenderReceiptDocument
,IRenderReceiptService
,IServiceDefinitionAware
,IUnitTestableService
public class GroovyRenderReceiptService
extends AbstractGroovyService
implements IRenderReceiptService, IServiceDefinitionAware, IRenderReceiptDocument
Provides a Groovy Script Render Receipt Service for generating customized PDF receipt documents.
- Since:
- 4.3.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetReceiptDocument
(Submission submission, jakarta.servlet.http.HttpServletRequest request, RequestLog requestLog, String receiptMode) Return the PDF Receipt DataDocument for the submission, request and requestLog.void
renderReceipt
(Submission submission, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, RequestLog requestLog) Render the PDF Receipt given the submission.byte[]
renderReceipt
(Submission submission, String mode) Return a PDF Receipt byte array rendered from the submission.boolean
Return true if the service requires Adobe LiveCycle.void
setMaxProcesses
(Integer value) This method does nothing.void
setTestMode
(boolean testMode) This method does nothing.Methods inherited from class com.avoka.fc.core.service.AbstractGroovyService
createExceptionAndLog, executeGroovyScript, executeGroovyScript, getCause, getExecutionTimeout, getGroovyScript, getGroovyServiceLog, getServiceDefinition, getServiceName, getServiceNameAndVersion, getServiceTimeout, getTestLogOutput, isExceptionDebugLoggingEnabled, isGroovyDebugLogging, isGroovyLoggingEnabled, isGroovyTypeChecked, runUnitTest, setExceptionDebugLoggingEnabled, setExecutionTimeout, setGroovyDebugLogging, setGroovyLoggingEnabled, setGroovyScript, setGroovyTypeChecked, setServiceDefinition, setUseModuleClassLoader
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.avoka.fc.core.service.IServiceDefinitionAware
getServiceDefinition, setServiceDefinition
-
Constructor Details
-
GroovyRenderReceiptService
public GroovyRenderReceiptService()
-
-
Method Details
-
getErrorType
- Specified by:
getErrorType
in classAbstractGroovyService
- Returns:
- the service error type to be used to classify the error logging records
- Since:
- 4.3.4
-
renderReceipt
public void renderReceipt(Submission submission, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, RequestLog requestLog) throws ApplicationException Render the PDF Receipt given the submission.- Specified by:
renderReceipt
in interfaceIRenderReceiptService
- Parameters:
submission
- the submission (required)request
- - the users Http servlet requestresponse
- - the Http servlet response to render torequestLog
- - the request log parameter- Throws:
ApplicationException
- if an error occurs at runtime- See Also:
-
renderReceipt
Return a PDF Receipt byte array rendered from the submission.- Specified by:
renderReceipt
in interfaceIRenderReceiptService
- Parameters:
submission
- the submission (required)mode
- the render receipt modeRequestLog.RECEIPT_MODES
- Returns:
- the receipt data in PDF
- Throws:
ApplicationException
- if an error occurs at runtime- See Also:
-
getReceiptDocument
public DataDocument getReceiptDocument(Submission submission, jakarta.servlet.http.HttpServletRequest request, RequestLog requestLog, String receiptMode) Return the PDF Receipt DataDocument for the submission, request and requestLog.- Specified by:
getReceiptDocument
in interfaceIRenderReceiptDocument
- Parameters:
submission
- the form submission (required)request
- the servlet requestrequestLog
- the request logreceiptMode
- receipt mode in- Returns:
- the PDF Receipt DataDocument for the submission, request and requestLog
- See Also:
-
requiresLiveCycle
public boolean requiresLiveCycle()Description copied from interface:IRenderReceiptService
Return true if the service requires Adobe LiveCycle.- Specified by:
requiresLiveCycle
in interfaceIRenderReceiptService
- Returns:
- true
- See Also:
-
setTestMode
public void setTestMode(boolean testMode) This method does nothing.- Specified by:
setTestMode
in interfaceIRenderReceiptService
- Parameters:
testMode
- Specify whether running in test mode an render receipt changes should not be committed to database- See Also:
-
setMaxProcesses
This method does nothing.- Specified by:
setMaxProcesses
in interfaceIRenderReceiptService
- Parameters:
value
- the maximum number of concurrent processes- Since:
- 5.0.3
- See Also:
-