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(org.alfresco.service.cmr.repository.NodeRef nodeRef)Generate the action from the template using the context node.java.lang.StringgetActionName()Get the name of the action.org.alfresco.service.cmr.dictionary.DictionaryServicegetDictionaryService()Get the dictionary service.java.util.Map<java.lang.String,java.lang.String>getParameterTemplates()Get the templates that define the parameters for the action.TemplateActionModelFactorygetTemplateActionModelFactory()Get the template model factory.voidsetActionName(java.lang.String actionName)Set the name of the action.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)ApplciationContextAware - get the application context.voidsetDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)Set the dictionary service - IOC.voidsetParameterTemplates(java.util.Map<java.lang.String,java.lang.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 org.alfresco.service.cmr.dictionary.DictionaryService getDictionaryService()
Get the dictionary service.- Returns:
- - the dictionary service.
-
setDictionaryService
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Set the dictionary service - IOC.- Parameters:
dictionaryService- DictionaryService
-
setActionName
public void setActionName(java.lang.String actionName)
Set the name of the action.- Parameters:
actionName- String
-
getActionName
public java.lang.String getActionName()
Get the name of the action.- Returns:
- - the name of the action.
-
setParameterTemplates
public void setParameterTemplates(java.util.Map<java.lang.String,java.lang.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 java.util.Map<java.lang.String,java.lang.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(org.alfresco.service.cmr.repository.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
-
-