Class CmsContextMenuActionItem
- All Implemented Interfaces:
I_CmsADEAction,I_CmsContextMenuAction,I_CmsContextMenuItem,I_CmsHasMenuItemVisibility
-
Constructor Summary
ConstructorsConstructorDescriptionCmsContextMenuActionItem(I_CmsWorkplaceAction action, String parentId, float order, int priority) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteAction(I_CmsDialogContext context) Executes the context menu action given a dialog context.Returns the client side command to execute.getId()Gets the id.Returns the optional dialog JSP.floatgetOrder()Integer attribute which is used to order menu items.Returns the optional command parameters.Gets the id of the parent entry.intGets 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.getVisibility(I_CmsDialogContext context) Gets the visibility for the current dialog context.Returns the workplace action.booleanReturns whether the ADE context is supported.booleanReturns true if this is a leaf item, i.e.
-
Constructor Details
-
CmsContextMenuActionItem
public CmsContextMenuActionItem(I_CmsWorkplaceAction action, String parentId, float order, int priority) Creates a new instance.- Parameters:
action- the action to executeparentId- the parent item idorder- the orderpriority- the priority
-
-
Method Details
-
executeAction
Description copied from interface:I_CmsContextMenuItemExecutes the context menu action given a dialog context.- Specified by:
executeActionin interfaceI_CmsContextMenuAction- Specified by:
executeActionin interfaceI_CmsContextMenuItem- Parameters:
context- the dialog context- See Also:
-
getCommandClassName
Description copied from interface:I_CmsADEActionReturns the client side command to execute.- Specified by:
getCommandClassNamein interfaceI_CmsADEAction- Returns:
- the client side command
- See Also:
-
getId
Description copied from interface:I_CmsContextMenuItemGets 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.
- Specified by:
getIdin interfaceI_CmsContextMenuItem- Returns:
- the id
- See Also:
-
getJspPath
Description copied from interface:I_CmsADEActionReturns the optional dialog JSP.- Specified by:
getJspPathin interfaceI_CmsADEAction- Returns:
- the dialog JSP
- See Also:
-
getOrder
Description copied from interface:I_CmsContextMenuItemInteger 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.
- Specified by:
getOrderin interfaceI_CmsContextMenuItem- Returns:
- the order
- See Also:
-
getParams
Description copied from interface:I_CmsADEActionReturns the optional command parameters.- Specified by:
getParamsin interfaceI_CmsADEAction- Returns:
- the command parameters
- See Also:
-
getParentId
Description copied from interface:I_CmsContextMenuItemGets 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).
- Specified by:
getParentIdin interfaceI_CmsContextMenuItem- Returns:
- the parent id
- See Also:
-
getPriority
Description copied from interface:I_CmsContextMenuItemGets 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.
- Specified by:
getPriorityin interfaceI_CmsContextMenuItem- Returns:
- the priority
- See Also:
-
getTitle
Description copied from interface:I_CmsContextMenuItemGets the title.- Specified by:
getTitlein interfaceI_CmsContextMenuItem- Parameters:
locale- the locale- Returns:
- the title
- See Also:
-
getVisibility
Description copied from interface:I_CmsContextMenuItemComputes the visibility for this context menu items with the given CMS context and resources.- Specified by:
getVisibilityin interfaceI_CmsContextMenuItem- Specified by:
getVisibilityin 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
- See Also:
-
getVisibility
Description copied from interface:I_CmsHasMenuItemVisibilityGets the visibility for the current dialog context.- Specified by:
getVisibilityin interfaceI_CmsHasMenuItemVisibility- Parameters:
context- the dialog context- Returns:
- the visibility
- See Also:
-
getWorkplaceAction
Returns the workplace action.- Returns:
- the workplace action
-
isAdeSupported
Description copied from interface:I_CmsADEActionReturns whether the ADE context is supported.- Specified by:
isAdeSupportedin interfaceI_CmsADEAction- Returns:
truein case the ADE context is supported- See Also:
-
isLeafItem
Description copied from interface:I_CmsContextMenuItemReturns true if this is a leaf item, i.e. an item which has no child items.- Specified by:
isLeafItemin interfaceI_CmsContextMenuItem- Returns:
- true if this is a leaf item
- See Also:
-