Class PhantomJSRenderReceiptService
- 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.phantomjs.PhantomJSRenderReceiptService
-
- All Implemented Interfaces:
IRenderReceiptService
,IServiceDefinitionAware
public class PhantomJSRenderReceiptService extends AbstractRenderReceiptService
Provides an PhantomJS PDF Receipt Rendering service.- Since:
- 4.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_SERVICE_NAME
The default service definition name.-
Fields inherited from class com.avoka.fc.core.service.AbstractRenderReceiptService
CONTENT_TYPE_PDF
-
-
Constructor Summary
Constructors Constructor Description PhantomJSRenderReceiptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLinuxPageZoomFactor()
Return the Linux page zoom factor.String
getPageSizeFormat()
String
getPageSizeMargin()
Integer
getProcessTimeout()
Set the PhantomJS rendering process timeout in milliseconds.protected DataDocument
getReceiptDocument(Submission submission, HttpServletRequest request, RequestLog requestLog, String receiptMode)
Return the PDF Receipt DataDocument for the submission, request and requestLog.boolean
requiresLiveCycle()
Returns false as this service does not require LiveCycle.void
setLinuxPageZoomFactor(String zoomFactor)
Set the Linux page zoom factor.void
setPageSizeFormat(String pageSize)
Set the PhantomJS output page size [ A4 | Letter | Legal ]void
setPageSizeMargin(String pageSizeMargin)
Set the PhantomJS page size margin.void
setPhantomJsExe(String value)
Set the PhantomJS executable filename, without the Windows .exe file extension.void
setProcessTimeout(Integer value)
Set the PhantomJS rendering process timeout in milliseconds.-
Methods inherited from class com.avoka.fc.core.service.AbstractRenderReceiptService
getMaxProcesses, getServiceDefinition, hasSignatureReceiptTemplate, isSignatureReceiptRequest, 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 Detail
-
DEFAULT_SERVICE_NAME
public static final String DEFAULT_SERVICE_NAME
The default service definition name.- See Also:
- Constant Field Values
-
-
Method Detail
-
requiresLiveCycle
public boolean requiresLiveCycle()
Returns false as this service does not require LiveCycle.- Returns:
- false
- See Also:
IRenderReceiptService.requiresLiveCycle()
-
getPageSizeFormat
public String getPageSizeFormat()
- Returns:
- the pageSizeFormat
-
setPageSizeFormat
public void setPageSizeFormat(String pageSize)
Set the PhantomJS output page size [ A4 | Letter | Legal ]- Parameters:
pageSize
- the page size format to set
-
getPageSizeMargin
public String getPageSizeMargin()
- Returns:
- the pageSizeMargin
-
setPageSizeMargin
public void setPageSizeMargin(String pageSizeMargin)
Set the PhantomJS page size margin.- Parameters:
pageSizeMargin
- the pageSizeMargin to set
-
getLinuxPageZoomFactor
public String getLinuxPageZoomFactor()
Return the Linux page zoom factor.- Returns:
- the Linux page zoom factor
- Since:
- 4.2.0
-
setLinuxPageZoomFactor
public void setLinuxPageZoomFactor(String zoomFactor)
Set the Linux page zoom factor.- Parameters:
zoomFactor
- the Linux page zoom factor- Since:
- 4.2.0
-
getProcessTimeout
public Integer getProcessTimeout()
Set the PhantomJS rendering process timeout in milliseconds.- Returns:
- the PhantomJS rendering process timeout in milliseconds.
- Since:
- 4.1.0
-
setProcessTimeout
public void setProcessTimeout(Integer value)
Set the PhantomJS rendering process timeout in milliseconds.- Parameters:
value
- the PhantomJS rendering process timeout in milliseconds.- Since:
- 4.1.0
-
setPhantomJsExe
public void setPhantomJsExe(String value)
Set the PhantomJS executable filename, without the Windows .exe file extension.- Parameters:
value
- the PhantomJS executable file- Since:
- 5.1.1
-
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
-
-