public abstract class

AbstractReportGridCellHeader

extends AbstractReportGridDisplayCell
implements ReportGridCellHeader
java.lang.Object
   ↳ com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
     ↳ com.microstrategy.web.app.transforms.AbstractReportGridCellHeader
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This class serves as base implementation for other classes such as ReportGridCellColHeaderImpl and ReportGridCellRowHeaderImpl which render Cell Header information of a Grid to be presented to the user.

Summary

Nested Classes
class AbstractReportGridCellHeader.AxisDepth  
[Expand]
Inherited Constants
From class com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
From interface com.microstrategy.web.app.transforms.ReportGridDisplayCell
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
Public Constructors
AbstractReportGridCellHeader()
Public Methods
boolean canAddThresholds()
Utility method for determining if the cell object is enabled for displaying the user the option to add threshold to it
boolean canDrill()
Utility methood for determining if the cell object is enabled for displaying the user the option to drill on it
boolean canDrillAdvanced()
Utility methood for determining if the cell object is enabled for displaying the user the option for advanced drilling on it
boolean canEditControl()
Utility methood for determining if the cell object is enabled for displaying the user the option to edit control
boolean canFilterOn()
Utility methood for determining if the cell object is enabled for displaying the user the option to filter on it
boolean canFilterOnSelection()
boolean canFormat()
Utility methood for determining if the cell object is enabled for displaying the user the option to format it
boolean canHaveDerivedElements()
boolean canHyperLink()
Utility method for determining if the cell object is enabled for displaying the user the option to navigate to custom hyperlinks
boolean canMetricFilterOn()
Utility method for determining if the cell object is enabled for displaying the user the option to apply a metric filter on it
boolean canModifyAttributeForm()
Utility methood for determining if the cell object is enabled for displaying the user the option to modify the attribute forms on it
boolean canOpenAlerts()
boolean canQuickGroup()
boolean canRemoveFromGrid()
Utility methood for determining if the cell object is enabled for displaying the user the option to remove it from the grid.
boolean canRemoveFromReport()
Utility methood for determining if the cell object is enabled for displaying the user the option to remove it from the report
boolean canRename()
Utility methood for determining if the cell object is enabled for displaying the user the option to rename it
WebEvent getDerivedElementsEvent()
WebDrillPath getDrillPathWithHighImportance()
generate drilling url parameters for DHTML mode
WebEvent getFilterOnEvent()
Get the event for filter on the cell header instance
WebEvent getInsertMetricPercentToTotalEvent(int axisBitMap)
Get the event for inserting a new metric based on Percent to Total
WebEvent getInsertMetricPercentToTotalEvent(int axisBitMap, String attributeID)
Get the event for inserting a new metric based on Percent to Total
WebEvent getInsertMetricRankEvent(String attributeID, int sortOrder)
Get the event for inserting a new metric based on a rank
WebEvent getInsertMetricTransformationEvent(String transformationID, int formulaType)
Get the event for inserting a new metric based on a transformation
int getKey()
WebEvent getOpenFormatEditorEvent()
Get the event for opening the format editor for the requested target.
WebEvent getRenameEvent()
Get the event for renaming the current cell
WebEvent getSetFormatEditorTargetEvent()
Get the event for setting the current target of the format editor to be this cell instance
WebHeader getWebHeader()
Obtain the WebHeader instance associated with this class
WebTemplateMetric getWebTemplateMetric(boolean retrieve)
Obtain the WebTemplateMetric instance associated with this class
WebTemplateMetric getWebTemplateMetric()
Obtain the WebTemplateMetric instance directly associated with this class
boolean hasMetricFilterCondition()
void init(TransformContext context, WebTemplateMetric metric)
This method is called to initialize the cell in design mode.
void init(WebComponent wc, WebTemplateMetric metric, HashMap cachedObjects)
This method is deprecated. use the init(TransformContext, WebTemplateMetric) interface instead
boolean isMetric()
Indicates if the underlying object of a cell is a metric header.
boolean isMetricDrillable(WebHeader header, WebDrillPath drillPath)
return whether the header has a drillable metric
boolean isTemplateMetric(WebHeader header)
boolean isTypeMetric()
void reset()
Reset all of the instance variables.
Protected Methods
void addContextMenuAttributes(Map atts)
Obtain the tag attributes that should be added to the cell's definition for processing context menus Map instance with the attribute context menu information
void addToHeaderMetricValueJsonMap(String key, String value)
boolean canExpandCollapse()
boolean canFilter()
boolean canHyperlinkForCurrentHTMLMode()
On the OOB implementation this will return true if isDHTML returns true, but subclasses might override it.
boolean cellNeedsLink()
Utility method for determining if the current cell being displayed needs to be a link or not, for example, in case of drilling available.
void generateContent(MarkupOutput mo)
Extends generateContent by adding a URL link to the cell's text.
AnchorTag generateControlAnchor()
AnchorTag generateDrillAnchor()
Utility method for generating the AnchorTag instance with all the drill information if available for the current cell being displayed by this instance.
Tag generateDrillCheckBoxTag()
Generates the tag information for a check box for drilling, if all privileges and conditions required are met
AnchorTag generateElementAnchor()
Utility method for generating the AnchorTag instance for the element being rendered .
Tag generateFilterOnSelectionCheckBoxTag()
Generates the tag information for a check box for filter on selection, if all privileges and conditions required are met
AnchorTag generateHyperLinkAnchor()
void generateRAPreContent(MarkupOutput mo)
AnchorTag generateStaticHyperLinkAnchor()
void generateText(MarkupOutput mo)
Generate the text of the cell
String generateTooltipContent()
Generates the string with the tooltip information to be assigned to the TITLE attribute of the cell tag for this instance
AbstractReportGridCellHeader.AxisDepth getAxisDepth()
Depth is 1-based
void getCellAttributes(Map attributes)
void getCellLevelAttributes(Map cell)
CTY indicates the cell type UPT indicates the template unit that it belongs to, in the format of "axis,position"
String getDrillParametersForDHTML(WebDrillPath dp)
Returns parameters required for drilling when using javascript for cells that use WebHeader as their underlying SDK object.
int getMaxPosition()
String getMetricID()
String getOnClickAttForDrillPath(WebDrillPath drillPathWithHighImportance)
Some subclases wont need the onclick attribute at all, overriding the method and returning null will help on that case
String getParentElementIndex()
String getParentFormValueIndex()
int getPosition()
WebEvent getSelectorEvent()
get the selector Event to gnereate the anchor in HTML mode
StringBuffer getURLBuffer()
This method is deprecated. if the link information for drilling should be modified, please update the generateDrillAnchor() method.
boolean hasRuntimeUnitLimit()
abstract boolean isDrillAvailable()
abstract boolean isDrillPathAvailable(WebHeader header)
Utility method to determine if the current header has drill information available
boolean isHeaderMVJsonMovable()
boolean isTotal()
void processHyperLinkNavigationInfo()
void setWebHeader(WebHeader header)
Define the WebHeader instance to be rendered.
void setWebTemplateMetric(WebTemplateMetric metric)
Define the WebTemplateMetric instance to be rendered.
boolean shouldHiliteOnServer()
Indicate if it's necessary to hilight the selected element on server side.
boolean showPivotForLastAttrRowInCol()
When 'Remove Extra Column' is cheched, and a Attribute is placed as last row in Column then its title is not visible.
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
From class java.lang.Object
From interface com.microstrategy.web.app.transforms.ReportGridCellHeader
From interface com.microstrategy.web.app.transforms.ReportGridDisplayCell

