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 Constructor Description SimpleTemplateActionDefinition()Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActiongetAction(NodeRef nodeRef)Generate the action from the template using the context node.StringgetActionName()Get the name of the action.DictionaryServicegetDictionaryService()Get the dictionary service.Map<String,String>getParameterTemplates()Get the templates that define the parameters for the action.TemplateActionModelFactorygetTemplateActionModelFactory()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
-
-
-
-
Method Detail
-
getTemplateActionModelFactory
public TemplateActionModelFactory getTemplateActionModelFactory()
Get the template model factory.- Returns:
- - the template model factory
-
setTemplateActionModelFactory
public void setTemplateActionModelFactory(TemplateActionModelFactory templateActionModelFactory)
Set the template model factory IOC.- Parameters:
templateActionModelFactory- TemplateActionModelFactory
-
getDictionaryService
public DictionaryService getDictionaryService()
Get the dictionary service.- Returns:
- - the dictionary service.
-
setDictionaryService
public void setDictionaryService(DictionaryService dictionaryService)
Set the dictionary service - IOC.- Parameters:
dictionaryService- DictionaryService
-
setActionName
public void setActionName(String actionName)
Set the name of the action.- Parameters:
actionName- String
-
getActionName
public String getActionName()
Get the name of the action.- Returns:
- - the name of the action.
-
setParameterTemplates
public void setParameterTemplates(Map<String,String> parameterTemplates)
Set the map of parameters used by the template. These are processed via the template service to produce the actual poarameters.
-
getParameterTemplates
public Map<String,String> getParameterTemplates()
Get the templates that define the parameters for the action.- Returns:
- the templates used to create parameters for the generated action.
-
getAction
public Action getAction(NodeRef nodeRef)
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.BeansExceptionApplciationContextAware - get the application context.- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
-