com.jalios.jcms.policy
Class BasicCtxMenuPolicyFilter

java.lang.Object
  extended by com.jalios.jcms.policy.AbstractPolicyFilter
      extended by com.jalios.jcms.policy.BasicCtxMenuPolicyFilter
All Implemented Interfaces:
CtxMenuConstants, PluginComponent, CtxMenuPolicyFilter, PolicyFilter, Comparable

public class BasicCtxMenuPolicyFilter
extends AbstractPolicyFilter
implements CtxMenuPolicyFilter, PluginComponent

This class provides hooks for contextual menu rendering.

Since:
jcms-5.7.0
Version:
$Revision: 26149 $
Author:
Jean-Philippe Encausse

Field Summary
static String REVISION
           
 
Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter
order
 
Fields inherited from interface com.jalios.jcms.ajax.CtxMenuConstants
DISABLED, FLAG_CADDY, FLAG_DELETE, FLAG_EDIT, FLAG_EXPORT, FLAG_SEPARATOR, INFO_ICON, MENU_DISABLED, MENU_ENABLED, MENU_SKIPPED, NO_ICON
 
Constructor Summary
BasicCtxMenuPolicyFilter()
           
 
Method Summary
 char[] checkCtxMenuItems(CategoryCtxMenu ctxMenu, Category cat, char[] letters)
          Checks the processed contextual menu
 char[] checkCtxMenuItems(MemberCtxMenu ctxMenu, Member mbr, char[] letters)
          Checks the processed contextual menu
 char[] checkCtxMenuItems(PublicationCtxMenu ctxMenu, Publication pub, char[] letters)
          Checks the processed contextual menu
 char[] checkCtxMenuItems(WidgetCtxMenu ctxMenu, String menuItems, String chooserType, String chooserId, char[] letters)
          Checks the processed contextual menu
 void handleCtxMenuItems(StringBuffer sb, CategoryCtxMenu ctxMenu, Category cat)
          Handle the current StringBuffer to append custom content for the given Category
 int handleCtxMenuItems(StringBuffer sb, CategoryCtxMenu ctxMenu, Category cat, char letter, int status)
          Handle the current StringBuffer to append custom content for the given Category and given Letter
 void handleCtxMenuItems(StringBuffer sb, MemberCtxMenu ctxMenu, Member mbr)
          Handle the current StringBuffer to append custom content for the given Member
 int handleCtxMenuItems(StringBuffer sb, MemberCtxMenu ctxMenu, Member mbr, char letter, int status)
          Handle the current StringBuffer to append custom content for the given Member and given Letter
 void handleCtxMenuItems(StringBuffer sb, PublicationCtxMenu ctxMenu, Publication pub)
          Handle the current StringBuffer to append custom content for the given Publication
 int handleCtxMenuItems(StringBuffer sb, PublicationCtxMenu ctxMenu, Publication pub, char letter, int status)
          Handle the current StringBuffer to append custom content for the given Publication and given Letter
 void handleCtxMenuItems(StringBuffer sb, WidgetCtxMenu ctxMenu, String menuItems, String chooserType, String chooserId)
          Handle the current StringBuffer to append custom content for the given Member
 int handleCtxMenuItems(StringBuffer sb, WidgetCtxMenu ctxMenu, String menuItems, String chooserType, String chooserId, char letter, int status)
          Handle the current StringBuffer to append custom content for the given Member and given Letter
 boolean init(Plugin plugin)
          Initialize the component with the given plugin configuration
 void initCtxMenu(CategoryCtxMenu ctxMenu, JcmsJspContext jcmsContext)
          Initialize the contextual menu.
This method is called when the Context Menu object class is created.
 void initCtxMenu(MemberCtxMenu ctxMenu, JcmsJspContext jcmsContext)
          Initialize the contextual menu.
This method is called when the Context Menu object class is created.
 void initCtxMenu(PublicationCtxMenu ctxMenu, JcmsJspContext jcmsContext)
          Initialize the contextual menu.
This method is called when the Context Menu object class is created.
 void initCtxMenu(WidgetCtxMenu ctxMenu, JcmsJspContext jcmsContext)
          Initialize the contextual menu.
This method is called when the Context Menu object class is created.
 
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

BasicCtxMenuPolicyFilter

public BasicCtxMenuPolicyFilter()
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)

initCtxMenu

public void initCtxMenu(PublicationCtxMenu ctxMenu,
                        JcmsJspContext jcmsContext)
Description copied from interface: CtxMenuPolicyFilter
Initialize the contextual menu.
This method is called when the Context Menu object class is created.

Specified by:
initCtxMenu in interface CtxMenuPolicyFilter
Parameters:
ctxMenu - the instance of the context menu created during initial request.
jcmsContext - the JcmsJspContext of the request during which the context menu object was created.
See Also:
CtxMenuPolicyFilter.initCtxMenu(PublicationCtxMenu, JcmsJspContext)

initCtxMenu

