Interface I_CmsContextMenuItem
- All Superinterfaces:
I_CmsContextMenuAction
,I_CmsHasMenuItemVisibility
- All Known Implementing Classes:
CmsContextMenuActionItem
,CmsSubmenu
-
Method Summary
Modifier and TypeMethodDescriptionvoid
executeAction
(I_CmsDialogContext context) Executes the context menu action given a dialog context.getId()
Gets the id.float
getOrder()
Integer attribute which is used to order menu items.Gets the id of the parent entry.int
Gets the priority.Gets the title.getVisibility
(CmsObject cms, List<CmsResource> resources) Computes the visibility for this context menu items with the given CMS context and resources.boolean
Returns true if this is a leaf item, i.e.Methods inherited from interface org.opencms.ui.contextmenu.I_CmsHasMenuItemVisibility
getVisibility
-
Method Details
-
executeAction
Executes the context menu action given a dialog context.- Specified by:
executeAction
in interfaceI_CmsContextMenuAction
- Parameters:
context
- the dialog context
-
getId
Gets the id.The id does not need to be unique among all context menu items which are in use in the system, but when multiple menu items with the same id are available for a given context menu, only one of them will be picked, based on the priority (a higher priority context menu item will be preferred to one with a lower priority.
- Returns:
- the id
-
getOrder
float getOrder()Integer attribute which is used to order menu items.Items with a higher 'order' value will appear after items with a lower order at the same tree level.
- Returns:
- the order
-
getParentId
Gets the id of the parent entry.If this returns null, the context menu item will be inserted at the root level of the context menu, otherwise, it will be added I_CmsContextMenuActionas a sub-entry of the context menu entry with the given id (if such an entry exists; otherwise, the child entry will be ignored).
- Returns:
- the parent id
-
getPriority
int getPriority()Gets the priority.If multiple context menu items with the same id are available for a menu, the one with the highest priority will be picked.
- Returns:
- the priority
-
getTitle
Gets the title.- Parameters:
locale
- the locale- Returns:
- the title
-
getVisibility
Computes the visibility for this context menu items with the given CMS context and resources.- Specified by:
getVisibility
in interfaceI_CmsHasMenuItemVisibility
- Parameters:
cms
- the current CMS contextresources
- the resources for which the context menu is being opened- Returns:
- the visibility of the context menu item
-
isLeafItem
boolean isLeafItem()Returns true if this is a leaf item, i.e. an item which has no child items.- Returns:
- true if this is a leaf item
-