Liferay 7.0-ce-m3

com.liferay.portlet.dynamicdatamapping.template
Class BaseDDMTemplateHandler

java.lang.Object
  extended by com.liferay.portal.kernel.template.BaseTemplateHandler
      extended by com.liferay.portlet.dynamicdatamapping.template.BaseDDMTemplateHandler
All Implemented Interfaces:
TemplateHandler
Direct Known Subclasses:
DDLTemplateHandler, JournalTemplateHandler

public abstract class BaseDDMTemplateHandler
extends BaseTemplateHandler


Constructor Summary
BaseDDMTemplateHandler()
           
 
Method Summary
protected  void addTemplateVariableGroup(Map<String,TemplateVariableGroup> templateVariableGroups, TemplateVariableGroup templateVariableGroup)
           
protected  Class<?> getFieldVariableClass()
           
protected  TemplateVariableGroup getGeneralVariablesTemplateVariableGroup()
           
protected  TemplateVariableGroup getStructureFieldsTemplateVariableGroup(long ddmStructureId, Locale locale)
           
protected abstract  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.
protected  TemplateVariableGroup 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
 
Methods inherited from interface com.liferay.portal.kernel.template.TemplateHandler
getClassName, getName, getResourceName
 

Constructor Detail

BaseDDMTemplateHandler

public BaseDDMTemplateHandler()
Method Detail

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.

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

addTemplateVariableGroup

protected void addTemplateVariableGroup(Map<String,TemplateVariableGroup> templateVariableGroups,
                                        TemplateVariableGroup templateVariableGroup)

getFieldVariableClass

protected Class<?> getFieldVariableClass()

getGeneralVariablesTemplateVariableGroup

protected TemplateVariableGroup getGeneralVariablesTemplateVariableGroup()

getStructureFieldsTemplateVariableGroup

protected TemplateVariableGroup getStructureFieldsTemplateVariableGroup(long ddmStructureId,
                                                                        Locale locale)
                                                                 throws PortalException
Throws:
PortalException

getTemplateVariableCodeHandler

protected abstract TemplateVariableCodeHandler getTemplateVariableCodeHandler()

getUtilTemplateVariableGroup

protected TemplateVariableGroup getUtilTemplateVariableGroup()

Liferay 7.0-ce-m3