com.jalios.jcms.policy
Class BasicWidgetPolicyFilter

java.lang.Object
  extended by com.jalios.jcms.policy.AbstractPolicyFilter
      extended by com.jalios.jcms.policy.BasicWidgetPolicyFilter
All Implemented Interfaces:
PluginComponent, PolicyFilter, WidgetPolicyFilter, Comparable

public class BasicWidgetPolicyFilter
extends AbstractPolicyFilter
implements WidgetPolicyFilter, PluginComponent

This class allow users to customize behaviour of widgets by re-writing call-back methods.

Since:
jcms-5.5.0
Version:
$Revision: 27692 $
Author:
Jean-Philippe Encausse
See Also:
WidgetPolicyFilter

Field Summary
static String REVISION
           
 
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order
 
Constructor Summary
BasicWidgetPolicyFilter()
           
 
Method Summary
 String getTreeCatNodeExtraContent(TreeCat treecat, String extraContent, Category cat, int level, int pubcount)
          This method is called by TreeCat to append some specific content for each category node or leaf.
 boolean init(Plugin plugin)
          Initialize the component with the given plugin configuration
 String updateCSS(String css, AbstractWidget widget)
          This method is called by all widget to update the css configuration.
 String updateHiddenActions(String hiddenActions, AbstractWidget widget)
          This method is called by all widget to update the hidden actions configuration.
 
Methods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
compareTo, equals, getOrder, setOrder
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

BasicWidgetPolicyFilter

public BasicWidgetPolicyFilter()
Method Detail

init

public boolean init(Plugin plugin)
Description copied from interface: PluginComponent
Initialize the component with the given plugin configuration

Specified by:
init in interface PluginComponent
Parameters:
plugin - the calling plugin
Returns:
true if the component has been correctly initialized.
Since:
jcms-5.7.1
See Also:
PluginComponent.init(Plugin)

updateHiddenActions

public String updateHiddenActions(String hiddenActions,
                                  AbstractWidget widget)
Description copied from interface: WidgetPolicyFilter
This method is called by all widget to update the hidden actions configuration. This method is usefull to set a custom behavior for all given widget. Remove all: ABCDEFGHIKLMPQRSTUX C - Create S - Select (Pub Chooser) R - Remove T - Trash U - Up / Left D - Down / Right E - Edit A - Add L - Id (data link) K - Calendar I - Image Chooser (upload) X - Doc Chooser P - File chooser M - Media chooser F - Color chooser B - DBRecord chooser Q - Query chooser H - Member chooser G - Group chooser

Specified by:
updateHiddenActions in interface WidgetPolicyFilter
Parameters:
hiddenActions - the action set to the widget
widget - the calling widget
Returns:
String null or hiddenActions to do nothing otherwise a custom String descripting the hiddenActions
See Also:
AbstractWidget.setHiddenActions(String)

updateCSS

public String updateCSS(String css,
                        AbstractWidget widget)
Description copied from interface: WidgetPolicyFilter
This method is called by all widget to update the css configuration. This method is usefull to set a custom look for all given widget.

Specified by:
updateCSS in interface WidgetPolicyFilter
Parameters:
css - the current css
widget - the calling widget
Returns:
null or css otherwise a custom String descripting the css
See Also:
WidgetPolicyFilter.updateCSS(String, AbstractWidget)

getTreeCatNodeExtraContent

public String getTreeCatNodeExtraContent(TreeCat treecat,
                                         String extraContent,
                                         Category cat,
                                         int level,
                                         int pubcount)
Description copied from interface: WidgetPolicyFilter
This method is called by TreeCat to append some specific content for each category node or leaf. First argument TreeCat is used to retrieve configuration. Otherwise channel.getCurrentServletRequest() may be called to read contextual information.

Specified by:
getTreeCatNodeExtraContent in interface WidgetPolicyFilter
Parameters:
treecat - the TreeCat calling this method
extraContent - the previous extraContent
cat - the current category
level - the level asked to be displayed
pubcount - the count of publication if it has been calculated
Returns:
String HTML extra content to append to node
See Also:
WidgetPolicyFilter.getTreeCatNodeExtraContent(TreeCat, String, Category, int, int)


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