Class 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 a String using the PARAM_TEMPLATE parameter, as a NodeRef using 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
  • Field Details

    • PARAM_MODEL

      public static final String PARAM_MODEL
      Deprecated.
      This optional Map<String, Serializable> parameter can be used to pass additional arguments to the templating engine when processing a template.
      See Also:
    • PARAM_TEMPLATE

      public static final String PARAM_TEMPLATE
      Deprecated.
      This optional String parameter specifies the template in a simple String format.
      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:
    • PARAM_TEMPLATE_NODE

      public static final String PARAM_TEMPLATE_NODE
      Deprecated.
      This optional NodeRef parameter 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:
    • PARAM_TEMPLATE_PATH

      public static final String PARAM_TEMPLATE_PATH
      Deprecated.
      This optional String parameter 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:
  • Constructor Details

    • BaseTemplateRenderingEngine

      public BaseTemplateRenderingEngine()
      Deprecated.
  • Method Details

    • render

      protected void render(AbstractRenderingEngine.RenderingContext context)
      Deprecated.
      Specified by:
      render in class AbstractRenderingEngine
    • getTemplateNode

      protected NodeRef getTemplateNode(AbstractRenderingEngine.RenderingContext context)
      Deprecated.
    • buildModel

      protected abstract 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 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 String getParamDisplayLabel(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:
      getParamDisplayLabel in class AbstractRenderingEngine
      Parameters:
      paramName - the name of the parameter
      Returns:
      the display label of the parameter
    • getParameterDefinitions

      protected Collection<ParameterDefinition> getParameterDefinitions()
      Deprecated.
      Description copied from class: AbstractRenderingEngine
      Supplies the list of parameters required by this rendering engine.
      Overrides:
      getParameterDefinitions in class AbstractRenderingEngine
    • setTemplateService

      public void setTemplateService(TemplateService templateService)
      Deprecated.
      Parameters:
      templateService - the templateService to set
    • setSearchService

      public void setSearchService(SearchService searchService)
      Deprecated.
      Parameters:
      searchService - the searchService to set
    • getTemplateService

      public TemplateService getTemplateService()
      Deprecated.
    • getSearchService

      public SearchService getSearchService()
      Deprecated.