@ProviderType
public interface TemplateHandler
| Modifier and Type | Method and Description |
|---|---|
String |
getClassName()
Returns the template handler's class name.
|
Map<String,Object> |
getCustomContextObjects()
Returns the map of name/value pairs of the objects that should be
injected into the context.
|
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 |
getName(Locale locale)
Returns the template handler's name.
|
String |
getResourceName()
Returns the name of the resource associated with the template.
|
String[] |
getRestrictedVariables(String language)
Returns the restricted variables that are excluded from the template's
context.
|
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. |
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.
|
boolean |
isDisplayTemplateHandler()
Returns
true if the entity is a display template handler. |
String getClassName()
Map<String,Object> getCustomContextObjects()
List<Element> getDefaultTemplateElements() throws Exception
Exception - if an exception occurred assembling the default
template elementsString getDefaultTemplateKey()
String getName(Locale locale)
locale - the locale of the template handler name to getString getResourceName()
String[] getRestrictedVariables(String language)
language - the template's scripting language. Acceptable values for
the FreeMarker or Velocity languages are TemplateConstants.LANG_TYPE_FTL, or TemplateConstants.LANG_TYPE_VM, respectively.String getTemplatesHelpContent(String language)
language - the template's scripting language. Acceptable values for
the FreeMarker or Velocity languages are TemplateConstants.LANG_TYPE_FTL, or TemplateConstants.LANG_TYPE_VM, respectively.String getTemplatesHelpPath(String language)
language - the template's scripting language. Acceptable values for
the FreeMarker or Velocity languages are TemplateConstants.LANG_TYPE_FTL, or TemplateConstants.LANG_TYPE_VM, respectively.String getTemplatesHelpPropertyKey()
portal.properties that
defines the path to the template's help content.portal.properties that
defines the path to the template's help contentMap<String,TemplateVariableGroup> getTemplateVariableGroups(long classPK, String language, Locale locale) throws Exception
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.
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 or Velocity languages are TemplateConstants.LANG_TYPE_FTL, or TemplateConstants.LANG_TYPE_VM, respectively.locale - the locale of the variable groups to getException - if an exception occurred retrieving the template
variable groupsboolean isDisplayTemplateHandler()
true if the entity is a display template handler.true if the entity is a display template handler;
false otherwise