Class AbstractReportCellContextMenuItemBuilder

    • Constructor Detail

      • AbstractReportCellContextMenuItemBuilder

        public AbstractReportCellContextMenuItemBuilder​(Shortcut shortcut)
        Class constructor
        Parameters:
        shortcut - Shortcut instance with the base definition of the option
    • Method Detail

      • getFormalParameter

        protected FormalParameter getFormalParameter​(TransformContext context,
                                                     java.lang.String fpName)
        Utility method for obtaining a formal parameter value from the transform associated with this instance
        Parameters:
        context - TransformContext initialized instance with the information on where this option will be used
        fpName - String value with the name of the formal parameter to look for
        Returns:
        FormalParameter instance if found on the transform defined on the context. If the transform is not compatible with this menu builder or the formal parameter does not exist, returns null
      • isTrue

        protected boolean isTrue​(TransformContext context,
                                 java.lang.String fpName)
        Shortcut method for obtaining the boolean value of a formal parameter as defined on the context.
        Parameters:
        context - TransformContext initialized instance with the information on where this option will be used
        fpName - String value with the name of the formal parameter to look for
        Returns:
        true if the formal parameter is found and that's its defined value If the transform is not compatible with this menu builder, or the formal parameter does not exist or its not defined with a boolean type, returns false
      • isFeatureAvailable

        protected boolean isFeatureAvailable​(TransformContext context,
                                             java.lang.String featureName)
        Utility method for testing a given feature against the context defined
        Parameters:
        context - TransformContext initialized instance with the information on where this option will be used
        featureName - String value with the name of the feature to test for
        Returns:
        boolean value indicating if the feature is granted or not.
      • getIntValue

        protected int getIntValue​(TransformContext context,
                                  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.
        Since:
        MicroStrategy Web 9.0.0
      • getStringValue

        protected java.lang.String getStringValue​(TransformContext context,
                                                  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.
        Since:
        MicroStrategy Web 9.0.0
      • isIframeEnabled

        protected boolean isIframeEnabled​(TransformContext context)
        Utility method for determining if the environment is enabled for IFrame requests or not
        Parameters:
        context - TransformContext initialized instance with the information on where this option will be used
        Returns:
        boolean value indicating if iframe requests shall be enabled or not.
      • isActionEnabled

        protected abstract boolean isActionEnabled​(TransformContext context)
        Called by isItemAvailable(com.microstrategy.web.app.transforms.TransformContext), indicates the abstract class if the corresponding action of this item is available.
        Parameters:
        context - TransformContext initialized instance with the information on where this option will be used
        Returns:
        boolean value indicating if the option should be enabled to the user or not, given the properties available on the context object.
      • getJSCode

        protected abstract java.lang.String getJSCode​(TransformContext context)
        Generate the JavaScript code the context menu item generated by this builder instance will trigger when the user selects it.
        Parameters:
        context - TransformContext initialized instance with the information on where this option will be used
        Returns:
        String value with the JavaScript information to trigger when the option is selected.
      • canDefineDerivedElements

        protected boolean canDefineDerivedElements​(TransformContext context)
        Since:
        MicroStrategy Web 9.0.0
      • isRW

        protected boolean isRW​(TransformContext context)
        Indicate whether it is for a rw document or a report
        Parameters:
        context -
        Returns:
      • getPassThroughMode

        protected int getPassThroughMode​(TransformContext context)