Package com.avoka.fc.core.service
Interface IComposerHtmlFormRenderService
- All Known Implementing Classes:
ComposerHtmlFormRenderService
,JsAppComposerRenderAdapter
public interface IComposerHtmlFormRenderService
Provides a Composer HTML Form rendering service interface to render both the form and the associated HTML resources.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn the always used Composer 3.4 rendering mode flag.Return the browser resource caching period in seconds.getComposerFormVersion
(jakarta.servlet.http.HttpServletRequest request, Form form, TemplateVersion templateVersion) Return the Composer Form version as major.minor version, e.g.Return true if the service will GZIP compress the HTML content.Gets the CSS render mode.Gets the IMG render mode.Gets the JS render mode.getRenderFormTemplateType
(jakarta.servlet.http.HttpServletRequest request, Form form, TemplateVersion templateVersion) Return the form template type [ 'desktop' | 'tablet' | 'phone' ] which will be rendered to the given request.void
renderForm
(TemplateVersion templateVersion, Form form, String xmlData, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String targetUrl, RequestLog requestLog) Render the Form using the given form, template version and XML data to the response.void
renderForm
(TemplateVersion templateVersion, Form form, String xmlData, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String targetUrl, RequestLog requestLog, Submission submission) Render the Form using the given form, template version and XML data to the response.boolean
renderResource
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Render the Form static resource to the given response.void
setAlwaysUse34RenderingMode
(String allwaysUse34RenderingMode) Sets always used Composer 3.4 rendering mode flag.void
setBrowserResourceCachePeriod
(Long period) Set the browser resource caching period in seconds.void
setCompressContent
(Boolean compress) Set whether to GZIP compress the HTML content.void
setCssRenderMode
(String cssRenderMode) Sets the CSS render mode.void
setImgRenderMode
(String imgRenderMode) Sets the IMG render mode.void
setJsRenderMode
(String jsRenderMode) Sets the JS render mode.void
setReceiptRenderMode
(boolean receiptMode) Set whether in headless receipt render mode.
-
Field Details
-
RESOURCE_PATH
The /cache/ resource path prefix.- See Also:
-
INLINE
The Constant INLINE.- See Also:
-
SEPARATE
The Constant SEPARATE.- See Also:
-
RENDER_MODES
The Constant RENDER_MODES.
-
-
Method Details
-
renderForm
void renderForm(TemplateVersion templateVersion, Form form, String xmlData, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String targetUrl, RequestLog requestLog) throws ApplicationException Render the Form using the given form, template version and XML data to the response.- Parameters:
templateVersion
- the form template version to renderform
- the form to renderxmlData
- the XML form data seed documentrequest
- the users Http servlet requestresponse
- the Http servlet response to render totargetUrl
- the target URL of the submission servletrequestLog
- optional request log parameter- Throws:
ApplicationException
- if an error occurs at runtime
-
renderForm
void renderForm(TemplateVersion templateVersion, Form form, String xmlData, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String targetUrl, RequestLog requestLog, Submission submission) throws ApplicationException Render the Form using the given form, template version and XML data to the response.- Parameters:
templateVersion
- the form template version to renderform
- the form to renderxmlData
- the XML form data seed documentrequest
- the users Http servlet requestresponse
- the Http servlet response to render totargetUrl
- the target URL of the submission servletrequestLog
- optional request log parametersubmission
- submission object- Throws:
ApplicationException
- if an error occurs at runtime- Since:
- 23.10.0
-
renderResource
boolean renderResource(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException Render the Form static resource to the given response.- Parameters:
request
- the users Http servlet requestresponse
- the Http servlet response to render to- Returns:
- true, if successful
- Throws:
IOException
- if an error occurs rendering the resource
-
getRenderFormTemplateType
String getRenderFormTemplateType(jakarta.servlet.http.HttpServletRequest request, Form form, TemplateVersion templateVersion) Return the form template type [ 'desktop' | 'tablet' | 'phone' ] which will be rendered to the given request.- Parameters:
request
- the form requestform
- the formtemplateVersion
- the form template version- Returns:
- the form template type [ 'desktop' | 'tablet' | 'phone' ]
-
getComposerFormVersion
Double getComposerFormVersion(jakarta.servlet.http.HttpServletRequest request, Form form, TemplateVersion templateVersion) Return the Composer Form version as major.minor version, e.g. 3.4.- Parameters:
request
- the form requestform
- the formtemplateVersion
- the form template version- Returns:
- the Composer Form version as major.minor version, e.g. 3.4.
-
getBrowserResourceCachePeriod
Long getBrowserResourceCachePeriod()Return the browser resource caching period in seconds.- Returns:
- the browser resource caching period in seconds
-
setBrowserResourceCachePeriod
Set the browser resource caching period in seconds.- Parameters:
period
- the browser resource caching period in seconds
-
getCompressContent
Boolean getCompressContent()Return true if the service will GZIP compress the HTML content.- Returns:
- true if the service will GZIP compress the HTML content
-
setCompressContent
Set whether to GZIP compress the HTML content.- Parameters:
compress
- specify whether to GZIP compress the HTML content
-
getJsRenderMode
String getJsRenderMode()Gets the JS render mode.- Returns:
- the JS render mode
-
setJsRenderMode
Sets the JS render mode.- Parameters:
jsRenderMode
- the new JS render mode
-
getCssRenderMode
String getCssRenderMode()Gets the CSS render mode.- Returns:
- the CSS render mode
-
setCssRenderMode
Sets the CSS render mode.- Parameters:
cssRenderMode
- the new CSS render mode
-
getImgRenderMode
String getImgRenderMode()Gets the IMG render mode.- Returns:
- the IMG render mode
-
setImgRenderMode
Sets the IMG render mode.- Parameters:
imgRenderMode
- the new IMG render mode
-
getAlwaysUse34RenderingMode
String getAlwaysUse34RenderingMode()Return the always used Composer 3.4 rendering mode flag.- Returns:
- the use old style rendering
-
setAlwaysUse34RenderingMode
Sets always used Composer 3.4 rendering mode flag.- Parameters:
allwaysUse34RenderingMode
- the new use old style rendering
-
setReceiptRenderMode
void setReceiptRenderMode(boolean receiptMode) Set whether in headless receipt render mode.- Parameters:
receiptMode
- set whether in headless receipt render mode.
-