com.liferay.portal.kernel.template
Interface TemplateHandler

All Known Implementing Classes:
BasePortletDisplayTemplateHandler, BaseTemplateHandler

public interface TemplateHandler

Author:
Juan Fernández

Method Summary
 java.lang.String getClassName()
          Returns the class name of the template handler.
 java.util.List<Element> getDefaultTemplateElements()
          Returns a list of elements containing the information of the portlet display templates to be installed by default.
 java.lang.String getName(java.util.Locale locale)
          Returns the name of the template handler.
 java.lang.String getResourceName()
          Returns the name of the resource the template is associated with.
 java.lang.String[] getRestrictedVariables(java.lang.String language)
           
 java.lang.String getTemplatesHelpPath(java.lang.String language)
          Returns the path to the help template.
 java.lang.String getTemplatesHelpPropertyKey()
          Returns the name of the property in portal.properties that defines the path to the help of template.
 java.util.Map<java.lang.String,TemplateVariableGroup> getTemplateVariableGroups(long classPK, java.lang.String language, java.util.Locale locale)
           
 

Method Detail

getClassName

java.lang.String getClassName()
Returns the class name of the template handler.

Returns:
the class name of the template handler

getDefaultTemplateElements

java.util.List<Element> getDefaultTemplateElements()
                                                   throws java.lang.Exception
Returns a list of elements containing the information of the portlet display templates to be installed by default.

Returns:
a list of elements containing the information of the portlet display templates to be installed by default. These templates will be installed when registering the portlet
Throws:
java.lang.Exception - if an exception occurred assembling the default template elements

getName

java.lang.String getName(java.util.Locale locale)
Returns the name of the template handler.

Parameters:
locale - the locale of the template handler name to get
Returns:
the name of the template handler

getResourceName

java.lang.String getResourceName()
Returns the name of the resource the template is associated with. Permissions on the resource are checked when adding a new template.

Returns:
the name of the resource

getRestrictedVariables

java.lang.String[] getRestrictedVariables(java.lang.String language)

getTemplatesHelpPath

java.lang.String getTemplatesHelpPath(java.lang.String language)
Returns the path to the help template.

Parameters:
language - the language of the template
Returns:
the path to the help template. This template will be shown as a help message when the user creates a new template.

getTemplatesHelpPropertyKey

java.lang.String getTemplatesHelpPropertyKey()
Returns the name of the property in portal.properties that defines the path to the help of template.

Returns:
the name of the property in portal.properties that defines the path to the help template.

getTemplateVariableGroups

java.util.Map<java.lang.String,TemplateVariableGroup> getTemplateVariableGroups(long classPK,
                                                                                java.lang.String language,
                                                                                java.util.Locale locale)
                                                                                throws java.lang.Exception
Throws:
java.lang.Exception