Public Constructors

public AbstractReportGridCellHeader ()

Public Methods

public boolean canAddThresholds ()

Utility method for determining if the cell object is enabled for displaying the user the option to add threshold to it

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canDrill ()

Utility methood for determining if the cell object is enabled for displaying the user the option to drill on it

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canDrillAdvanced ()

Utility methood for determining if the cell object is enabled for displaying the user the option for advanced drilling on it

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canEditControl ()

Utility methood for determining if the cell object is enabled for displaying the user the option to edit control

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canFilterOn ()

Utility methood for determining if the cell object is enabled for displaying the user the option to filter on it

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canFilterOnSelection ()

public boolean canFormat ()

Utility methood for determining if the cell object is enabled for displaying the user the option to format it

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canHaveDerivedElements ()

public boolean canHyperLink ()

Utility method for determining if the cell object is enabled for displaying the user the option to navigate to custom hyperlinks

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canMetricFilterOn ()

Utility method for determining if the cell object is enabled for displaying the user the option to apply a metric filter on it

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canModifyAttributeForm ()

Utility methood for determining if the cell object is enabled for displaying the user the option to modify the attribute forms on it

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canOpenAlerts ()

public boolean canQuickGroup ()

public boolean canRemoveFromGrid ()

Utility methood for determining if the cell object is enabled for displaying the user the option to remove it from the grid.

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canRemoveFromReport ()

