Class FolderOpenInLibrary
- java.lang.Object
 - 
- com.microstrategy.web.app.gui.ContextMenu.DefaultContextMenuItemBuilder
 - 
- com.microstrategy.web.app.transforms.contextmenus.AbstractFolderContextMenuItemBuilder
 - 
- com.microstrategy.web.app.transforms.contextmenus.FolderOpenInLibrary
 
 
 
 
- 
- All Implemented Interfaces:
 ContextMenuItemBuilder
public class FolderOpenInLibrary extends AbstractFolderContextMenuItemBuilder
 
- 
- 
Constructor Summary
Constructors Constructor Description FolderOpenInLibrary(Shortcut definition) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intgetContextMenuFlag()This is deprecated.java.lang.StringgetItemKey(TransformContext context)Needed to override this method so that it would create a new menu item for each unique Dossier.protected java.lang.StringgetJSCode(TransformContext context)Calls openInLibrary(docId) function in DHTML.js file to use the LibraryHelper.js class to construct the url and open the Dossier in Library.protected booleanisActionEnabled(TransformContext context)Only enable this action if the object is a Dossier(formerly VI) with execute privileges and if a link to Library application exists.- 
Methods inherited from class com.microstrategy.web.app.transforms.contextmenus.AbstractFolderContextMenuItemBuilder
createItem, getEvent, getLinkForMenuItem, getObjectInfo, getTarget, getTransform, iframeParam, isItemAvailable 
- 
Methods inherited from class com.microstrategy.web.app.gui.ContextMenu.DefaultContextMenuItemBuilder
createItem, getDefinition, getScript 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
FolderOpenInLibrary
public FolderOpenInLibrary(Shortcut definition)
 
 - 
 
- 
Method Detail
- 
getContextMenuFlag
protected int getContextMenuFlag()
This is deprecated. The folderContextMenu.xml file is used to customize the context menu. However, it is still a required function to implement.- Specified by:
 getContextMenuFlagin classAbstractFolderContextMenuItemBuilder
 
- 
isActionEnabled
protected boolean isActionEnabled(TransformContext context)
Only enable this action if the object is a Dossier(formerly VI) with execute privileges and if a link to Library application exists.- Specified by:
 isActionEnabledin classAbstractFolderContextMenuItemBuilder- Returns:
 - true if the above conditions are true and false otherwise
 
 
- 
getJSCode
protected java.lang.String getJSCode(TransformContext context)
Calls openInLibrary(docId) function in DHTML.js file to use the LibraryHelper.js class to construct the url and open the Dossier in Library.- Overrides:
 getJSCodein classAbstractFolderContextMenuItemBuilder
 
- 
getItemKey
public java.lang.String getItemKey(TransformContext context)
Needed to override this method so that it would create a new menu item for each unique Dossier. Otherwise getJSCode will only be called once and every Dossier will try to open to the first encountered Dossier on the folder browsing page.- Specified by:
 getItemKeyin interfaceContextMenuItemBuilder- Overrides:
 getItemKeyin classAbstractFolderContextMenuItemBuilder- Parameters:
 context- The context for context menu item creation- Returns:
 - The key for the context menu item if created using the context. By default 
nullwill be return, which means build has no knowledge about the item key. Then context menu item may generate the key by itself. For builder who wants avoid unnecessary item creation should take advantage of this method by overriding with a meaningful implementation. 
 
 - 
 
 -