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
Author:
Jean-Philippe Encausse
  • Method Details

    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • getCssFiles

      void getCssFiles(List<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:
    • 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