Utility methood for determining if the cell object is enabled for displaying the user the option to remove it from the report

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canRename ()

Utility methood for determining if the cell object is enabled for displaying the user the option to rename it

Returns
  • boolean value indicating if the manipulation should be enabled

public WebEvent getDerivedElementsEvent ()

public WebDrillPath getDrillPathWithHighImportance ()

generate drilling url parameters for DHTML mode

Returns
  • The drill path with high importance

public WebEvent getFilterOnEvent ()

Get the event for filter on the cell header instance

Returns
  • WebEvent instance initialized for filtering on the information of this cell

public WebEvent getInsertMetricPercentToTotalEvent (int axisBitMap)

Get the event for inserting a new metric based on Percent to Total

Parameters
axisBitMap identifier of the axis to be used for calculating the metric information. Values expected come from the EnumDSSXMLAxesBitMap enumeration.
Returns
  • WebEvent initialized with the event information for inserting a new metric.

public WebEvent getInsertMetricPercentToTotalEvent (int axisBitMap, String attributeID)

Get the event for inserting a new metric based on Percent to Total

Parameters
axisBitMap identifier of the axis to be used for calculating the metric information. Values expected come from the EnumDSSXMLAxesBitMap enumeration.
attributeID identifier of the attribute at which the metric will be calculated
Returns
  • WebEvent initialized with the event information for inserting a new metric.

public WebEvent getInsertMetricRankEvent (String attributeID, int sortOrder)

Get the event for inserting a new metric based on a rank

Parameters
attributeID identifier of the attribute at which the metric will be calculated
sortOrder int with the sort order to be used on the new rank metric. Values expected include SORT_ORDER_ASCENDING and SORT_ORDER_DESCENDING
Returns
  • WebEvent initialized with the event information for inserting a new metric.

public WebEvent getInsertMetricTransformationEvent (String transformationID, int formulaType)

Get the event for inserting a new metric based on a transformation

Parameters
transformationID identifier of the role of the transformation to be used
formulaType identifier of the type of formula to be used. Values expected come from the EnumDSSXMLMetricFormulaType enumeration
Returns
  • WebEvent initialized with the event information for inserting a new metric.

public int getKey ()

public WebEvent getOpenFormatEditorEvent ()

Get the event for opening the format editor for the requested target.

Returns
  • WebEvent initialized instance. If it could not be generated, it will return null

public WebEvent getRenameEvent ()

Get the event for renaming the current cell

Returns
  • WebEvent instance initialized with the information for renaming the current cell.

public WebEvent getSetFormatEditorTargetEvent ()

Get the event for setting the current target of the format editor to be this cell instance

