public class CmsContextMenuActionItem extends java.lang.Object implements I_CmsContextMenuItem, I_CmsADEAction
| Constructor and Description |
|---|
CmsContextMenuActionItem(I_CmsWorkplaceAction action,
java.lang.String parentId,
float order,
int priority)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
executeAction(I_CmsDialogContext context)
Executes the context menu action given a dialog context.
|
java.lang.String |
getCommandClassName()
Returns the client side command to execute.
|
java.lang.String |
getId()
Gets the id.
|
java.lang.String |
getJspPath()
Returns the optional dialog JSP.
|
float |
getOrder()
Integer attribute which is used to order menu items.
|
java.util.Map<java.lang.String,java.lang.String> |
getParams()
Returns the optional command parameters.
|
java.lang.String |
getParentId()
Gets the id of the parent entry.
|
int |
getPriority()
Gets the priority.
|
java.lang.String |
getTitle(java.util.Locale locale)
Gets the title.
|
CmsMenuItemVisibilityMode |
getVisibility(CmsObject cms,
java.util.List<CmsResource> resources)
Computes the visibility for this context menu items with the given CMS context and resources.
|
CmsMenuItemVisibilityMode |
getVisibility(I_CmsDialogContext context)
Gets the visibility for the current dialog context.
|
I_CmsWorkplaceAction |
getWorkplaceAction()
Returns the workplace action.
|
boolean |
isAdeSupported()
Returns whether the ADE context is supported.
|
boolean |
isLeafItem()
Returns true if this is a leaf item, i.e. an item which has no child items.
|
public CmsContextMenuActionItem(I_CmsWorkplaceAction action, java.lang.String parentId, float order, int priority)
action - the action to executeparentId - the parent item idorder - the orderpriority - the prioritypublic void executeAction(I_CmsDialogContext context)
I_CmsContextMenuItemexecuteAction in interface I_CmsContextMenuActionexecuteAction in interface I_CmsContextMenuItemcontext - the dialog contextI_CmsContextMenuItem.executeAction(org.opencms.ui.I_CmsDialogContext)public java.lang.String getCommandClassName()
I_CmsADEActiongetCommandClassName in interface I_CmsADEActionI_CmsADEAction.getCommandClassName()public java.lang.String getId()
I_CmsContextMenuItemThe 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.
getId in interface I_CmsContextMenuItemI_CmsContextMenuItem.getId()public java.lang.String getJspPath()
I_CmsADEActiongetJspPath in interface I_CmsADEActionI_CmsADEAction.getJspPath()public float getOrder()
I_CmsContextMenuItemItems with a higher 'order' value will appear after items with a lower order at the same tree level.
getOrder in interface I_CmsContextMenuItemI_CmsContextMenuItem.getOrder()public java.util.Map<java.lang.String,java.lang.String> getParams()
I_CmsADEActiongetParams in interface I_CmsADEActionI_CmsADEAction.getParams()public java.lang.String getParentId()
I_CmsContextMenuItemIf 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).
getParentId in interface I_CmsContextMenuItemI_CmsContextMenuItem.getParentId()public int getPriority()
I_CmsContextMenuItemIf multiple context menu items with the same id are available for a menu, the one with the highest priority will be picked.
getPriority in interface I_CmsContextMenuItemI_CmsContextMenuItem.getPriority()public java.lang.String getTitle(java.util.Locale locale)
I_CmsContextMenuItemgetTitle in interface I_CmsContextMenuItemlocale - the localeI_CmsContextMenuItem.getTitle(java.util.Locale)public CmsMenuItemVisibilityMode getVisibility(CmsObject cms, java.util.List<CmsResource> resources)
I_CmsContextMenuItemgetVisibility in interface I_CmsContextMenuItemgetVisibility in interface I_CmsHasMenuItemVisibilitycms - the current CMS contextresources - the resources for which the context menu is being openedI_CmsContextMenuItem.getVisibility(org.opencms.file.CmsObject, java.util.List)public CmsMenuItemVisibilityMode getVisibility(I_CmsDialogContext context)
I_CmsHasMenuItemVisibilitygetVisibility in interface I_CmsHasMenuItemVisibilitycontext - the dialog contextI_CmsHasMenuItemVisibility.getVisibility(org.opencms.ui.I_CmsDialogContext)public I_CmsWorkplaceAction getWorkplaceAction()
public boolean isAdeSupported()
I_CmsADEActionisAdeSupported in interface I_CmsADEActiontrue in case the ADE context is supportedI_CmsADEAction.isAdeSupported()public boolean isLeafItem()
I_CmsContextMenuItemisLeafItem in interface I_CmsContextMenuItemI_CmsContextMenuItem.isLeafItem()