Class BaseTemplateRenderingEngine
- java.lang.Object
-
- org.alfresco.repo.action.CommonResourceAbstractBase
-
- org.alfresco.repo.action.ParameterizedItemAbstractBase
-
- org.alfresco.repo.action.executer.ActionExecuterAbstractBase
-
- org.alfresco.repo.rendition.executer.AbstractRenderingEngine
-
- org.alfresco.repo.rendition.executer.BaseTemplateRenderingEngine
-
- All Implemented Interfaces:
ActionExecuter,LoggingAwareExecuter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
- Direct Known Subclasses:
FreemarkerRenderingEngine,XSLTRenderingEngine
@Deprecated public abstract class BaseTemplateRenderingEngine extends AbstractRenderingEngine
Deprecated.The RenditionService is being replace by the simpler async RenditionService2.This abstract class forms a basis for all rendering engines that are built around the Template Service.
A template must be specified either as aStringusing the PARAM_TEMPLATE parameter, as aNodeRefusing the PARAM_TEMPLATE_NODE parameter or as a file path location using the PARAM_TEMPLATE_PATH parameter. The RenderingEngine reads from these parameters with the following priority: PARAM_TEMPLATE > PARAM_TEMPLATE_NODE > PARAM_TEMPLATE_PATH.- Since:
- 3.3
- Author:
- Brian Remmington
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.alfresco.repo.rendition.executer.AbstractRenderingEngine
AbstractRenderingEngine.RenderingContext
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPARAM_MODELDeprecated.This optionalMap<String,Serializable> parameter can be used to pass additional arguments to the templating engine when processing a template.static java.lang.StringPARAM_TEMPLATEDeprecated.This optionalStringparameter specifies the template in a simpleStringformat.
If this parameter is set the Rendering Engine will use it in preference to templates specified by either the PARAM_TEMPLATE_NODE or the PARAM_TEMPLATE_PATH parameters.static java.lang.StringPARAM_TEMPLATE_NODEDeprecated.This optionalNodeRefparameter specifies a node containing the template to be processed.
If a value is specified for PARAM_TEMPLATE then this parameter will be ignored.
If a value is specified for this parameter it will be used in preference to values specified for the PARAM_TEMPLATE_PATH parameter.static java.lang.StringPARAM_TEMPLATE_PATHDeprecated.This optionalStringparameter specifies a file path location for the template to be processed.
If a value is specified for PARAM_TEMPLATE or PARAM_TEMPLATE_NODE then this parameter will be ignored.-
Fields inherited from class org.alfresco.repo.rendition.executer.AbstractRenderingEngine
actionTrackingService, CONTENT_READER_NOT_FOUND_MESSAGE, contentService, DEFAULT_RUN_AS_NAME, mimetypeMap, namespaceService, nodeService, PARAM_ENCODING, PARAM_MIME_TYPE, PARAM_PLACEHOLDER_RESOURCE_PATH, PARAM_RUN_AS, PARAM_SOURCE_CONTENT_PROPERTY, PARAM_TARGET_CONTENT_PROPERTY, PARAM_UPDATE_RENDITIONS_ON_ANY_PROPERTY_CHANGE
-
Fields inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
actionDefinition, applicableTypes, publicAction
-
Fields inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
adhocPropertiesAllowed, DISPLAY_LABEL, runtimeActionService
-
Fields inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
name
-
Fields inherited from interface org.alfresco.repo.action.executer.ActionExecuter
PARAM_RESULT
-
-
Constructor Summary
Constructors Constructor Description BaseTemplateRenderingEngine()Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract java.lang.ObjectbuildModel(AbstractRenderingEngine.RenderingContext context)Deprecated.Create the model that will be passed to the template service for rendering with the appropriate template.protected java.lang.StringgetParamDisplayLabel(java.lang.String paramName)Deprecated.This method gets the parameter definition display label from the properties file.protected java.util.Collection<ParameterDefinition>getParameterDefinitions()Deprecated.Supplies the list of parameters required by this rendering engine.org.alfresco.service.cmr.search.SearchServicegetSearchService()Deprecated.protected org.alfresco.service.cmr.repository.NodeRefgetTemplateNode(AbstractRenderingEngine.RenderingContext context)Deprecated.TemplateServicegetTemplateService()Deprecated.protected abstract java.lang.StringgetTemplateType()Deprecated.Get the type of template that is to be used.protected voidrender(AbstractRenderingEngine.RenderingContext context)Deprecated.voidsetSearchService(org.alfresco.service.cmr.search.SearchService searchService)Deprecated.voidsetTemplateService(TemplateService templateService)Deprecated.-
Methods inherited from class org.alfresco.repo.rendition.executer.AbstractRenderingEngine
addParameterDefinitions, checkActionIsRenditionDefinition, checkParameterValues, checkSourceNodeExists, createActionDefinition, executeImpl, executeImpl, executeRenditionImpl, getCheckedParam, getDefaultRenditionContentProp, getDefaultRenditionNodeType, getExecutionSummary, getParamWithDefault, getRenditionContentProperty, getTargetEncoding, getTargetMimeType, notifyCallbackOfException, notifyCallbackOfResult, resolveRenditionLocation, setActionTrackingService, setBehaviourFilter, setContentService, setDefaultRenditionContentProp, setDefaultRenditionNodeType, setMimetypeMap, setNamespaceService, setNodeService, setRenditionLocationResolver, setRenditionService, switchToFinalRenditionNode, tagSourceNodeAsRenditioned, throwWrappedException
-
Methods inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
execute, getActionDefinition, getIgnoreLock, getQueueName, getTrackStatus, init, isApplicableType, onLogException, setApplicableTypes, setBaseNodeService, setDictionaryService, setIgnoreLock, setLockService, setMlAwareNodeService, setPublicAction, setQueueName, setTrackStatus
-
Methods inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toString
-
Methods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
setBeanName
-
-
-
-
Field Detail
-
PARAM_MODEL
public static final java.lang.String PARAM_MODEL
Deprecated.This optionalMap<String,Serializable> parameter can be used to pass additional arguments to the templating engine when processing a template.- See Also:
- Constant Field Values
-
PARAM_TEMPLATE
public static final java.lang.String PARAM_TEMPLATE
Deprecated.This optionalStringparameter specifies the template in a simpleStringformat.
If this parameter is set the Rendering Engine will use it in preference to templates specified by either the PARAM_TEMPLATE_NODE or the PARAM_TEMPLATE_PATH parameters.- See Also:
- Constant Field Values
-
PARAM_TEMPLATE_NODE
public static final java.lang.String PARAM_TEMPLATE_NODE
Deprecated.This optionalNodeRefparameter specifies a node containing the template to be processed.
If a value is specified for PARAM_TEMPLATE then this parameter will be ignored.
If a value is specified for this parameter it will be used in preference to values specified for the PARAM_TEMPLATE_PATH parameter.- See Also:
- Constant Field Values
-
PARAM_TEMPLATE_PATH
public static final java.lang.String PARAM_TEMPLATE_PATH
Deprecated.This optionalStringparameter specifies a file path location for the template to be processed.
If a value is specified for PARAM_TEMPLATE or PARAM_TEMPLATE_NODE then this parameter will be ignored.- See Also:
- Constant Field Values
-
-
Method Detail
-
render
protected void render(AbstractRenderingEngine.RenderingContext context)
Deprecated.- Specified by:
renderin classAbstractRenderingEngine
-
getTemplateNode
protected org.alfresco.service.cmr.repository.NodeRef getTemplateNode(AbstractRenderingEngine.RenderingContext context)
Deprecated.
-
buildModel
protected abstract java.lang.Object buildModel(AbstractRenderingEngine.RenderingContext context)
Deprecated.Create the model that will be passed to the template service for rendering with the appropriate template.- Parameters:
context- The context of the rendering request- Returns:
- The model that is to be passed to the template service
-
getTemplateType
protected abstract java.lang.String getTemplateType()
Deprecated.Get the type of template that is to be used. This identifies the name of the template processor that should be used, such as "freemarker" or "xslt".- Returns:
- String
-
getParamDisplayLabel
protected java.lang.String getParamDisplayLabel(java.lang.String paramName)
Deprecated.This method gets the parameter definition display label from the properties file. It looks first for a property whose key has a fixed rendition service-specific prefix and if that gets null, it then delegates to the standard bean name-based approach.- Overrides:
getParamDisplayLabelin classAbstractRenderingEngine- Parameters:
paramName- the name of the parameter- Returns:
- the display label of the parameter
-
getParameterDefinitions
protected java.util.Collection<ParameterDefinition> getParameterDefinitions()
Deprecated.Description copied from class:AbstractRenderingEngineSupplies the list of parameters required by this rendering engine.- Overrides:
getParameterDefinitionsin classAbstractRenderingEngine
-
setTemplateService
public void setTemplateService(TemplateService templateService)
Deprecated.- Parameters:
templateService- the templateService to set
-
setSearchService
public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
Deprecated.- Parameters:
searchService- the searchService to set
-
getTemplateService
public TemplateService getTemplateService()
Deprecated.
-
getSearchService
public org.alfresco.service.cmr.search.SearchService getSearchService()
Deprecated.
-
-