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 String
protected FreeMarkerProcessor
protected org.springframework.extensions.webscripts.SearchPath
protected freemarker.template.Configuration
Fields inherited from class org.alfresco.repo.processor.BaseProcessor
extension, name, processorExtensions, scriptService, services, templateService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected freemarker.template.Configuration
boolean
hasTemplate
(String templatePath) protected void
Initialise FreeMarker Configurationvoid
onApplicationEvent
(org.springframework.context.ApplicationEvent event) void
reset()
void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setCacheSize
(int cacheSize) Deprecated.void
setDefaultEncoding
(String defaultEncoding) void
setFreeMarkerProcessor
(FreeMarkerProcessor freeMarkerProcessor) Set the freemarker processorvoid
setSearchPath
(org.springframework.extensions.webscripts.SearchPath searchPath) void
setUpdateDelay
(int updateDelay) Methods inherited from class org.alfresco.repo.template.FreeMarkerProcessor
convertValue, getStringConfig, process, process, processString, setLocalizedLookup
Methods inherited from class org.alfresco.repo.processor.BaseProcessor
getExtension, getName, getProcessorExtensions, register, registerProcessorExtension, setExtension, setName, setScriptService, setServiceRegistry, setTemplateService
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.alfresco.processor.Processor
getExtension, getName, registerProcessorExtension
Methods 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:
setDefaultEncoding
in classFreeMarkerProcessor
-
getDefaultEncoding
- Specified by:
getDefaultEncoding
in 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:
getConfig
in classFreeMarkerProcessor
-
reset
public void reset()- Specified by:
reset
in interfaceorg.springframework.extensions.webscripts.TemplateProcessor
-
hasTemplate
- Specified by:
hasTemplate
in 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:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event) - Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener
-