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
Fields Modifier and Type Field Description static String
INLINE
The Constant INLINE.static String[]
RENDER_MODES
The Constant RENDER_MODES.static String
RESOURCE_PATH
The /cache/ resource path prefix.static String
SEPARATE
The Constant SEPARATE.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getAlwaysUse34RenderingMode()
Return the always used Composer 3.4 rendering mode flag.Long
getBrowserResourceCachePeriod()
Return the browser resource caching period in seconds.Double
getComposerFormVersion(HttpServletRequest request, Form form, TemplateVersion templateVersion)
Return the Composer Form version as major.minor version, e.g.Boolean
getCompressContent()
Return true if the service will GZIP compress the HTML content.String
getCssRenderMode()
Gets the CSS render mode.String
getImgRenderMode()
Gets the IMG render mode.String
getJsRenderMode()
Gets the JS render mode.String
getRenderFormTemplateType(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, HttpServletRequest request, HttpServletResponse response, String targetUrl, RequestLog requestLog)
Render the Form using the given form, template version and XML data to the response.boolean
renderResource(HttpServletRequest request, 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 Detail
-
RESOURCE_PATH
static final String RESOURCE_PATH
The /cache/ resource path prefix.- See Also:
- Constant Field Values
-
INLINE
static final String INLINE
The Constant INLINE.- See Also:
- Constant Field Values
-
SEPARATE
static final String SEPARATE
The Constant SEPARATE.- See Also:
- Constant Field Values
-
RENDER_MODES
static final String[] RENDER_MODES
The Constant RENDER_MODES.
-
-
Method Detail
-
renderForm
void renderForm(TemplateVersion templateVersion, Form form, String xmlData, HttpServletRequest request, 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
-
renderResource
boolean renderResource(HttpServletRequest request, 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(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(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
void setBrowserResourceCachePeriod(Long period)
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
void setCompressContent(Boolean compress)
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
void setJsRenderMode(String jsRenderMode)
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
void setCssRenderMode(String cssRenderMode)
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
void setImgRenderMode(String imgRenderMode)
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
void setAlwaysUse34RenderingMode(String allwaysUse34RenderingMode)
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.
-
-