Class AbstractInboxContextMenuItemBuilder
- java.lang.Object
 - 
- com.microstrategy.web.app.gui.ContextMenu.DefaultContextMenuItemBuilder
 - 
- com.microstrategy.web.app.transforms.contextmenus.AbstractInboxContextMenuItemBuilder
 
 
 
- 
- All Implemented Interfaces:
 ContextMenuItemBuilder
- Direct Known Subclasses:
 InboxDelete,InboxDetails,InboxExport,InboxPDF,InboxRename,InboxUnread
public abstract class AbstractInboxContextMenuItemBuilder extends ContextMenu.DefaultContextMenuItemBuilder
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:
- getContextMenuFlag(): Used to maintain backwards compatibility, these builders
      check for the 
contextMenuFlagsFormalParameter 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 returnInboxListXHTMLTransform.LEVEL_EXPORT_EXCEL. - 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.
 - getEvent(): This method returns the 
WebEventto execute when this menu item is selected. Also in this case, subclasses can ultimately delegate this logic to the transform. 
- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
- 
Constructor Summary
Constructors Constructor Description AbstractInboxContextMenuItemBuilder(Shortcut definition) 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ContextMenuItemcreateItem(TransformContext context)Creates the item and sets its javascript to submit the corresponding event using the iFrame.protected java.lang.StringgetBoneID(TransformContext context)Returns the bone-id used with this context-menuprotected abstract WebEventgetEvent(TransformContext context)Provides the abstract class with the corresponding event to execution with this item.protected java.lang.StringgetJSCode(TransformContext context)Returns the javascript code to use with this context-menu-itemprotected InboxListXHTMLTransformgetTransform(TransformContext context)Helper method to retrieve the InboxListXHTMLTransform from the context.protected WebMessagegetWebMessage(TransformContext context)Helper method to retrieve the WebObjectInfo from the context.protected java.lang.StringiframeParam(InboxListXHTMLTransform transform)protected abstract booleanisActionEnabled(TransformContext context)Indicates the abstract class if the corresponding action of this item is available.booleanisItemAvailable(TransformContext context)Returnstrueif the underlyingShortcutused as definition is available (based on the features defined on the <shortcut> xml.- 
Methods inherited from class com.microstrategy.web.app.gui.ContextMenu.DefaultContextMenuItemBuilder
createItem, getDefinition, getItemKey, getScript 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
AbstractInboxContextMenuItemBuilder
public AbstractInboxContextMenuItemBuilder(Shortcut definition)
 
 - 
 
- 
Method Detail
- 
isItemAvailable
public boolean isItemAvailable(TransformContext context)
Description copied from class:ContextMenu.DefaultContextMenuItemBuilderReturns
trueif the underlyingShortcutused as definition is available (based on the features defined on the <shortcut> xml.If this method returns
falsethe context-menu-item should not be included as part of the available options in the menu.- Specified by:
 isItemAvailablein interfaceContextMenuItemBuilder- Overrides:
 isItemAvailablein classContextMenu.DefaultContextMenuItemBuilder- Parameters:
 context- TransformContext with context information.- Returns:
 trueif the context-menu-item is available and should be included.
 
- 
isActionEnabled
protected abstract boolean isActionEnabled(TransformContext context)
Indicates the abstract class if the corresponding action of this item is available. 
- 
createItem
public ContextMenuItem createItem(TransformContext context)
Creates the item and sets its javascript to submit the corresponding event using the iFrame.- Specified by:
 createItemin interfaceContextMenuItemBuilder- Overrides:
 createItemin classContextMenu.DefaultContextMenuItemBuilder- Parameters:
 context- TransformContext with context information.- Returns:
 - a new instance of a 
ContextMenuItem. 
 
- 
getJSCode
protected java.lang.String getJSCode(TransformContext context)
Returns the javascript code to use with this context-menu-item 
- 
iframeParam
protected java.lang.String iframeParam(InboxListXHTMLTransform transform)
 
- 
getTransform
protected InboxListXHTMLTransform getTransform(TransformContext context)
Helper method to retrieve the InboxListXHTMLTransform from the context. 
- 
getWebMessage
protected WebMessage getWebMessage(TransformContext context)
Helper method to retrieve the WebObjectInfo from the context. 
- 
getBoneID
protected java.lang.String getBoneID(TransformContext context)
Returns the bone-id used with this context-menu 
- 
getEvent
protected abstract WebEvent getEvent(TransformContext context)
Provides the abstract class with the corresponding event to execution with this item. 
 - 
 
 -