Package org.alfresco.repo.web.scripts
Class RepoClassPathStore
- java.lang.Object
-
- org.springframework.extensions.webscripts.AbstractStore
-
- org.springframework.extensions.webscripts.ClassPathStore
-
- org.alfresco.repo.web.scripts.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
-
-
Constructor Summary
Constructors Constructor Description RepoClassPathStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description freemarker.cache.TemplateLoader
getTemplateLoader()
long
lastModified(java.lang.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
-
-
-
-
Method Detail
-
getTemplateLoader
public freemarker.cache.TemplateLoader getTemplateLoader()
- Specified by:
getTemplateLoader
in interfaceorg.springframework.extensions.webscripts.Store
- Overrides:
getTemplateLoader
in classorg.springframework.extensions.webscripts.ClassPathStore
-
lastModified
public long lastModified(java.lang.String documentPath) throws java.io.IOException
- Specified by:
lastModified
in interfaceorg.springframework.extensions.webscripts.Store
- Overrides:
lastModified
in classorg.springframework.extensions.webscripts.ClassPathStore
- Throws:
java.io.IOException
-
-