public void initCtxMenu(CategoryCtxMenu ctxMenu,
                        JcmsJspContext jcmsContext)
Description copied from interface: CtxMenuPolicyFilter
Initialize the contextual menu.
This method is called when the Context Menu object class is created.

Specified by:
initCtxMenu in interface CtxMenuPolicyFilter
Parameters:
ctxMenu - the instance of the context menu created during initial request.
jcmsContext - the JcmsJspContext of the request during which the context menu object was created.
See Also:
CtxMenuPolicyFilter.initCtxMenu(CategoryCtxMenu, JcmsJspContext)

initCtxMenu

public void initCtxMenu(MemberCtxMenu ctxMenu,
                        JcmsJspContext jcmsContext)
Description copied from interface: CtxMenuPolicyFilter
Initialize the contextual menu.
This method is called when the Context Menu object class is created.

Specified by:
initCtxMenu in interface CtxMenuPolicyFilter
Parameters:
ctxMenu - the instance of the context menu created during initial request.
jcmsContext - the JcmsJspContext of the request during which the context menu object was created.
See Also:
CtxMenuPolicyFilter.initCtxMenu(MemberCtxMenu, JcmsJspContext)

initCtxMenu

public void initCtxMenu(WidgetCtxMenu ctxMenu,
                        JcmsJspContext jcmsContext)
Description copied from interface: CtxMenuPolicyFilter
Initialize the contextual menu.
This method is called when the Context Menu object class is created.

Specified by:
initCtxMenu in interface CtxMenuPolicyFilter
Parameters:
ctxMenu - the instance of the context menu created during initial request.
jcmsContext - the JcmsJspContext of the request during which the context menu object was created.
See Also:
CtxMenuPolicyFilter.initCtxMenu(WidgetCtxMenu, JcmsJspContext)

checkCtxMenuItems

public char[] checkCtxMenuItems(PublicationCtxMenu ctxMenu,
                                Publication pub,
                                char[] letters)
Description copied from interface: CtxMenuPolicyFilter
Checks the processed contextual menu

Specified by:
checkCtxMenuItems in interface CtxMenuPolicyFilter
Parameters:
ctxMenu - the instance of the context menu created during initial request.
pub - the working publication
letters - an array of letters describing menus to display
Returns:
char[] reorganized chars
See Also:
CtxMenuPolicyFilter.checkCtxMenuItems(PublicationCtxMenu, Publication, char[])

checkCtxMenuItems

public char[] checkCtxMenuItems(CategoryCtxMenu ctxMenu,
                                Category cat,
                                char[] letters)
Description copied from interface: CtxMenuPolicyFilter
Checks the processed contextual menu

Specified by:
checkCtxMenuItems in interface CtxMenuPolicyFilter
Parameters:
ctxMenu - the instance of the context menu created during initial request.
cat - the working category
letters - an array of letters describing menus to display
Returns:
char[] reorganized chars
See Also:
CtxMenuPolicyFilter.checkCtxMenuItems(CategoryCtxMenu, Category, char[])

checkCtxMenuItems

public char[] checkCtxMenuItems(MemberCtxMenu ctxMenu,
                                Member mbr,
                                char[] letters)
Description copied from interface: CtxMenuPolicyFilter
Checks the processed contextual menu

Specified by:
checkCtxMenuItems in interface CtxMenuPolicyFilter
Parameters:
ctxMenu - the instance of the context menu created during initial request.
mbr - the working member
letters - an array of letters describing menus to display
Returns:
char[] reorganized chars
See Also:
CtxMenuPolicyFilter.checkCtxMenuItems(MemberCtxMenu, Member, char[])

checkCtxMenuItems

public char[] checkCtxMenuItems(WidgetCtxMenu ctxMenu,
                                String menuItems,
                                String chooserType,
                                String chooserId,
                                char[] letters)
Description copied from interface: CtxMenuPolicyFilter
Checks the processed contextual menu

Specified by:
checkCtxMenuItems in interface CtxMenuPolicyFilter
Parameters:
ctxMenu - the instance of the context menu created during initial request.
letters - an array of letters describing menus to display
Returns:
char[] reorganized chars
See Also:
CtxMenuPolicyFilter.checkCtxMenuItems(WidgetCtxMenu, String, String, String, char[])

handleCtxMenuItems

public int handleCtxMenuItems(StringBuffer sb,
                              PublicationCtxMenu ctxMenu,
                              Publication pub,
                              char letter,
                              int status)
Description copied from interface: CtxMenuPolicyFilter
Handle the current StringBuffer to append custom content for the given Publication and given Letter

Specified by:
handleCtxMenuItems in interface CtxMenuPolicyFilter
Parameters:
sb - the StringBuffer to update
ctxMenu - the instance of the context menu created during initial request.
pub - the working publication
letter - the current letter
status - preious plugin's status
Returns:
int the status MENU_SKIPPED, MENU_ENABLED, MENU_DISABLED
See Also:
CtxMenuPolicyFilter.handleCtxMenuItems(StringBuffer, PublicationCtxMenu, Publication, char, int)

