Class RepoClassPathStore

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.extensions.webscripts.Store

    public class RepoClassPathStore
    extends org.springframework.extensions.webscripts.ClassPathStore
    Extension of the SpringSurf ClassPathStore to ensure that the examination of last modified dates on classpath bound resources does not cause a performance degredation in REST heavy client applications.

    In the repository, due to the possibility of Repository bound resources, all WebScript search path lists have the "delay" set to either zero seconds (no delay) or something close to that. This means that the FreeMarker template cache is always or often requesting the last modified date of a classpath resource - and the resources do not change. Note that the /extension classpath store still uses the original ClassPathStore. Otherwise all stores can be refreshed as usual via the Refresh WebScripts command.

    Author:
    Kevin Roast
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.ClassPathStore

        org.springframework.extensions.webscripts.ClassPathStore.ClassPathTemplateSource
    • Field Summary

      • Fields inherited from class org.springframework.extensions.webscripts.ClassPathStore

        applicationContext, classPath, exists, mustExist, resolver, storeDirs, VFSFILE_URL_PREFIX, VFSJAR_URL_SEPARATOR, VFSWAR_CLASSES_URL_SEPARATOR, VFSWAR_URL_SEPARATOR, VFSZIP_URL_PREFIX
      • Fields inherited from class org.springframework.extensions.webscripts.AbstractStore

        DESC_PATH_PATTERN
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      freemarker.cache.TemplateLoader getTemplateLoader()  
      long lastModified​(String documentPath)  
      • Methods inherited from class org.springframework.extensions.webscripts.ClassPathStore

        createDocument, createPath, exists, extractJarFileURL, getAllDocumentPaths, getBasePath, getDescriptionDocumentPaths, getDocument, getDocumentPaths, getScriptDocumentPaths, getScriptLoader, hasDocument, init, isJarURL, isReadOnly, isSecure, removeDocument, setApplicationContext, setClassPath, setMustExist, toString, updateDocument
      • Methods inherited from class org.springframework.extensions.webscripts.AbstractStore

        createDocuments, getDocumentPaths, getPreviewContext, setPreviewContextProvider, setReadOnly
      • Methods inherited from interface org.springframework.extensions.webscripts.Store

        createDocuments, getDocumentPaths
    • Constructor Detail

      • RepoClassPathStore

        public RepoClassPathStore()
    • Method Detail

      • getTemplateLoader

        public freemarker.cache.TemplateLoader getTemplateLoader()
        Specified by:
        getTemplateLoader in interface org.springframework.extensions.webscripts.Store
        Overrides:
        getTemplateLoader in class org.springframework.extensions.webscripts.ClassPathStore
      • lastModified

        public long lastModified​(String documentPath)
                          throws IOException
        Specified by:
        lastModified in interface org.springframework.extensions.webscripts.Store
        Overrides:
        lastModified in class org.springframework.extensions.webscripts.ClassPathStore
        Throws:
        IOException