Package com.jalios.jcms.policy
Interface TemplatePolicyFilter
-
- All Superinterfaces:
java.lang.Comparable,PluginComponent,PolicyFilter
- All Known Implementing Classes:
BasicTemplatePolicyFilter,ConditionTemplatePolicyFilter
public interface TemplatePolicyFilter extends PolicyFilter
This class is a hook to allow developer to select custom templates for a given publication- Since:
- jcms-5.7.0
- Author:
- Jean-Philippe Encausse
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String[]getConditionLabels(java.lang.String[] labels, java.lang.Class<? extends PortalElement> clazz, java.lang.String userLang)Hook called by doEditCommonPortlet to update labels to Condition's combo boxjava.lang.String[]getConditionValues(java.lang.String[] values, java.lang.Class<? extends PortalElement> clazz)Hook called by doEditCommonPortlet to update values to Condition's combo boxvoidgetCssFiles(java.util.List<java.io.File> jcmsChoice)Hook called by PortalManager to change available css files in the portal editor.java.lang.StringgetInnerClasses(PortalElement portlet)Hook called by PortalManager to add more classes for the given PortalElement's insidejava.lang.StringgetInnerStyles(PortalElement portlet)Hook called by PortalManager to add more styles for the given PortalElement's insidejava.lang.StringgetOutterClasses(PortalElement portlet)Hook called by PortalManager to add more classes for the given PortalElement's outsidejava.lang.StringgetOutterStyles(PortalElement portlet)Hook called by PortalManager to add more styles for the given PortalElement's outsidejava.lang.StringgetSkinTemplateUsage(Data data, java.lang.String usage)Overrides the skin usage decided by JCMS and previous pluginsTypeTemplateEntrygetTemplateEntry(java.lang.String usage, Data data, TypeTemplateEntry tte)This method is a hook to display a custom template, different from the default selected one.TypeTemplateEntrygetTemplateEntry(java.lang.String usage, java.lang.Class<? extends Data> dataClass, Workspace ws, TypeTemplateEntry tte)This method is a hook to display a custom template, different from the default selected one.java.lang.StringgetTemplateUsage(Data data, java.lang.String usage)Overrides the usage decided by JCMS and previous pluginsjava.lang.StringgetTemplateUsage(java.lang.Class<?> pubClass, java.lang.String usage)Overrides the usage decided by JCMS and previous pluginsvoidhandleCondition(java.lang.String[] conditions)Hook called by doInitPortlet.jsp to handle custom portlet condition.-
Methods inherited from interface com.jalios.jcms.plugin.PluginComponent
init
-
-
-
-
Method Detail
-
getTemplateEntry
TypeTemplateEntry getTemplateEntry(java.lang.String usage, Data data, TypeTemplateEntry tte)
This method is a hook to display a custom template, different from the default selected one. Use the method channel.getCurrentJcmsContext() do get clue about the current request.- Parameters:
usage- the template usagedata- the working publication- Returns:
- tte the chosen TypeTemplateEntry
- Since:
- jcms-6.0.0
- See Also:
Channel.getCurrentJcmsContext()
-
getTemplateEntry
TypeTemplateEntry getTemplateEntry(java.lang.String usage, java.lang.Class<? extends Data> dataClass, Workspace ws, TypeTemplateEntry tte)
This method is a hook to display a custom template, different from the default selected one. Use the method channel.getCurrentJcmsContext() do get clue about the current request.- Parameters:
usage- the template usagedataClass- the working Classws- the working Workspace- Returns:
- tte the chosen TypeTemplateEntry
- Since:
- jcms-6.0.0
- See Also:
Channel.getCurrentJcmsContext()
-
getTemplateUsage
java.lang.String getTemplateUsage(Data data, java.lang.String usage)
Overrides the usage decided by JCMS and previous plugins- Parameters:
data- the working datausage- is the current usage- Returns:
- String the overrided usage
-
getTemplateUsage
java.lang.String getTemplateUsage(java.lang.Class<?> pubClass, java.lang.String usage)Overrides the usage decided by JCMS and previous plugins- Parameters:
pubClass- the class of the publicationusage- is the current usage- Returns:
- String the overrided usage
-
getSkinTemplateUsage
java.lang.String getSkinTemplateUsage(Data data, java.lang.String usage)
Overrides the skin usage decided by JCMS and previous plugins- Parameters:
data- the working datausage- is the current usage- Returns:
- String the overrided usage
-
getInnerClasses
java.lang.String getInnerClasses(PortalElement portlet)
Hook called by PortalManager to add more classes for the given PortalElement's inside- Parameters:
portlet- the working PortalElement- Returns:
- String the inner classes to add
- See Also:
PortalManager.getInnerClasses(PortalElement)
-
getOutterClasses
java.lang.String getOutterClasses(PortalElement portlet)
Hook called by PortalManager to add more classes for the given PortalElement's outside- Parameters:
portlet- the working PortalElement- Returns:
- String the outter classes to add
- See Also:
PortalManager.getOutterClasses(PortalElement)
-
getInnerStyles
java.lang.String getInnerStyles(PortalElement portlet)
Hook called by PortalManager to add more styles for the given PortalElement's inside- Parameters:
portlet- the working PortalElement- Returns:
- String the inner styles to add
- See Also:
PortalManager.getInnerStyles(PortalElement)
-
getOutterStyles
java.lang.String getOutterStyles(PortalElement portlet)
Hook called by PortalManager to add more styles for the given PortalElement's outside- Parameters:
portlet- the working PortalElement- Returns:
- String the outter styles to add
- See Also:
PortalManager.getOutterStyles(PortalElement)
-
getCssFiles
void getCssFiles(java.util.List<java.io.File> jcmsChoice)
Hook called by PortalManager to change available css files in the portal editor. It can be used to add files from other place of the jcms webapp.- Parameters:
jcmsChoice- files selected by JCMS- See Also:
PortalManager.getCssFiles()
-
getConditionLabels
java.lang.String[] getConditionLabels(java.lang.String[] labels, java.lang.Class<? extends PortalElement> clazz, java.lang.String userLang)Hook called by doEditCommonPortlet to update labels to Condition's combo box- Parameters:
labels- String[] I18N array of labelsclazz- the portlet classuserLang- the lang of the user- Returns:
- String[] I18N array of labels
-
getConditionValues
java.lang.String[] getConditionValues(java.lang.String[] values, java.lang.Class<? extends PortalElement> clazz)Hook called by doEditCommonPortlet to update values to Condition's combo box- Parameters:
values- String[] of valuesclazz- he portlet class- Returns:
- String[] an array of conditional values
-
handleCondition
void handleCondition(java.lang.String[] conditions)
Hook called by doInitPortlet.jsp to handle custom portlet condition.- Parameters:
conditions- String array of codition for the given portlet
-
-