Class FormArchiveCache
- java.lang.Object
-
- com.avoka.fc.core.service.composer.FormArchiveCache
-
public class FormArchiveCache extends Object
Provides a Composer Form Archive in memory cache.
-
-
Constructor Summary
Constructors Constructor Description FormArchiveCache()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static FormArchive
getFormArchive(TemplateVersion templateVersion, Form form, Map properties, String resourcesContext)
Return the cached form archive for the specified form and template version.static FormArchive
getFormArchiveForResourceKey(String resourceKey)
Return the cached form archive for the given form resource key.static String
getResourceContext(Portal portal, Form form, TemplateVersion templateVersion)
Return the resource context.static void
setCacheMaximumSize(int cacheMaximumSize)
Sets the cache maximum size.static void
setCacheTimeOut(int cacheTimeOut)
Deprecated.
-
-
-
Method Detail
-
getResourceContext
public static String getResourceContext(Portal portal, Form form, TemplateVersion templateVersion)
Return the resource context.- Parameters:
portal
- the portalform
- the formtemplateVersion
- the form version- Returns:
- the resource cache key
- Since:
- 17.10.0
-
setCacheTimeOut
public static void setCacheTimeOut(int cacheTimeOut)
Deprecated.This method does nothing.- Parameters:
cacheTimeOut
- the cache timeout in minutes- Since:
- 4.0.1
-
setCacheMaximumSize
public static void setCacheMaximumSize(int cacheMaximumSize)
Sets the cache maximum size.- Parameters:
cacheMaximumSize
- the cache maximum size- Since:
- 4.0.2
-
getFormArchive
public static FormArchive getFormArchive(TemplateVersion templateVersion, Form form, Map properties, String resourcesContext) throws IOException
Return the cached form archive for the specified form and template version.- Parameters:
templateVersion
- the form template versionform
- the formproperties
- the pre-render service parameter propertiesresourcesContext
- the resources context- Returns:
- the cached form archive
- Throws:
IOException
- if an error occurs loading the form archive
-
getFormArchiveForResourceKey
public static FormArchive getFormArchiveForResourceKey(String resourceKey)
Return the cached form archive for the given form resource key.- Parameters:
resourceKey
- the form resource key (form code + / + template version MD5)- Returns:
- the cached form archive
-
-