Class BaseTemplateHandler
Object
com.liferay.portal.kernel.template.BaseTemplateHandler
- All Implemented Interfaces:
TemplateHandler
- Author:
- Jorge Ferrer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the map of name/value pairs of the objects that should be injected into the context.Returns the elements containing the information of the portlet display templates to be installed by default.Returns the key of the template handler's default template.String[]
getRestrictedVariables
(String language) Returns the restricted variables that are excluded from the template's context.protected String
getTemplatesHelpContent
(String language) Returns initial template content for helping the user create a new template.getTemplatesHelpPath
(String language) Returns the path to the template's help content.Returns the name of the property inportal.properties
that defines the path to the template's help content.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.liferay.portal.kernel.template.TemplateHandler
getClassName, getName, getResourceName, getTemplateVariableGroups, isDisplayTemplateHandler, isEnabled
-
Constructor Details
-
BaseTemplateHandler
public BaseTemplateHandler()
-
-
Method Details
-
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 interfaceTemplateHandler
- Returns:
- the objects that should be injected into the context
-
getDefaultTemplateElements
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 interfaceTemplateHandler
- 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
Description copied from interface:TemplateHandler
Returns the key of the template handler's default template.- Specified by:
getDefaultTemplateKey
in interfaceTemplateHandler
- Returns:
- the key of the template handler's default template
-
getRestrictedVariables
Description copied from interface:TemplateHandler
Returns the restricted variables that are excluded from the template's context.- Specified by:
getRestrictedVariables
in interfaceTemplateHandler
- Parameters:
language
- the template's scripting language. Acceptable values for the FreeMarker or Velocity languages areTemplateConstants.LANG_TYPE_FTL
, orTemplateConstants.LANG_TYPE_VM
, respectively.- Returns:
- the restricted variables that are excluded from the template's context
-
getTemplatesHelpContent
Description copied from interface:TemplateHandler
Returns initial template content for helping the user create a new template.- Specified by:
getTemplatesHelpContent
in interfaceTemplateHandler
- Parameters:
language
- the template's scripting language. Acceptable values for the FreeMarker or Velocity languages areTemplateConstants.LANG_TYPE_FTL
, orTemplateConstants.LANG_TYPE_VM
, respectively.- Returns:
- initial template content for helping the user create a new template
-
getTemplatesHelpPath
Description copied from interface:TemplateHandler
Returns the path to the template's help content.- Specified by:
getTemplatesHelpPath
in interfaceTemplateHandler
- Parameters:
language
- the template's scripting language. Acceptable values for the FreeMarker or Velocity languages areTemplateConstants.LANG_TYPE_FTL
, orTemplateConstants.LANG_TYPE_VM
, respectively.- Returns:
- the path to the template's help content
-
getTemplatesHelpPropertyKey
Description copied from interface:TemplateHandler
Returns the name of the property inportal.properties
that defines the path to the template's help content.- Specified by:
getTemplatesHelpPropertyKey
in interfaceTemplateHandler
- Returns:
- the name of the property in
portal.properties
that defines the path to the template's help content
-
getTemplatesConfigPath
-