Class BasicCtxMenuPolicyFilter

java.lang.Object
com.jalios.jcms.policy.AbstractPolicyFilter
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
Author:
Jean-Philippe Encausse
  • Constructor Details

    • BasicCtxMenuPolicyFilter

      public BasicCtxMenuPolicyFilter()
  • Method Details

    • 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:
    • 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.
    • 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.
    • initCtxMenu

      public void initCtxMenu(GroupCtxMenu 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.
    • 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
    • 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
    • checkCtxMenuItems

      public char[] checkCtxMenuItems(GroupCtxMenu ctxMenu, Group grp, 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.
      grp - the working group
      letters - an array of letters describing menus to display
      Returns:
      char[] reorganized chars
    • 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
    • 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
    • handleCtxMenuItems

      public int handleCtxMenuItems(StringBuffer sb, GroupCtxMenu ctxMenu, Group grp, 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.
      grp - the working group
      letter - the current letter
      status - preious plugin's status
      Returns:
      int the status MENU_SKIPPED, MENU_ENABLED, MENU_DISABLED
    • 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
    • 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
    • handleCtxMenuItems

      public void handleCtxMenuItems(StringBuffer sb, GroupCtxMenu ctxMenu, Group grp)
      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.
      grp - the working group