Liferay 7.0-ce-m3

com.liferay.portlet.dynamicdatalists.template
Class DDLTemplateHandler

java.lang.Object
  extended by com.liferay.portal.kernel.template.BaseTemplateHandler
      extended by com.liferay.portlet.dynamicdatamapping.template.BaseDDMTemplateHandler
          extended by com.liferay.portlet.dynamicdatalists.template.DDLTemplateHandler
All Implemented Interfaces:
TemplateHandler

public class DDLTemplateHandler
extends BaseDDMTemplateHandler


Constructor Summary
DDLTemplateHandler()
           
 
Method Summary
 String getClassName()
          Returns the template handler's class name.
protected  TemplateVariableGroup getDDLVariablesTemplateVariableGroups()
           
protected  Class<?> getFieldVariableClass()
           
 String getName(Locale locale)
          Returns the template handler's name.
 String getResourceName()
          Returns the name of the resource associated with the template.
protected  TemplateVariableCodeHandler getTemplateVariableCodeHandler()
           
 Map<String,TemplateVariableGroup> getTemplateVariableGroups(long classPK, String language, Locale locale)
          Returns the template's map of script variable groups for which hints are displayed in the template editor palette.
 
Methods inherited from class com.liferay.portlet.dynamicdatamapping.template.BaseDDMTemplateHandler
addTemplateVariableGroup, getGeneralVariablesTemplateVariableGroup, getStructureFieldsTemplateVariableGroup, getUtilTemplateVariableGroup
 
Methods inherited from class com.liferay.portal.kernel.template.BaseTemplateHandler
getDefaultTemplateElements, getRestrictedVariables, getTemplatesConfigPath, getTemplatesHelpContent, getTemplatesHelpPath, getTemplatesHelpPropertyKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DDLTemplateHandler

public DDLTemplateHandler()
Method Detail

getClassName

public String getClassName()
Description copied from interface: TemplateHandler
Returns the template handler's class name.

Returns:
the template handler's class name

getName

public String getName(Locale locale)
Description copied from interface: TemplateHandler
Returns the template handler's name.

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

getResourceName

public String getResourceName()
Description copied from interface: TemplateHandler
Returns the name of the resource associated with the template. Permissions on the resource are checked when adding a new template.

Returns:
the name of the resource associated with the template

getTemplateVariableGroups

public Map<String,TemplateVariableGroup> getTemplateVariableGroups(long classPK,
                                                                   String language,
                                                                   Locale locale)
                                                            throws Exception
Description copied from interface: TemplateHandler
Returns the template's map of script variable groups for which hints are displayed in the template editor palette.

Script variables can be grouped arbitrarily. As examples, a group of entity fields could be mapped to the keyword Fields, or a group of general variables portal variables could be mapped to the phrase General Variables, etc.

Specified by:
getTemplateVariableGroups in interface TemplateHandler
Overrides:
getTemplateVariableGroups in class BaseDDMTemplateHandler
Parameters:
classPK - the primary key of the entity that defines the variable groups for the template. For example, consider specifying the primary key of the structure associated to the template.
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.
locale - the locale of the variable groups to get
Returns:
the template's map of script variable groups for which hints are displayed in the template editor palette
Throws:
Exception - if an exception occurred retrieving the template variable groups

getDDLVariablesTemplateVariableGroups

protected TemplateVariableGroup getDDLVariablesTemplateVariableGroups()

getFieldVariableClass

protected Class<?> getFieldVariableClass()
Overrides:
getFieldVariableClass in class BaseDDMTemplateHandler

getTemplateVariableCodeHandler

protected TemplateVariableCodeHandler getTemplateVariableCodeHandler()
Specified by:
getTemplateVariableCodeHandler in class BaseDDMTemplateHandler

Liferay 7.0-ce-m3