Class BaseTemplateHandler

Object
com.liferay.portal.kernel.template.BaseTemplateHandler
All Implemented Interfaces:
TemplateHandler

@ProviderType public abstract class BaseTemplateHandler extends Object implements TemplateHandler
Author:
Jorge Ferrer
  • Constructor Details

    • BaseTemplateHandler

      public BaseTemplateHandler()
  • Method Details

    • getCustomContextObjects

      public Map<String,Object> getCustomContextObjects()
      Description copied from interface: TemplateHandler
      Returns the map of name/value pairs of the objects that should be injected into the context.
      Specified by:
      getCustomContextObjects in interface TemplateHandler
      Returns:
      the objects that should be injected into the context
    • getDefaultTemplateElements

      public List<Element> getDefaultTemplateElements() throws Exception
      Description copied from interface: TemplateHandler
      Returns the elements containing the information of the portlet display templates to be installed by default.
      Specified by:
      getDefaultTemplateElements in interface TemplateHandler
      Returns:
      the elements containing the information of the portlet display templates to be installed by default. These templates are installed when registering the portlet.
      Throws:
      Exception - if an exception occurred assembling the default template elements
    • getDefaultTemplateKey

      public String getDefaultTemplateKey()
      Description copied from interface: TemplateHandler
      Returns the key of the template handler's default template.
      Specified by:
      getDefaultTemplateKey in interface TemplateHandler
      Returns:
      the key of the template handler's default template
    • getRestrictedVariables

      public String[] getRestrictedVariables(String language)
      Description copied from interface: TemplateHandler
      Returns the restricted variables that are excluded from the template's context.
      Specified by:
      getRestrictedVariables in interface TemplateHandler
      Parameters:
      language - the template's scripting language. Acceptable values for the FreeMarker or Velocity languages are TemplateConstants.LANG_TYPE_FTL, or TemplateConstants.LANG_TYPE_VM, respectively.
      Returns:
      the restricted variables that are excluded from the template's context
    • getTemplatesHelpContent

      public String getTemplatesHelpContent(String language)
      Description copied from interface: TemplateHandler
      Returns initial template content for helping the user create a new template.
      Specified by:
      getTemplatesHelpContent in interface TemplateHandler
      Parameters:
      language - the template's scripting language. Acceptable values for the FreeMarker or Velocity languages are TemplateConstants.LANG_TYPE_FTL, or TemplateConstants.LANG_TYPE_VM, respectively.
      Returns:
      initial template content for helping the user create a new template
    • getTemplatesHelpPath

      public String getTemplatesHelpPath(String language)
      Description copied from interface: TemplateHandler
      Returns the path to the template's help content.
      Specified by:
      getTemplatesHelpPath in interface TemplateHandler
      Parameters:
      language - the template's scripting language. Acceptable values for the FreeMarker or Velocity languages are TemplateConstants.LANG_TYPE_FTL, or TemplateConstants.LANG_TYPE_VM, respectively.
      Returns:
      the path to the template's help content
    • getTemplatesHelpPropertyKey

      public String getTemplatesHelpPropertyKey()
      Description copied from interface: TemplateHandler
      Returns the name of the property in portal.properties that defines the path to the template's help content.
      Specified by:
      getTemplatesHelpPropertyKey in interface TemplateHandler
      Returns:
      the name of the property in portal.properties that defines the path to the template's help content
    • getTemplatesConfigPath

      protected String getTemplatesConfigPath()