Liferay 7.0-ce-b4

com.liferay.portal.kernel.template
Class BaseTemplateHandler

java.lang.Object
  extended by com.liferay.portal.kernel.template.BaseTemplateHandler
All Implemented Interfaces:
TemplateHandler
Direct Known Subclasses:
BasePortletDisplayTemplateHandler

@ProviderType
public abstract class BaseTemplateHandler
extends Object
implements TemplateHandler


Constructor Summary
BaseTemplateHandler()
           
 
Method Summary
 Map<String,Object> getCustomContextObjects()
           
 List<Element> getDefaultTemplateElements()
          Returns the elements containing the information of the portlet display templates to be installed by default.
 String getDefaultTemplateKey()
          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 getTemplatesConfigPath()
           
 String getTemplatesHelpContent(String language)
          Returns initial template content for helping the user create a new template.
 String getTemplatesHelpPath(String language)
          Returns the path to the template's help content.
 String getTemplatesHelpPropertyKey()
          Returns the name of the property in portal.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
 

Constructor Detail

BaseTemplateHandler

public BaseTemplateHandler()
Method Detail

getCustomContextObjects

public Map<String,Object> getCustomContextObjects()
Specified by:
getCustomContextObjects in interface TemplateHandler

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, Velocity, or XSL languages are TemplateConstants.LANG_TYPE_FTL, TemplateConstants.LANG_TYPE_VM, or TemplateConstants.LANG_TYPE_XSL, 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, Velocity, or XSL languages are TemplateConstants.LANG_TYPE_FTL, TemplateConstants.LANG_TYPE_VM, or TemplateConstants.LANG_TYPE_XSL, 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, Velocity, or XSL languages are TemplateConstants.LANG_TYPE_FTL, TemplateConstants.LANG_TYPE_VM, or TemplateConstants.LANG_TYPE_XSL, 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()

Liferay 7.0-ce-b4