public abstract class

AbstractInboxContextMenuItemBuilder

extends ContextMenu.DefaultContextMenuItemBuilder
java.lang.Object
   ↳ com.microstrategy.web.app.gui.ContextMenu.DefaultContextMenuItemBuilder
     ↳ com.microstrategy.web.app.transforms.contextmenus.AbstractInboxContextMenuItemBuilder
Known Direct Subclasses

Class Overview

This class is used by Microstrategy Web as a base class for those used to populate context-menus used in the History List page.

New context-menus-builders can be created simply by extending this class and implementing three methods:

  1. getContextMenuFlag(): Used to maintain backwards compatibility, these builders check for the contextMenuFlags FormalParameter to make sure they can enabled. New builders should return in this method the flag associated with the context-menu-item, for example, a "copy" context-menu would return LEVEL_EXPORT_EXCEL.
  2. isActionEnabled(): Besides checking the context-menu flag, this method enables the builder to check for other conditions to enable the action. For example, to check whether the user has enough privileges/access control. Subclasses can ultimately delegate this logic to the transform.
  3. getEvent(): This method returns the WebEvent to execute when this menu item is selected. Also in this case, subclasses can ultimately delegate this logic to the transform.

Summary

Public Constructors
AbstractInboxContextMenuItemBuilder(Shortcut definition)
Public Methods
ContextMenuItem createItem(TransformContext context)
Creates the item and sets its javascript to submit the corresponding event using the iFrame.
boolean isItemAvailable(TransformContext context)

Returns true if the underlying Shortcut used as definition is available (based on the features defined on the <shortcut> xml.

Protected Methods
String getBoneID(TransformContext context)
Returns the bone-id used with this context-menu
abstract WebEvent getEvent(TransformContext context)
Provides the abstract class with the corresponding event to execution with this item.
String getJSCode(TransformContext context)
Returns the javascript code to use with this context-menu-item
InboxListXHTMLTransform getTransform(TransformContext context)
Helper method to retrieve the InboxListXHTMLTransform from the context.
WebMessage getWebMessage(TransformContext context)
Helper method to retrieve the WebObjectInfo from the context.
String iframeParam(InboxListXHTMLTransform transform)
abstract boolean isActionEnabled(TransformContext context)
Indicates the abstract class if the corresponding action of this item is available.
[Expand]
Inherited Methods
From class com.microstrategy.web.app.gui.ContextMenu.DefaultContextMenuItemBuilder
From class java.lang.Object
From interface com.microstrategy.web.app.gui.ContextMenuItemBuilder

Public Constructors

public AbstractInboxContextMenuItemBuilder (Shortcut definition)

Public Methods

public ContextMenuItem createItem (TransformContext context)

Creates the item and sets its javascript to submit the corresponding event using the iFrame.

Parameters
context TransformContext with context information.
Returns
  • a new instance of a ContextMenuItem.

public boolean isItemAvailable (TransformContext context)

Returns true if the underlying Shortcut used as definition is available (based on the features defined on the <shortcut> xml.

If this method returns false the context-menu-item should not be included as part of the available options in the menu.

Parameters
context TransformContext with context information.
Returns
  • true if the context-menu-item is available and should be included.

Protected Methods

protected String getBoneID (TransformContext context)

Returns the bone-id used with this context-menu

protected abstract WebEvent getEvent (TransformContext context)

Provides the abstract class with the corresponding event to execution with this item.

protected String getJSCode (TransformContext context)

Returns the javascript code to use with this context-menu-item

protected InboxListXHTMLTransform getTransform (TransformContext context)

Helper method to retrieve the InboxListXHTMLTransform from the context.

protected WebMessage getWebMessage (TransformContext context)

Helper method to retrieve the WebObjectInfo from the context.

protected String iframeParam (InboxListXHTMLTransform transform)

protected abstract boolean isActionEnabled (TransformContext context)

Indicates the abstract class if the corresponding action of this item is available.