Class SimpleTemplateActionDefinition
java.lang.Object
org.alfresco.repo.action.scheduled.AbstractTemplateActionDefinition
org.alfresco.repo.action.scheduled.SimpleTemplateActionDefinition
- All Implemented Interfaces:
TemplateActionDefinition,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class SimpleTemplateActionDefinition
extends AbstractTemplateActionDefinition
implements org.springframework.context.ApplicationContextAware
This class defines the template used to build a single action.
Because SPEL will eat ${foo} or #{foo} in the template when specified in the XML,
this will also accept \$\{foo\} or \#\{foo\} as well.
- Author:
- Andy Hind
-
Field Summary
Fields inherited from class org.alfresco.repo.action.scheduled.AbstractTemplateActionDefinition
actionService, compensatingTemplateActionDefinition, templateService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerate the action from the template using the context node.Get the name of the action.Get the dictionary service.Get the templates that define the parameters for the action.Get the template model factory.voidsetActionName(String actionName) Set the name of the action.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) ApplciationContextAware - get the application context.voidsetDictionaryService(DictionaryService dictionaryService) Set the dictionary service - IOC.voidsetParameterTemplates(Map<String, String> parameterTemplates) Set the map of parameters used by the template.voidsetTemplateActionModelFactory(TemplateActionModelFactory templateActionModelFactory) Set the template model factory IOC.Methods inherited from class org.alfresco.repo.action.scheduled.AbstractTemplateActionDefinition
getActionService, getCompensatingTemplateCompositeActionDefinition, getTemplateService, setActionService, setCompensatingTemplateCompositeActionDefinition, setTemplateService
-
Constructor Details
-
SimpleTemplateActionDefinition
public SimpleTemplateActionDefinition()Simple constructor.
-
-
Method Details
-
getTemplateActionModelFactory
Get the template model factory.- Returns:
- - the template model factory
-
setTemplateActionModelFactory
Set the template model factory IOC.- Parameters:
templateActionModelFactory- TemplateActionModelFactory
-
getDictionaryService
Get the dictionary service.- Returns:
- - the dictionary service.
-
setDictionaryService
Set the dictionary service - IOC.- Parameters:
dictionaryService- DictionaryService
-
setActionName
Set the name of the action.- Parameters:
actionName- String
-
getActionName
Get the name of the action.- Returns:
- - the name of the action.
-
setParameterTemplates
Set the map of parameters used by the template. These are processed via the template service to produce the actual poarameters. -
getParameterTemplates
Get the templates that define the parameters for the action.- Returns:
- the templates used to create parameters for the generated action.
-
getAction
Generate the action from the template using the context node.- Specified by:
getActionin interfaceTemplateActionDefinition- Parameters:
nodeRef- NodeRef- Returns:
- - the action.
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException ApplciationContextAware - get the application context.- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-