Package org.alfresco.repo.processor
Class BaseProcessor
java.lang.Object
org.alfresco.repo.processor.BaseProcessor
- All Implemented Interfaces:
org.alfresco.processor.Processor
- Direct Known Subclasses:
FreeMarkerProcessor,RhinoScriptProcessor,XSLTProcessor
Base class of a processor, encapsulates the implementation reguarding the registration of the processor
with the relevant services and the handling of processor extensions.
- Author:
- Roy Wetherall
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe file extension that this processor understandsprotected StringThe name of the processorA map containing all the processor extenstionsprotected ScriptServiceThe script serviceprotected ServiceRegistryThe service registryprotected TemplateServiceThe template service -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the extension that the processor understandsgetName()Get the name of the processorCollection<org.alfresco.processor.ProcessorExtension>Get the collection of processor extensionsvoidregister()Registers this processor with the relevant servicesvoidregisterProcessorExtension(org.alfresco.processor.ProcessorExtension processorExtension) Registers a processor extension with the processorvoidsetExtension(String extension) Sets the extenstion that the processor understandsvoidSets the name of the processorvoidsetScriptService(ScriptService scriptService) Sets the script servicevoidsetServiceRegistry(ServiceRegistry serviceRegistry) Sets the service registryvoidsetTemplateService(TemplateService templateService) Sets the template service
-
Field Details
-
name
The name of the processor -
extension
The file extension that this processor understands -
scriptService
The script service -
templateService
The template service -
services
The service registry -
processorExtensions
A map containing all the processor extenstions
-
-
Constructor Details
-
BaseProcessor
public BaseProcessor()
-
-
Method Details
-
register
public void register()Registers this processor with the relevant services -
setScriptService
Sets the script service- Parameters:
scriptService- the script service
-
setTemplateService
Sets the template service- Parameters:
templateService- the template service
-
setServiceRegistry
Sets the service registry- Parameters:
serviceRegistry- the service registry
-
getName
Get the name of the processor- Specified by:
getNamein interfaceorg.alfresco.processor.Processor- Returns:
- String the name of the processor
-
setName
Sets the name of the processor- Parameters:
name- the name of the processor
-
getExtension
Gets the extension that the processor understands- Specified by:
getExtensionin interfaceorg.alfresco.processor.Processor- Returns:
- String the extension
-
setExtension
Sets the extenstion that the processor understands- Parameters:
extension- the extension
-
registerProcessorExtension
public void registerProcessorExtension(org.alfresco.processor.ProcessorExtension processorExtension) Registers a processor extension with the processor- Specified by:
registerProcessorExtensionin interfaceorg.alfresco.processor.Processor- Parameters:
processorExtension- the processor extension
-
getProcessorExtensions
Get the collection of processor extensions- Returns:
- collection of processor extensions
-