Class FormArchiveCache


  • public class FormArchiveCache
    extends Object
    Provides a Composer Form Archive in memory cache.
    • Constructor Detail

      • FormArchiveCache

        public FormArchiveCache()
    • Method Detail

      • getResourceContext

        public static String getResourceContext​(Portal portal,
                                                Form form,
                                                TemplateVersion templateVersion)
        Return the resource context.
        Parameters:
        portal - the portal
        form - the form
        templateVersion - 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 version
        form - the form
        properties - the pre-render service parameter properties
        resourcesContext - 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