Package com.jalios.jcms.policy
Interface TemplatePolicyFilter
- All Superinterfaces:
Comparable,PluginComponent,PolicyFilter
- All Known Implementing Classes:
BasicTemplatePolicyFilter,ConditionTemplatePolicyFilter
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
Modifier and TypeMethodDescriptionString[]getConditionLabels(String[] labels, Class<? extends PortalElement> clazz, String userLang) Hook called by doEditCommonPortlet to update labels to Condition's combo boxString[]getConditionValues(String[] values, Class<? extends PortalElement> clazz) Hook called by doEditCommonPortlet to update values to Condition's combo boxvoidgetCssFiles(List<File> jcmsChoice) Hook called by PortalManager to change available css files in the portal editor.getInnerClasses(PortalElement portlet) Hook called by PortalManager to add more classes for the given PortalElement's insidegetInnerStyles(PortalElement portlet) Hook called by PortalManager to add more styles for the given PortalElement's insidegetOutterClasses(PortalElement portlet) Hook called by PortalManager to add more classes for the given PortalElement's outsidegetOutterStyles(PortalElement portlet) Hook called by PortalManager to add more styles for the given PortalElement's outsidegetSkinTemplateUsage(Data data, String usage) Overrides the skin usage decided by JCMS and previous pluginsgetTemplateEntry(String usage, Data data, TypeTemplateEntry tte) This method is a hook to display a custom template, different from the default selected one.getTemplateEntry(String usage, Class<? extends Data> dataClass, Workspace ws, TypeTemplateEntry tte) This method is a hook to display a custom template, different from the default selected one.getTemplateUsage(Data data, String usage) Overrides the usage decided by JCMS and previous pluginsgetTemplateUsage(Class<?> pubClass, String usage) Overrides the usage decided by JCMS and previous pluginsvoidhandleCondition(String[] conditions) Hook called by doInitPortlet.jsp to handle custom portlet condition.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.jalios.jcms.plugin.PluginComponent
init
-
Method Details
-
getTemplateEntry
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:
-
getTemplateEntry
TypeTemplateEntry getTemplateEntry(String usage, 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:
-
getTemplateUsage
Overrides the usage decided by JCMS and previous plugins- Parameters:
data- the working datausage- is the current usage- Returns:
- String the overrided usage
-
getTemplateUsage
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
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
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:
-
getOutterClasses
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:
-
getInnerStyles
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:
-
getOutterStyles
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:
-
getCssFiles
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:
-
getConditionLabels
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
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
Hook called by doInitPortlet.jsp to handle custom portlet condition.- Parameters:
conditions- String array of codition for the given portlet
-