Returns
  • WebEvent instance initialized for setting the target of the format editor to be the current cell instance.

public WebHeader getWebHeader ()

Obtain the WebHeader instance associated with this class

Returns
  • WebHeader instance from where the information to be rendered by this class will be retrieved.

public WebTemplateMetric getWebTemplateMetric (boolean retrieve)

Obtain the WebTemplateMetric instance associated with this class

Parameters
retrieve boolean flag that if true indicates it will search also on the header information and the template's metric collection for the metric represented here.
Returns
  • WebTemplateMetric instance from where the information to be rendered by this class will be retrieved.

public WebTemplateMetric getWebTemplateMetric ()

Obtain the WebTemplateMetric instance directly associated with this class

Returns
  • WebTemplateMetric instance from where the information to be rendered by this class will be retrieved.

public boolean hasMetricFilterCondition ()

public void init (TransformContext context, WebTemplateMetric metric)

This method is called to initialize the cell in design mode. It receives a WebTemplateMetric as the underlying SDK object.

Parameters
context TransformContext instance initialized with the grid's transform information.
metric WebTemplateMetric instance corresponding to the cell to be displayed.

public void init (WebComponent wc, WebTemplateMetric metric, HashMap cachedObjects)

This method is deprecated.
use the init(TransformContext, WebTemplateMetric) interface instead

Initialize this class with the cell information to consider for HTML generation

Parameters
wc WebComponent base instance
metric WebTemplateMetric instance related with the cell to be rendered
cachedObjects HashMap instance with information relevant to this instance for HTML generation.

public boolean isMetric ()

Indicates if the underlying object of a cell is a metric header.

Returns
  • whether the cell is containing a metric

public boolean isMetricDrillable (WebHeader header, WebDrillPath drillPath)

return whether the header has a drillable metric

Parameters
header the header object
drillPath the drill path
Returns
  • whether the header has a drillable metric

public boolean isTemplateMetric (WebHeader header)

public boolean isTypeMetric ()

public void reset ()

Reset all of the instance variables. This method is very important when improve the memory performance: we create only one instance for a particular cell type and reuse it instead of creating a new instance for each concrete grid cell. Therefore, it saves a lot of memory. For implementation of this method, please follow the workflow of how all the instance variables are initialized in the class hierarchy when a new instance is created: superclass instance variables are initialized first, subclass instance variables are initialized second. Note: for the purpose of cell reuse.

Protected Methods

protected void addContextMenuAttributes (Map atts)

Obtain the tag attributes that should be added to the cell's definition for processing context menus Map instance with the attribute context menu information

Parameters
atts Map where attributes will be appended.

protected void addToHeaderMetricValueJsonMap (String key, String value)

protected boolean canExpandCollapse ()

protected boolean canFilter ()

protected boolean canHyperlinkForCurrentHTMLMode ()

On the OOB implementation this will return true if isDHTML returns true, but subclasses might override it.

Returns
  • true if it can hyperlink for the current HTML mode.

protected boolean cellNeedsLink ()

Utility method for determining if the current cell being displayed needs to be a link or not, for example, in case of drilling available.

Returns
  • boolean value indicating if the current cell should be displayed as a link.

protected void generateContent (MarkupOutput mo)

Extends generateContent by adding a URL link to the cell's text.

Developers can either use the setContent(String) method to set any text they want to display as the cell's contents or override this method to inherit its functionality and build on top of it.

As an example, the following code could be used to extend this method to add a <BR> tag after cell's content:

 public void generateContent(MarkupOutput mo) {
     super.generateContent(mo);

     mo.append("<br>");
 }
 

Parameters
mo the output object

protected AnchorTag generateControlAnchor ()

protected AnchorTag generateDrillAnchor ()

Utility method for generating the AnchorTag instance with all the drill information if available for the current cell being displayed by this instance.

