org.alfresco.repo.web.scripts
Class RepoClassPathStore

java.lang.Object
  extended by org.springframework.extensions.webscripts.AbstractStore
      extended by org.springframework.extensions.webscripts.ClassPathStore
          extended by org.alfresco.repo.web.scripts.RepoClassPathStore
All Implemented Interfaces:
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.


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
 
Constructor Summary
RepoClassPathStore()
           
 
Method Summary
 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
getDocumentPaths, getPreviewContext, setPreviewContextProvider, setReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.extensions.webscripts.Store
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(java.lang.String documentPath)
                  throws java.io.IOException
Specified by:
lastModified in interface org.springframework.extensions.webscripts.Store
Overrides:
lastModified in class org.springframework.extensions.webscripts.ClassPathStore
Throws:
java.io.IOException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.