handleCtxMenuItems

public int handleCtxMenuItems(StringBuffer sb,
                              CategoryCtxMenu ctxMenu,
                              Category cat,
                              char letter,
                              int status)
Description copied from interface: CtxMenuPolicyFilter
Handle the current StringBuffer to append custom content for the given Category and given Letter

Specified by:
handleCtxMenuItems in interface CtxMenuPolicyFilter
Parameters:
sb - the StringBuffer to update
ctxMenu - the instance of the context menu created during initial request.
cat - the working category
letter - the current letter
status - preious plugin's status
Returns:
int the status MENU_SKIPPED, MENU_ENABLED, MENU_DISABLED
See Also:
CtxMenuPolicyFilter.handleCtxMenuItems(StringBuffer, CategoryCtxMenu, Category, char, int)

handleCtxMenuItems

public int handleCtxMenuItems(StringBuffer sb,
                              MemberCtxMenu ctxMenu,
                              Member mbr,
                              char letter,
                              int status)
Description copied from interface: CtxMenuPolicyFilter
Handle the current StringBuffer to append custom content for the given Member and given Letter

Specified by:
handleCtxMenuItems in interface CtxMenuPolicyFilter
Parameters:
sb - the StringBuffer to update
ctxMenu - the instance of the context menu created during initial request.
mbr - the working member
letter - the current letter
status - preious plugin's status
Returns:
int the status MENU_SKIPPED, MENU_ENABLED, MENU_DISABLED
See Also:
CtxMenuPolicyFilter.handleCtxMenuItems(StringBuffer, MemberCtxMenu, Member, char, int)

handleCtxMenuItems

public int handleCtxMenuItems(StringBuffer sb,
                              WidgetCtxMenu ctxMenu,
                              String menuItems,
                              String chooserType,
                              String chooserId,
                              char letter,
                              int status)
Description copied from interface: CtxMenuPolicyFilter
Handle the current StringBuffer to append custom content for the given Member and given Letter

Specified by:
handleCtxMenuItems in interface CtxMenuPolicyFilter
Parameters:
sb - the StringBuffer to update
ctxMenu - the instance of the context menu created during initial request.
letter - the current letter
status - preious plugin's status
Returns:
int the status MENU_SKIPPED, MENU_ENABLED, MENU_DISABLED
See Also:
CtxMenuPolicyFilter.handleCtxMenuItems(StringBuffer, WidgetCtxMenu, String, String, String, char, int)

handleCtxMenuItems

public void handleCtxMenuItems(StringBuffer sb,
                               PublicationCtxMenu ctxMenu,
                               Publication pub)
Description copied from interface: CtxMenuPolicyFilter
Handle the current StringBuffer to append custom content for the given Publication

Specified by:
handleCtxMenuItems in interface CtxMenuPolicyFilter
Parameters:
sb - the StringBuffer to update
ctxMenu - the instance of the context menu created during initial request.
pub - the working publication
See Also:
CtxMenuPolicyFilter.handleCtxMenuItems(StringBuffer, PublicationCtxMenu, Publication)

handleCtxMenuItems

public void handleCtxMenuItems(StringBuffer sb,
                               CategoryCtxMenu ctxMenu,
                               Category cat)
Description copied from interface: CtxMenuPolicyFilter
Handle the current StringBuffer to append custom content for the given Category

Specified by:
handleCtxMenuItems in interface CtxMenuPolicyFilter
Parameters:
sb - the StringBuffer to update
ctxMenu - the instance of the context menu created during initial request.
cat - the working category
See Also:
CtxMenuPolicyFilter.handleCtxMenuItems(StringBuffer, CategoryCtxMenu, Category)

handleCtxMenuItems

public void handleCtxMenuItems(StringBuffer sb,
                               MemberCtxMenu ctxMenu,
                               Member mbr)
Description copied from interface: CtxMenuPolicyFilter
Handle the current StringBuffer to append custom content for the given Member

Specified by:
handleCtxMenuItems in interface CtxMenuPolicyFilter
Parameters:
sb - the StringBuffer to update
ctxMenu - the instance of the context menu created during initial request.
mbr - the working member
See Also:
CtxMenuPolicyFilter.handleCtxMenuItems(StringBuffer, MemberCtxMenu, Member)

handleCtxMenuItems

public void handleCtxMenuItems(StringBuffer sb,
                               WidgetCtxMenu ctxMenu,
                               String menuItems,
                               String chooserType,
                               String chooserId)
Description copied from interface: CtxMenuPolicyFilter
Handle the current StringBuffer to append custom content for the given Member

Specified by:
handleCtxMenuItems in interface CtxMenuPolicyFilter
Parameters:
sb - the StringBuffer to update
ctxMenu - the instance of the context menu created during initial request.
See Also:
CtxMenuPolicyFilter.handleCtxMenuItems(StringBuffer, WidgetCtxMenu, String, String, String)


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