com.jalios.jcms.policy
Interface TemplatePolicyFilter

All Superinterfaces:
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
Version:
$Revision: 28817 $
Author:
Jean-Philippe Encausse

Field Summary
static String REVISION
           
 
Method Summary
 String[] getConditionLabels(String[] labels, Class<? extends PortalElement> clazz, String userLang)
          Hook called by doEditCommonPortlet to update labels to Condition's combo box
 String[] getConditionValues(String[] values, Class<? extends PortalElement> clazz)
          Hook called by doEditCommonPortlet to update values to Condition's combo box
 void getCssFiles(List<String> jcmsChoice)
          Hook called by PortalManager to change available css files in the portal editor.
 String getInnerClasses(PortalElement portlet)
          Hook called by PortalManager to add more classes for the given PortalElement's inside
 String getInnerStyles(PortalElement portlet)
          Hook called by PortalManager to add more styles for the given PortalElement's inside
 String getOutterClasses(PortalElement portlet)
          Hook called by PortalManager to add more classes for the given PortalElement's outside
 String getOutterStyles(PortalElement portlet)
          Hook called by PortalManager to add more styles for the given PortalElement's outside
 String getSkinTemplateUsage(Data data, String usage)
          Overrides the skin usage decided by JCMS and previous plugins
 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.
 TypeTemplateEntry getTemplateEntry(String usage, Data data, TypeTemplateEntry tte)
          This method is a hook to display a custom template, different from the default selected one.
 String getTemplateUsage(Class<?> pubClass, String usage)
          Overrides the usage decided by JCMS and previous plugins
 String getTemplateUsage(Data data, String usage)
          Overrides the usage decided by JCMS and previous plugins
 void handleCondition(String[] conditions)
          Hook called by doInitPortlet.jsp to handle custom portlet condition.
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.jalios.jcms.plugin.PluginComponent
init
 

Field Detail

REVISION

static final String REVISION
See Also:
Constant Field Values
Method Detail

getTemplateEntry

TypeTemplateEntry getTemplateEntry(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 usage
data - the working publication
Returns:
tte the chosen TypeTemplateEntry
Since:
jcms-6.0.0
See Also:
Channel.getCurrentJcmsContext()

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 usage
dataClass - the working Class
ws - the working Workspace
Returns:
tte the chosen TypeTemplateEntry
Since:
jcms-6.0.0
See Also:
Channel.getCurrentJcmsContext()

getTemplateUsage

String getTemplateUsage(Data data,
                        String usage)
Overrides the usage decided by JCMS and previous plugins

Parameters:
data - the working data
usage - is the current usage
Returns:
String the overrided usage

getTemplateUsage

String getTemplateUsage(Class<?> pubClass,
                        String usage)
Overrides the usage decided by JCMS and previous plugins

Parameters:
pubClass - the class of the publication
usage - is the current usage
Returns:
String the overrided usage

getSkinTemplateUsage

String getSkinTemplateUsage(Data data,
                            String usage)
Overrides the skin usage decided by JCMS and previous plugins

Parameters:
data - the working data
usage - is the current usage
Returns:
String the overrided usage

getInnerClasses

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

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

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

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(List<String> 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

String[] getConditionLabels(String[] labels,
                            Class<? extends PortalElement> clazz,
                            String userLang)
Hook called by doEditCommonPortlet to update labels to Condition's combo box

Parameters:
labels - String[] I18N array of labels
clazz - the portlet class
userLang - the lang of the user
Returns:
String[] I18N array of labels

getConditionValues

String[] getConditionValues(String[] values,
                            Class<? extends PortalElement> clazz)
Hook called by doEditCommonPortlet to update values to Condition's combo box

Parameters:
values - String[] of values
clazz - he portlet class
Returns:
String[] an array of conditional values

handleCondition

void handleCondition(String[] conditions)
Hook called by doInitPortlet.jsp to handle custom portlet condition.

Parameters:
conditions - String array of codition for the given portlet


Copyright © 2001-2010 Jalios SA. All Rights Reserved.