Returns
  • AnchorTag instance initialized with the drill details. If drilling is not supported given the information provided, it will return null

protected Tag generateDrillCheckBoxTag ()

Generates the tag information for a check box for drilling, if all privileges and conditions required are met

Returns
  • Tag instance initialized with the information of a check box for requesting drill manipulations. If not enabled or available, returns null

protected AnchorTag generateElementAnchor ()

Utility method for generating the AnchorTag instance for the element being rendered .

Returns
  • AnchorTag instance initialized with the drill details. If neither dashboarding controls nor drilling is supported given the information provided, it will return null

protected Tag generateFilterOnSelectionCheckBoxTag ()

Generates the tag information for a check box for filter on selection, if all privileges and conditions required are met

Returns
  • Tag instance initialized with the information of a check box for requesting a filter on selection manipulations. If not enabled or available, returns null

protected AnchorTag generateHyperLinkAnchor ()

protected void generateRAPreContent (MarkupOutput mo)

protected AnchorTag generateStaticHyperLinkAnchor ()

protected void generateText (MarkupOutput mo)

Generate the text of the cell

Parameters
mo MarkupOutput instance where the HTML contents generated will be saved

protected String generateTooltipContent ()

Generates the string with the tooltip information to be assigned to the TITLE attribute of the cell tag for this instance

Returns
  • String with the information about the tooltip to render for the current cell.

protected AbstractReportGridCellHeader.AxisDepth getAxisDepth ()

Depth is 1-based

protected void getCellAttributes (Map attributes)

protected void getCellLevelAttributes (Map cell)

CTY indicates the cell type UPT indicates the template unit that it belongs to, in the format of "axis,position"

protected String getDrillParametersForDHTML (WebDrillPath dp)

Returns parameters required for drilling when using javascript for cells that use WebHeader as their underlying SDK object.

Parameters
dp the drill path
Returns
  • String with the drill html information for the element

protected int getMaxPosition ()

protected String getMetricID ()

protected String getOnClickAttForDrillPath (WebDrillPath drillPathWithHighImportance)

Some subclases wont need the onclick attribute at all, overriding the method and returning null will help on that case

Returns
  • the js call to the drill method

protected String getParentElementIndex ()

Returns
  • the parent element index based on the WebHeader, null if canHyperLink() returns false

protected String getParentFormValueIndex ()

protected int getPosition ()

protected WebEvent getSelectorEvent ()

get the selector Event to gnereate the anchor in HTML mode

protected StringBuffer getURLBuffer ()

This method is deprecated.
if the link information for drilling should be modified, please update the generateDrillAnchor() method.

Specify URL information to be used as drilling information for the header being rendered

Returns
  • StringBuffer instance

protected boolean hasRuntimeUnitLimit ()

protected abstract boolean isDrillAvailable ()

protected abstract boolean isDrillPathAvailable (WebHeader header)

Utility method to determine if the current header has drill information available

Parameters
header WebHeader instance to analyze
Returns
  • boolean value indicating if there is drill path information available or not, for the specified header.

protected boolean isHeaderMVJsonMovable ()

protected boolean isTotal ()

protected void processHyperLinkNavigationInfo ()

protected void setWebHeader (WebHeader header)

Define the WebHeader instance to be rendered.

Parameters
header WebHeader instance from where the information to render by this class will be retrieved.

protected void setWebTemplateMetric (WebTemplateMetric metric)

Define the WebTemplateMetric instance to be rendered.

Parameters
metric WebTemplateMetric instance from where the information to render by this class will be retrieved.

protected boolean shouldHiliteOnServer ()

Indicate if it's necessary to hilight the selected element on server side.

protected boolean showPivotForLastAttrRowInCol ()

When 'Remove Extra Column' is cheched, and a Attribute is placed as last row in Column then its title is not visible. Therefore if the Attribute Elements is the last row in Column headers, we need show pivot buttons for each attribute element.

Returns
  • boolean