Class AbstractReportGridCellHeader

    • Constructor Detail

      • AbstractReportGridCellHeader

        public AbstractReportGridCellHeader()
    • Method Detail

      • reset

        public void reset()
        Description copied from interface: ReportGridDisplayCell
        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.
        Specified by:
        reset in interface ReportGridDisplayCell
        Overrides:
        reset in class AbstractReportGridDisplayCell
      • getURLBuffer

        protected java.lang.StringBuffer getURLBuffer()
        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
      • setWebHeader

        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.
      • getWebTemplateMetric

        public WebTemplateMetric getWebTemplateMetric​(boolean retrieve)
        Obtain the WebTemplateMetric instance associated with this class
        Specified by:
        getWebTemplateMetric in interface ReportGridCellHeader
        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.
      • setWebTemplateMetric

        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.
      • isDrillPathAvailable

        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.
      • generateDrillAnchor

        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
      • getOnClickAttForDrillPath

        protected java.lang.String getOnClickAttForDrillPath​(WebDrillPath drillPathWithHighImportance)
        Some subclases wont need the onclick attribute at all, overriding the method and returning null will help on that case
        Parameters:
        drillPathWithHighImportance -
        Returns:
        the js call to the drill method
      • generateElementAnchor

        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
        Since:
        MicroStrategy Web 8.1.0
      • generateStaticHyperLinkAnchor

        protected AnchorTag generateStaticHyperLinkAnchor()
        Since:
        MicroStrategy Web 8.1.2
      • canHyperlinkForCurrentHTMLMode

        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.
      • processHyperLinkNavigationInfo

        protected void processHyperLinkNavigationInfo()
        Since:
        MicroStrategy Web 8.1.2
      • getParentFormValueIndex

        protected java.lang.String getParentFormValueIndex()
      • getParentElementIndex

        protected java.lang.String getParentElementIndex()
        Returns:
        the parent element index based on the WebHeader, null if canHyperLink() returns false
      • generateHyperLinkAnchor

        protected AnchorTag generateHyperLinkAnchor()
        Since:
        MicroStrategy Web 8.1.2
      • generateControlAnchor

        protected AnchorTag generateControlAnchor()
        Since:
        MicroStrategy Web 8.1.0
      • isDrillAvailable

        protected abstract boolean isDrillAvailable()
      • addContextMenuAttributes

        protected void addContextMenuAttributes​(java.util.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
        Overrides:
        addContextMenuAttributes in class AbstractReportGridDisplayCell
        Parameters:
        atts - Map where attributes will be appended.
        Since:
        MicroStrategy Web 8.1.0
      • getCellLevelAttributes

        protected void getCellLevelAttributes​(java.util.Map cell)
        CTY indicates the cell type UPT indicates the template unit that it belongs to, in the format of "axis,position"
        Overrides:
        getCellLevelAttributes in class AbstractReportGridDisplayCell
        Since:
        MicroStrategy Web 9.0.0
      • generateTooltipContent

        protected java.lang.String generateTooltipContent()
        Generates the string with the tooltip information to be assigned to the TITLE attribute of the cell tag for this instance
        Overrides:
        generateTooltipContent in class AbstractReportGridDisplayCell
        Returns:
        String with the information about the tooltip to render for the current cell.
      • getMetricID

        protected java.lang.String getMetricID()
      • getInsertMetricPercentToTotalEvent

        public WebEvent getInsertMetricPercentToTotalEvent​(int axisBitMap)
        Description copied from interface: ReportGridCellHeader
        Get the event for inserting a new metric based on Percent to Total
        Specified by:
        getInsertMetricPercentToTotalEvent in interface ReportGridCellHeader
        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.
      • getInsertMetricPercentToTotalEvent

        public WebEvent getInsertMetricPercentToTotalEvent​(int axisBitMap,
                                                           java.lang.String attributeID)
        Description copied from interface: ReportGridCellHeader
        Get the event for inserting a new metric based on Percent to Total
        Specified by:
        getInsertMetricPercentToTotalEvent in interface ReportGridCellHeader
        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.
      • getInsertMetricTransformationEvent

        public WebEvent getInsertMetricTransformationEvent​(java.lang.String transformationID,
                                                           int formulaType)
        Description copied from interface: ReportGridCellHeader
        Get the event for inserting a new metric based on a transformation
        Specified by:
        getInsertMetricTransformationEvent in interface ReportGridCellHeader
        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.
      • getDrillParametersForDHTML

        protected java.lang.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
      • generateDrillCheckBoxTag

        protected Tag generateDrillCheckBoxTag()
        Description copied from class: AbstractReportGridDisplayCell
        Generates the tag information for a check box for drilling, if all privileges and conditions required are met
        Overrides:
        generateDrillCheckBoxTag in class AbstractReportGridDisplayCell
        Returns:
        Tag instance initialized with the information of a check box for requesting drill manipulations. If not enabled or available, returns null
      • generateFilterOnSelectionCheckBoxTag

        protected Tag generateFilterOnSelectionCheckBoxTag()
        Description copied from class: AbstractReportGridDisplayCell
        Generates the tag information for a check box for filter on selection, if all privileges and conditions required are met
        Overrides:
        generateFilterOnSelectionCheckBoxTag in class AbstractReportGridDisplayCell
        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
      • cellNeedsLink

        protected boolean cellNeedsLink()
        Description copied from class: AbstractReportGridDisplayCell
        Utility method for determining if the current cell being displayed needs to be a link or not, for example, in case of drilling available.
        Overrides:
        cellNeedsLink in class AbstractReportGridDisplayCell
        Returns:
        boolean value indicating if the current cell should be displayed as a link.
      • canFilter

        protected boolean canFilter()
      • generateContent

        protected void generateContent​(MarkupOutput mo)
        Extends generateContent by adding a URL link to the cell's text.

        Developers can either use the AbstractReportGridDisplayCell.setContent(java.lang.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>");
         }
         

        Overrides:
        generateContent in class AbstractReportGridDisplayCell
        Parameters:
        mo - the output object
        Since:
        MicroStrategy Web 8.1.0
      • isDerivedMetric

        public boolean isDerivedMetric()
      • canRename

        public boolean canRename()
        Utility methood for determining if the cell object is enabled for displaying the user the option to rename it
        Specified by:
        canRename in interface ReportGridDisplayCell
        Overrides:
        canRename in class AbstractReportGridDisplayCell
        Returns:
        boolean value indicating if the manipulation should be enabled
      • canAddThresholds

        public boolean canAddThresholds()
        Utility method for determining if the cell object is enabled for displaying the user the option to add threshold to it
        Specified by:
        canAddThresholds in interface ReportGridDisplayCell
        Overrides:
        canAddThresholds in class AbstractReportGridDisplayCell
        Returns:
        boolean value indicating if the manipulation should be enabled
        Since:
        MicroStrategy Web 9.0.0
      • canFormat

        public boolean canFormat()
        Utility methood for determining if the cell object is enabled for displaying the user the option to format it
        Specified by:
        canFormat in interface ReportGridDisplayCell
        Overrides:
        canFormat in class AbstractReportGridDisplayCell
        Returns:
        boolean value indicating if the manipulation should be enabled
      • getMaxPosition

        protected int getMaxPosition()
      • getPosition

        protected int getPosition()
      • getKey

        public int getKey()
        Specified by:
        getKey in interface ReportGridDisplayCell
        Returns:
        int value with the key information about the cell being analyzed.
      • isTypeMetric

        public boolean isTypeMetric()
        Since:
        MicroStrategy Web 8.1.2
      • isTemplateMetric

        public boolean isTemplateMetric​(WebHeader header)
      • isTotal

        protected boolean isTotal()
        Since:
        MicroStrategy Web 9.0.0
      • canExpandCollapse

        protected boolean canExpandCollapse()
      • showPivotForLastAttrRowInCol

        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
      • hasRuntimeUnitLimit

        protected boolean hasRuntimeUnitLimit()
      • generateRAPreContent

        protected void generateRAPreContent​(MarkupOutput mo)