Package org.alfresco.repo.web.scripts
Class RepositoryTemplateProcessor
java.lang.Object
org.alfresco.repo.processor.BaseProcessor
org.alfresco.repo.template.FreeMarkerProcessor
org.alfresco.repo.web.scripts.RepositoryTemplateProcessor
- All Implemented Interfaces:
EventListener,org.alfresco.processor.Processor,TemplateProcessor,TemplateValueConverter,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener,org.springframework.extensions.webscripts.TemplateProcessor
public class RepositoryTemplateProcessor
extends FreeMarkerProcessor
implements org.springframework.extensions.webscripts.TemplateProcessor, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener
Repository (server-tier) Web Script Template Processor
- Author:
- davidc
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected FreeMarkerProcessorprotected org.springframework.extensions.webscripts.SearchPathprotected freemarker.template.ConfigurationFields inherited from class org.alfresco.repo.processor.BaseProcessor
extension, name, processorExtensions, scriptService, services, templateService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected freemarker.template.ConfigurationbooleanhasTemplate(String templatePath) protected voidInitialise FreeMarker ConfigurationvoidonApplicationEvent(org.springframework.context.ApplicationEvent event) voidreset()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetCacheSize(int cacheSize) Deprecated.voidsetDefaultEncoding(String defaultEncoding) voidsetFreeMarkerProcessor(FreeMarkerProcessor freeMarkerProcessor) Set the freemarker processorvoidsetSearchPath(org.springframework.extensions.webscripts.SearchPath searchPath) voidsetUpdateDelay(int updateDelay) Methods inherited from class org.alfresco.repo.template.FreeMarkerProcessor
convertValue, getStringConfig, process, process, processString, setLocalizedLookupMethods inherited from class org.alfresco.repo.processor.BaseProcessor
getExtension, getName, getProcessorExtensions, register, registerProcessorExtension, setExtension, setName, setScriptService, setServiceRegistry, setTemplateServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecutionMethods inherited from interface org.alfresco.processor.Processor
getExtension, getName, registerProcessorExtensionMethods inherited from interface org.springframework.extensions.webscripts.TemplateProcessor
process, processString
-
Field Details
-
searchPath
protected org.springframework.extensions.webscripts.SearchPath searchPath -
defaultEncoding
-
templateConfig
protected freemarker.template.Configuration templateConfig -
freeMarkerProcessor
-
-
Constructor Details
-
RepositoryTemplateProcessor
public RepositoryTemplateProcessor()
-
-
Method Details
-
setDefaultEncoding
- Overrides:
setDefaultEncodingin classFreeMarkerProcessor
-
getDefaultEncoding
- Specified by:
getDefaultEncodingin interfaceorg.springframework.extensions.webscripts.TemplateProcessor
-
setUpdateDelay
public void setUpdateDelay(int updateDelay) - Parameters:
updateDelay- the time in seconds between checks on the modified date for cached templates
-
setCacheSize
Deprecated.- Parameters:
cacheSize- not used anymore
-
setSearchPath
public void setSearchPath(org.springframework.extensions.webscripts.SearchPath searchPath) - Parameters:
searchPath- SearchPath
-
setFreeMarkerProcessor
Set the freemarker processor- Parameters:
freeMarkerProcessor- the free marker processor
-
getConfig
protected freemarker.template.Configuration getConfig()- Overrides:
getConfigin classFreeMarkerProcessor
-
reset
public void reset()- Specified by:
resetin interfaceorg.springframework.extensions.webscripts.TemplateProcessor
-
hasTemplate
- Specified by:
hasTemplatein interfaceorg.springframework.extensions.webscripts.TemplateProcessor
-
initConfig
protected void initConfig()Initialise FreeMarker Configuration -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener
-