org.alfresco.repo.action.scheduled
Class SimpleTemplateActionDefinition

java.lang.Object
  extended by org.alfresco.repo.action.scheduled.AbstractTemplateActionDefinition
      extended by org.alfresco.repo.action.scheduled.SimpleTemplateActionDefinition
All Implemented Interfaces:
TemplateActionDefinition, 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.


Field Summary
 
Fields inherited from class org.alfresco.repo.action.scheduled.AbstractTemplateActionDefinition
actionService, compensatingTemplateActionDefinition, templateService
 
Constructor Summary
SimpleTemplateActionDefinition()
          Simple constructor.
 
Method Summary
 Action getAction(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Generate the action from the template using the context node.
 java.lang.String getActionName()
          Get the name of the action.
 org.alfresco.service.cmr.dictionary.DictionaryService getDictionaryService()
          Get the dictionary service.
 java.util.Map getParameterTemplates()
          Get the templates that define the parameters for the action.
 TemplateActionModelFactory getTemplateActionModelFactory()
          Get the template model factory.
 void setActionName(java.lang.String actionName)
          Set the name of the action.
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
          ApplciationContextAware - get the application context.
 void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
          Set the dictionary service - IOC.
 void setParameterTemplates(java.util.Map parameterTemplates)
          Set the map of parameters used by the template.
 void setTemplateActionModelFactory(TemplateActionModelFactory templateActionModelFactory)
          Set the template model factory IOC.
 
Methods inherited from class org.alfresco.repo.action.scheduled.AbstractTemplateActionDefinition
getActionService, getCompensatingTemplateCompositeActionDefinition, getTemplateService, setActionService, setCompensatingTemplateCompositeActionDefinition, setTemplateService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTemplateActionDefinition

public SimpleTemplateActionDefinition()
Simple constructor.

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 -

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 -

setActionName

public void setActionName(java.lang.String actionName)
Set the name of the action.

Parameters:
actionName -

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 parameterTemplates)
Set the map of parameters used by the template. These are processed via the template service to produce the actual poarameters.

Parameters:
parameterTemplates -

getParameterTemplates

public java.util.Map 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:
getAction in interface TemplateActionDefinition
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


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.