Class FreeMarkerWithLuceneExtensionsModelFactory
java.lang.Object
org.alfresco.repo.action.scheduled.FreeMarkerWithLuceneExtensionsModelFactory
- All Implemented Interfaces:
TemplateActionModelFactory
public class FreeMarkerWithLuceneExtensionsModelFactory
extends Object
implements TemplateActionModelFactory
A factory implementation to build suitable models for the freemarker templating language.
- Author:
- Andy Hind
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetModel()Get the non-contextual model.Defines a non-contextual nod model + the contextual nodeThe name of the template engine for which this model applies.voidsetServiceRegistry(ServiceRegistry serviceRegistry) Set the service registry
-
Constructor Details
-
FreeMarkerWithLuceneExtensionsModelFactory
public FreeMarkerWithLuceneExtensionsModelFactory()Default constructor.
-
-
Method Details
-
setServiceRegistry
Set the service registry- Parameters:
serviceRegistry- ServiceRegistry
-
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
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
The name of the template engine for which this model applies. In this case, "freemarker".- Specified by:
getTemplateEnginein interfaceTemplateActionModelFactory- Returns:
- - the template engine.
-