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
  • Constructor Details

    • SimpleTemplateActionDefinition

      public SimpleTemplateActionDefinition()
      Simple constructor.
  • Method Details

    • 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:
      getAction in interface TemplateActionDefinition
      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:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException