Class FreeMarkerWithLuceneExtensionsModelFactory
- java.lang.Object
-
- org.alfresco.repo.action.scheduled.FreeMarkerWithLuceneExtensionsModelFactory
-
- All Implemented Interfaces:
TemplateActionModelFactory
public class FreeMarkerWithLuceneExtensionsModelFactory extends java.lang.Object implements TemplateActionModelFactory
A factory implementation to build suitable models for the freemarker templating language.- Author:
- Andy Hind
-
-
Constructor Summary
Constructors Constructor Description FreeMarkerWithLuceneExtensionsModelFactory()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>getModel()Get the non-contextual model.java.util.Map<java.lang.String,java.lang.Object>getModel(org.alfresco.service.cmr.repository.NodeRef nodeRef)Defines a non-contextual nod model + the contextual nodejava.lang.StringgetTemplateEngine()The name of the template engine for which this model applies.voidsetServiceRegistry(ServiceRegistry serviceRegistry)Set the service registry
-
-
-
Method Detail
-
setServiceRegistry
public void setServiceRegistry(ServiceRegistry serviceRegistry)
Set the service registry- Parameters:
serviceRegistry- ServiceRegistry
-
getModel
public java.util.Map<java.lang.String,java.lang.Object> getModel()
Get the non-contextual model. This defines:- dates: date, today, yesterday, tomorrow
- functions: luceneDateRange, selectSingleNode
- Specified by:
getModelin interfaceTemplateActionModelFactory- Returns:
- - the model for the template engine.
-
getModel
public java.util.Map<java.lang.String,java.lang.Object> getModel(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Defines a non-contextual nod model + the contextual node- Specified by:
getModelin interfaceTemplateActionModelFactory- Parameters:
nodeRef- NodeRef- Returns:
- - the model (with nodeRef as its context).
-
getTemplateEngine
public java.lang.String getTemplateEngine()
The name of the template engine for which this model applies. In this case, "freemarker".- Specified by:
getTemplateEnginein interfaceTemplateActionModelFactory- Returns:
- - the template engine.
-
-