Class ReportCellRankMetric.AbstractInsertMetricContextMenuBuilder

    • Constructor Detail

      • AbstractInsertMetricContextMenuBuilder

        public AbstractInsertMetricContextMenuBuilder​(ReportGridDisplayCell.Context context)
        Class constructor
        Parameters:
        context - instance with the information about the context (cell, transform, etc) where this menu item will be displayed.
    • Method Detail

      • isValid

        public boolean isValid()
        Specified by:
        isValid in interface ComposedContextMenuBuilder
        Returns:
        boolean value that indicates if drilling on the current cell shall be enabled to the user
      • getJSCode

        protected java.lang.String getJSCode​(WebEvent event)
        Generate the JavaScript code the option will have based on the event information provided
        Parameters:
        event - WebEvent instance from where the JavaScript information will be extracted
        Returns:
        String value with the JavaScript code to use for the context menu option.
      • getWebTemplate

        protected WebTemplate getWebTemplate()
        Returns:
        WebTemplate instance related with the grid currently being analyzed.
      • generateRankOptions

        protected abstract void generateRankOptions()
        ContextMenu instance with the insert metric options related to Rank metrics
      • internalPopulate

        protected void internalPopulate()
      • setIframeEnabled

        public void setIframeEnabled​(boolean value)
        Define if the options to generate will be iframe enabled or not
        Specified by:
        setIframeEnabled in interface ComposedContextMenuBuilder
        Parameters:
        value - boolean value indicating if the options to generate will be iframe enabled or not
      • isIframeEnabled

        public boolean isIframeEnabled()
        Specified by:
        isIframeEnabled in interface ComposedContextMenuBuilder
        Returns:
        boolean value indicating if the options generated by this builder are iframe enabled or not
      • getSubMenu

        protected ContextMenu getSubMenu()
        Returns:
        ContextMenu instance where the different options this builder will generate will be saved.
      • getDescriptor

        protected java.lang.String getDescriptor​(int key)
        Utility method for obtaining the string of a descriptor
        Parameters:
        key - value with the identifier of the descriptor to obtain
        Returns:
        String value of the descriptor, according to the key provided
      • isFeatureAvailable

        protected boolean isFeatureAvailable​(java.lang.String featureName)
        Utility method for determining if a feature is available or not
        Parameters:
        featureName - String value with the name of the feature to test
        Returns:
        boolean value indicating if the feature is available or not.
      • isTrue

        protected boolean isTrue​(java.lang.String fpName)
        Utility method for obtaining the boolean value of a given formal parameter
        Parameters:
        fpName - String value with the name of the formal parameter to test
        Returns:
        boolean value of the formal parameter requested. If not found or the formal parameter is not of type boolean, it will return false.
      • getIntValue

        protected int getIntValue​(java.lang.String fpName,
                                  int defaultValue)
        Utility method for obtaining the integer value of a given formal parameter
        Parameters:
        fpName - String value with the name of the formal parameter to test
        defaultValue - value to return if the process of querying the formal parameter fails.
        Returns:
        value of the formal parameter requested. If not found or the formal parameter is not of type integer, it will return the default value provided.
      • getStringValue

        protected java.lang.String getStringValue​(java.lang.String fpName,
                                                  java.lang.String defaultValue)
        Utility method for obtaining the string value of a given formal parameter
        Parameters:
        fpName - String value with the name of the formal parameter to test
        defaultValue - value to return if the process of querying the formal parameter fails.
        Returns:
        value of the formal parameter requested. If not found or the formal parameter is not of type string, it will return the default value provided.