Class ViewBeanTransformHelper


  • public class ViewBeanTransformHelper
    extends java.lang.Object
    ViewBeanTransformHelper Provides utility functions used in report transforms
    Since:
    MicroStrategy Web 8.0.0
    • Field Detail

      • CACHED_URL_TYPICAL_BEAN_STATES

        protected static final java.lang.String CACHED_URL_TYPICAL_BEAN_STATES
        See Also:
        Constant Field Values
      • CACHED_DRILL_EVENT

        protected static final java.lang.String CACHED_DRILL_EVENT
        See Also:
        Constant Field Values
      • CACHED_IMAGE_FOLDER

        protected static final java.lang.String CACHED_IMAGE_FOLDER
        See Also:
        Constant Field Values
      • CACHED_ADVANCED_DRILL_EVENT

        protected static final java.lang.String CACHED_ADVANCED_DRILL_EVENT
        See Also:
        Constant Field Values
      • CACHED_DRILL_EDITOR_PROCESS_EVENT

        protected static final java.lang.String CACHED_DRILL_EDITOR_PROCESS_EVENT
        See Also:
        Constant Field Values
      • CACHED_ADVANCED_DRILL_EDITOR_PROCESS_EVENT

        protected static final java.lang.String CACHED_ADVANCED_DRILL_EDITOR_PROCESS_EVENT
        See Also:
        Constant Field Values
      • CACHED_DRILL_FILTERONSELECTION_PROCESS_EVENT

        protected static final java.lang.String CACHED_DRILL_FILTERONSELECTION_PROCESS_EVENT
        See Also:
        Constant Field Values
      • CACHED_SORT_EVENT

        protected static final java.lang.String CACHED_SORT_EVENT
        See Also:
        Constant Field Values
      • CACHED_APPLIED_SORT_ARRAY

        protected static final java.lang.String CACHED_APPLIED_SORT_ARRAY
        See Also:
        Constant Field Values
      • CACHED_DRILL_EDITOR_NAME

        protected static final java.lang.String CACHED_DRILL_EDITOR_NAME
        See Also:
        Constant Field Values
      • CACHED_SORT_SUBTOTAL_POSITION

        protected static final java.lang.String CACHED_SORT_SUBTOTAL_POSITION
        See Also:
        Constant Field Values
      • CACHED_IFRAME_REQUEST

        protected static final java.lang.String CACHED_IFRAME_REQUEST
        See Also:
        Constant Field Values
      • CACHED_DRILL_FILTER_PAGEBY

        protected static final java.lang.String CACHED_DRILL_FILTER_PAGEBY
        See Also:
        Constant Field Values
      • CACHED_IS_NETSCAPE

        protected static final java.lang.String CACHED_IS_NETSCAPE
        See Also:
        Constant Field Values
      • CACHED_SPECIFY_WIDTH_FOR_CELL

        protected static final java.lang.String CACHED_SPECIFY_WIDTH_FOR_CELL
        See Also:
        Constant Field Values
      • CACHED_SPECIFY_ID_FOR_FOR_TITLE_CELL

        protected static final java.lang.String CACHED_SPECIFY_ID_FOR_FOR_TITLE_CELL
        See Also:
        Constant Field Values
      • CACHED_MAX_COL_HEADER_DEPTH

        protected static final java.lang.String CACHED_MAX_COL_HEADER_DEPTH
        See Also:
        Constant Field Values
      • CACHED_FORMAL_PARAMETERS

        protected static final java.lang.String CACHED_FORMAL_PARAMETERS
        See Also:
        Constant Field Values
      • DRILL_RETAIN_THRESHOLDS_NO

        public static final java.lang.String DRILL_RETAIN_THRESHOLDS_NO
        See Also:
        Constant Field Values
      • DRILL_RETAIN_THRESHOLDS_YES

        public static final java.lang.String DRILL_RETAIN_THRESHOLDS_YES
        See Also:
        Constant Field Values
      • DRILL_RETAIN_THRESHOLDS_USE_DRILL_PATH

        public static final java.lang.String DRILL_RETAIN_THRESHOLDS_USE_DRILL_PATH
        See Also:
        Constant Field Values
      • LOCK_HEADERS_PROPERTY_GROUP

        public static final java.lang.String LOCK_HEADERS_PROPERTY_GROUP
        See Also:
        Constant Field Values
      • LOCK_ROW_HEADERS_PROPERTY_NAME

        public static final java.lang.String LOCK_ROW_HEADERS_PROPERTY_NAME
        See Also:
        Constant Field Values
      • LOCK_ROW_HEADERS_PROPERTY_ON

        public static final java.lang.String LOCK_ROW_HEADERS_PROPERTY_ON
        See Also:
        Constant Field Values
      • LOCK_ROW_HEADERS_PROPERTY_OFF

        public static final java.lang.String LOCK_ROW_HEADERS_PROPERTY_OFF
        See Also:
        Constant Field Values
      • LOCK_COLUMN_HEADERS_PROPERTY_NAME

        public static final java.lang.String LOCK_COLUMN_HEADERS_PROPERTY_NAME
        See Also:
        Constant Field Values
      • LOCK_COLUMN_HEADERS_PROPERTY_ON

        public static final java.lang.String LOCK_COLUMN_HEADERS_PROPERTY_ON
        See Also:
        Constant Field Values
      • LOCK_COLUMN_HEADERS_PROPERTY_OFF

        public static final java.lang.String LOCK_COLUMN_HEADERS_PROPERTY_OFF
        See Also:
        Constant Field Values
    • Constructor Detail

      • ViewBeanTransformHelper

        public ViewBeanTransformHelper()
    • Method Detail

      • getRemoveWorkingSetAllMetricsEvent

        public static WebEvent getRemoveWorkingSetAllMetricsEvent​(ViewBean vb,
                                                                  boolean applyNow)
      • getRemoveTemplateUnitEvent

        public static WebEvent getRemoveTemplateUnitEvent​(ViewBean vb,
                                                          java.lang.String fromAxis,
                                                          java.lang.String fromPos,
                                                          boolean applyNow)
        get an event object for a remove action
        Parameters:
        vb - the ViewBean object
        fromAxis - the origin axis
        fromPos - the origin position
        applyNow - whether to apply change
        Returns:
        the event object
      • getRemoveMetricEvent

        public static WebEvent getRemoveMetricEvent​(ViewBean vb,
                                                    java.lang.String metricPos,
                                                    boolean applyNow)
        get an event object for a remove metric action
        Parameters:
        vb - the ViewBean object
        metricPos - the metric position
        applyNow - whether to apply change
        Returns:
        the event object
      • getMoveMetricEvent

        public static WebEvent getMoveMetricEvent​(ViewBean vb,
                                                  java.lang.String fromPos,
                                                  java.lang.String toPos,
                                                  boolean applyNow)
        get an event object for a move metric action
        Parameters:
        vb - the ViewBean object
        fromPos - the origin position
        toPos - the target position
        applyNow - whether to apply change
        Returns:
        the event object
      • mapStyleNameToCssFileName

        public static java.lang.String mapStyleNameToCssFileName​(java.lang.String styleName)
        map a style name to a css file name
        Parameters:
        styleName - style name
        Returns:
        css file name
      • mapCssFileNameToStyleName

        public static java.lang.String mapCssFileNameToStyleName​(java.lang.String fileName)
        map a css file name to a style name
        Parameters:
        fileName - css file name
        Returns:
        style name
      • getObjectIDInfo

        public static java.lang.String getObjectIDInfo​(WebTemplateUnit unit)
        Based on the type of unit instance, obtain its ID
        Parameters:
        unit - WebTemplateUnit instance to analyze
        Returns:
        String value with the object ID information.
      • getUnitCellId

        public static java.lang.String getUnitCellId​(java.lang.String gridBoneId,
                                                     int axis,
                                                     int depth,
                                                     int subDepth)
        Parameters:
        gridBoneId - identifier of the grid where the unit is located
        axis - axis location of the unit
        depth - depth location of the unit in the axis
        subDepth - sub-depth location of the unit in the axis
        Returns:
        a String with an ID value for a Template Unit
      • getObjectID

        public static java.lang.String getObjectID​(WebTemplateUnit unit)
        Parameters:
        unit - WebTemplateUnit object
        Returns:
        object identifier from a template unit.
      • getObjectType

        public static int getObjectType​(WebTemplateUnit unit)
        Parameters:
        unit - WebTemplateUnit object
        Returns:
        object type from a template unit.
      • getObjectSubType

        public static int getObjectSubType​(WebTemplateUnit unit)
        Parameters:
        unit - WebTemplateUnit object
        Returns:
        object type from a template unit.
        Since:
        MicroStrategy Web 8.1.0
      • getObjectDescription

        public static java.lang.String getObjectDescription​(WebTemplateUnit unit)
        Parameters:
        unit - WebTemplateUnit object
        Returns:
        object description from a template unit.
      • generateRowTitleSortID

        public static java.lang.String generateRowTitleSortID​(WebTitle title,
                                                              WebSubTitle subTitle)
        generate the sort id for row title
        Parameters:
        title - WebTitle object
        subTitle - WebSubTitle object
        Returns:
        the sort id
      • generateTitleSortID

        public static java.lang.String generateTitleSortID​(WebTitle title,
                                                           WebAttributeForm attForm,
                                                           int axis)
        Since:
        MicroStrategy Web 8.0.2
      • generateColTitleSortID

        public static java.lang.String generateColTitleSortID​(WebTitle title,
                                                              WebAttributeForm attForm)
        Since:
        MicroStrategy Web 8.0.2
      • generateRowTitleSortID

        public static java.lang.String generateRowTitleSortID​(WebSubTitle parentSubTitle,
                                                              WebSubTitle childSubTitle)
        generate the sort id for row title.
        Parameters:
        parentSubTitle - WebSubTitle object
        childSubTitle - WebSubTitle object
        Returns:
        the sort id
      • generateColTitleSortID

        public static java.lang.String generateColTitleSortID​(WebSubTitle parentSubTitle,
                                                              WebSubTitle childSubTitle)
        generate the sort id for col title.
        Parameters:
        parentSubTitle - WebSubTitle object
        childSubTitle - WebSubTitle object
        Returns:
        the sort id
        Since:
        MicroStrategy Web 9.0.0
      • generateHeaderSortID

        public static java.lang.String generateHeaderSortID​(ViewBean vb,
                                                            WebHeader header,
                                                            int axis,
                                                            int sortAxis)
        generat the sort id for column header
        Parameters:
        vb - the ViewBean object
        header - the WebHeader object
        Returns:
        the sort id
        Since:
        MicroStrategy Web 9.0.0
      • generateColHeaderSortID

        public static java.lang.String generateColHeaderSortID​(ViewBean vb,
                                                               WebHeader header)
        generat the sort id for column header
        Parameters:
        vb - the ViewBean object
        header - the WebHeader object
        Returns:
        the sort id
      • generateRowHeaderSortID

        public static java.lang.String generateRowHeaderSortID​(ViewBean vb,
                                                               WebHeader header)
        generat the sort id for column header
        Parameters:
        vb - the ViewBean object
        header - the WebHeader object
        Returns:
        the sort id
        Since:
        MicroStrategy Web 9.0.0
      • generateHeaderSortDisplayString

        public static java.lang.String generateHeaderSortDisplayString​(ViewBean vb,
                                                                       WebHeader header,
                                                                       int axis)
        generate the sort display for column header.
        Parameters:
        vb - the ViewBean object
        header - the WebHeader object
        Returns:
        the sort display
        Since:
        MicroStrategy Web 9.0.0
      • generateColHeaderSortDisplayString

        public static java.lang.String generateColHeaderSortDisplayString​(ViewBean vb,
                                                                          WebHeader header)
        generate the sort display for column header.
        Parameters:
        vb - the ViewBean object
        header - the WebHeader object
        Returns:
        the sort display
      • getPageByHeadersByIndex

        public static WebHeaders getPageByHeadersByIndex​(ViewBean vb,
                                                         WebGridHeaders pageHeaders,
                                                         int titleIndex)
        get the index for a pageby header
        Parameters:
        vb - the ViewBean object
        pageHeaders - the pageby headers
        titleIndex - the index of the pageby item in the pageby axis
        Returns:
        the pageby header at that index
      • setFormalParameters

        public static void setFormalParameters​(WebComponent wc,
                                               boolean designMode,
                                               FormalParameters formalParameters)
        Sets the template formal parameters
        Parameters:
        wc - WebComponent base instance
        designMode - boolean indicating if the environment is design mode or not
        formalParameters - FormalParameters instance with the values to set
      • getToPageByPosition

        public static int getToPageByPosition​(ViewBean vb)
        get the target position for a pivot to pageby axis action
        Parameters:
        vb - the ViewBean object
        Returns:
        the target position
      • ReadReportSettings

        public static java.lang.String ReadReportSettings​(ViewBean vb,
                                                          java.lang.String PropertySet,
                                                          java.lang.String PropertyName)
        get report property value
        Parameters:
        vb - the ViewBean object
        PropertySet - the property set name
        PropertyName - the property name
        Returns:
        the property value
      • checkReportSettingsDefault

        public static boolean checkReportSettingsDefault​(ViewBean vb,
                                                         java.lang.String PropertySet,
                                                         java.lang.String PropertyName)
        check if this report property is set to default
        Parameters:
        vb - the ViewBean object
        PropertySet - the property set name
        PropertyName - the property name
        Returns:
        the property value
      • getTemplatePropertyDefaultValue

        public static java.lang.String getTemplatePropertyDefaultValue​(ViewBean vb,
                                                                       java.lang.String propertySetName,
                                                                       java.lang.String propertyName)
        Get a template property's default value
        Parameters:
        vb - the ViewBean object
        PropertySet - the property set name
        PropertyName - the property name
        Returns:
        default property value
      • getProjectProperty

        public static java.lang.String getProjectProperty​(WebSessionInfo sessionInfo,
                                                          java.lang.String propertySetName,
                                                          java.lang.String propertyName)
        Get a project level property value
        Parameters:
        sessionInfo - the WebSessionInfo object
        Returns:
        the project property
      • getCartesianJoinDisabledTooltip

        public static java.lang.String getCartesianJoinDisabledTooltip​(WebBean wb)
        Get disabled reason for cartesian join drop down
        Returns:
        the disabled reason
      • showAttributeForms

        public static boolean showAttributeForms​(ViewBean vb)
        Check whether to show the attribute form names on the view bean
        Parameters:
        vb - ViewBean base instance
        Returns:
        whether to show the attribute form names
      • getSortsubtotalPostion

        public static int getSortsubtotalPostion​(ViewBean vb)
        Deprecated.
        Please use getSortsubtotalPostion(ViewBean vb, int axis)
        get the subtotal position for sorting
        Parameters:
        vb - the ViewBean object
        Returns:
        the subtotal position for sorting
      • getSortsubtotalPostion

        public static int getSortsubtotalPostion​(ViewBean vb,
                                                 int axis)
        get the subtotal position for sorting
        Parameters:
        vb - the ViewBean object
        axis - the axis EnumDSSXMLAxisName where the sorting is defined
        Returns:
        the subtotal position for sorting
        Since:
        MicroStrategy Web 8.0.2
      • getSortsubtotalPostion

        public static int getSortsubtotalPostion​(WebTemplate template,
                                                 int axis)
        get the subtotal position for sorting
        Parameters:
        template -
        axis - the axis EnumDSSXMLAxisName where the sorting is defined
        Returns:
        the subtotal position for sorting
        Since:
        MicroStrategy Web 8.1.0
      • determineDrillRetainParent

        public static java.lang.String determineDrillRetainParent​(ViewBean vb,
                                                                  java.lang.String preferenceValue)
        Deprecated.
        This method is no longer used. The backend determines the value of this setting if it is set to use report definition.
        get the drill retain parent
        Parameters:
        vb - the ViewBean object
        preferenceValue - value of the preference related with this feature as defined by the user
        Returns:
        the drill retain parent
      • determineDrillRetainThreshold

        public static java.lang.String determineDrillRetainThreshold​(ViewBean vb,
                                                                     java.lang.String preferenceValue)
        Deprecated.
        This method is no longer used. The backend determines the value of this setting if it is set to use report definition.
        get the drill retain thresholds
        Parameters:
        vb - the ViewBean object
        preferenceValue - the preference value
        Returns:
        the drill retain thresholds
      • getReportPropertyValue

        public static java.lang.String getReportPropertyValue​(ViewBean vb,
                                                              java.lang.String propertyName)
      • setReportPropertyValue

        public static java.lang.String setReportPropertyValue​(ViewBean vb,
                                                              java.lang.String propertyName,
                                                              java.lang.String propertyValue)
      • getReportStyleID

        public static java.lang.String getReportStyleID​(ViewBean vb)
        get report style id from report property
        Parameters:
        vb - the ViewBean object
        Returns:
        report style id
      • getReportStyleName

        public static java.lang.String getReportStyleName​(ViewBean vb)
        get report style name from report property
        Parameters:
        vb - the ViewBean object
        Returns:
        report style name from report property
      • getReportStyleLocalizedName

        public static java.lang.String getReportStyleLocalizedName​(ViewBean vb)
        get report localized style name
        Parameters:
        vb - the ViewBean object
        Returns:
        localized style name
      • ignoreOldStyle

        public static boolean ignoreOldStyle​(ViewBean vb)
        whether the report is old or new formatting
        Parameters:
        vb - the ViewBean object
        Returns:
        whether the report is old or new formatting
      • getGridBoneFormalParameters

        public static void getGridBoneFormalParameters​(Transform t,
                                                       JsonGenerator json)
        Sets formal paramters used by grid bones for client-side template manipulations as properties of a JsonGenerator.
        Parameters:
        t - Transform instance
        json - JsonGenerator that will accept the new properties
      • getGridFeatures

        public static JsonGenerator getGridFeatures​(WebFeatures featuresManager,
                                                    boolean isDesignMode,
                                                    boolean hasMetrics)
        Deprecated.
        Creates a json generator for the client-side template features property.
        Parameters:
        featuresManager - WebFeatures the report features manager used to check if a feature is available
        isDesignMode - boolean that indicates if the interface is in design mode or not
        hasMetrics - boolen that indicates if the template has metrics
        Returns:
        a JsonGenerator with the template features.
      • getGridFeatures

        public static JsonGenerator getGridFeatures​(WebFeatures featuresManager,
                                                    boolean isDesignMode)
        Creates a json generator for the client-side template features property.
        Parameters:
        featuresManager - WebFeatures the report features manager used to check if a feature is available
        isDesignMode - boolean that indicates if the interface is in design mode or not
        Returns:
        a JsonGenerator with the template features.
      • getGridFeatures

        public static JsonGenerator getGridFeatures​(WebComponent bean,
                                                    boolean isDesignMode,
                                                    boolean hasMetrics)
        Deprecated.
        Creates a json generator for the client-side template features property.
        Parameters:
        bean - WebComponent the report features manager used to check if a feature is available
        isDesignMode - boolean that indicates if the interface is in design mode or not
        hasMetrics - boolen that indicates if the template has metrics
        Returns:
        a JsonGenerator with the template features.
      • getGridFeatures

        public static JsonGenerator getGridFeatures​(WebComponent bean,
                                                    boolean isDesignMode)
        Creates a json generator for the client-side template features property.
        Parameters:
        bean - WebComponent the report features manager used to check if a feature is available
        isDesignMode - boolean that indicates if the interface is in design mode or not
        Returns:
        a JsonGenerator with the template features.
      • getFeaturesList

        public static final java.lang.String[] getFeaturesList()
        Returns:
        a copy of the features String array that is sent to the report
        Since:
        MicroStrategy Web 9.0.0
      • renderColTags

        public static void renderColTags​(int dpi,
                                         double zoom,
                                         MarkupOutput out,
                                         ViewBean vb)
        Deprecated.
        transforms should extend ReportGridTransformImpl and use protected method renderColTagsHtml
        Renders the col tags for a grid column widths.
        Parameters:
        dpi - int containing the dpi of the client
        zoom - value for zoom property to use
        out - MarkupOutput instance where the HTML contents to render are to be saved
        vb - ViewBean base instance
      • getAddAttFormLink

        public static java.lang.String getAddAttFormLink​(ViewBean vb,
                                                         java.lang.String attID,
                                                         java.lang.String attFormID,
                                                         boolean isBase,
                                                         int toPos,
                                                         java.lang.String extraURL,
                                                         boolean addState,
                                                         EventManager eventManager,
                                                         java.lang.String datasetID)
      • getAddAttFormEvent

        public static WebEvent getAddAttFormEvent​(ViewBean vb,
                                                  java.lang.String attID,
                                                  java.lang.String attFormID,
                                                  boolean isBase,
                                                  java.lang.String toPos,
                                                  java.lang.String datasetID)
      • getRemoveAttFormLink

        public static java.lang.String getRemoveAttFormLink​(ViewBean vb,
                                                            java.lang.String attID,
                                                            java.lang.String attFormID,
                                                            boolean isBase,
                                                            java.lang.String extraURL,
                                                            boolean addState,
                                                            EventManager eventManager,
                                                            java.lang.String datasetID)
      • getRemoveAttFormEvent

        public static WebEvent getRemoveAttFormEvent​(ViewBean vb,
                                                     java.lang.String attID,
                                                     java.lang.String attFormID,
                                                     boolean isBase,
                                                     java.lang.String datasetID)
      • getOpenAttFormEditorLink

        public static java.lang.String getOpenAttFormEditorLink​(ViewBean vb,
                                                                java.lang.String attID,
                                                                java.lang.String extraURL,
                                                                boolean addState,
                                                                EventManager eventManager)
      • getOpenAttFormEditorEvent

        public static WebEvent getOpenAttFormEditorEvent​(ViewBean vb,
                                                         java.lang.String attID)
      • generateAttributeFormListForContextMenus

        public static java.lang.String generateAttributeFormListForContextMenus​(WebWorkingSet ws,
                                                                                WebAttribute att,
                                                                                boolean isRWDoc)
        Generates a String with the list of attribute forms.
        This is used for the object browser context menus during client-side manipulations
        Parameters:
        ws - WebWorkingSet the working set
        att - WebTemplateUnit the web attribute object
        isRWDoc - boolean indicates its an rwd.
        Returns:
        a String
      • generateAttributeFormListForContextMenus

        public static java.lang.String generateAttributeFormListForContextMenus​(WebWorkingSet ws,
                                                                                WebTemplateAttribute wta,
                                                                                boolean isRWDoc)
        Generates a String with the list of attribute forms.
        This is used for the context menus on client-side manipulations
        Parameters:
        ws - WebWorkingSet the working set
        wta - WebTemplateAttribute the viewbean template attribute
        isRWDoc - boolean indicates its an rwd.
        Returns:
        a String
      • isDrillPathsInOldFormat

        public static boolean isDrillPathsInOldFormat​(ViewBean vb)
        Since:
        MicroStrategy Web 8.0.1
      • getOutlineModeMaxLevels

        public static int getOutlineModeMaxLevels​(ViewBean vb)
        Since:
        MicroStrategy Web 8.0.2
      • getDefaultOutlineModeExpansionLevel

        public static int getDefaultOutlineModeExpansionLevel​(ViewBean vb)
      • getRemoveUnitLink

        public static java.lang.String getRemoveUnitLink​(ViewBean vb,
                                                         java.lang.String fromAxis,
                                                         java.lang.String fromPos,
                                                         boolean applyNow,
                                                         java.lang.String extraURL,
                                                         boolean addState,
                                                         EventManager eventManager)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellRemoveFromReport and ReportCellRemoveFromGrid; or about the generation of remove manipulations available on ReportGridDisplayCell
        get a link for a remove action
        Parameters:
        vb - the ViewBean object
        fromAxis - the origin axis
        fromPos - the origin position
        applyNow - whether to apply change
        extraURL - extra url information to append
        addState - whether add the beans's state
        eventManager - EventManager object
        Returns:
        the link as String
      • getRemoveMetricLink

        public static java.lang.String getRemoveMetricLink​(ViewBean vb,
                                                           java.lang.String metricPos,
                                                           boolean applyNow,
                                                           java.lang.String extraURL,
                                                           boolean addState,
                                                           EventManager eventManager)
        Deprecated.
        please consult the transform class for remove manipulations
        get a link for a remove metric action
        Parameters:
        vb - the ViewBean object
        metricPos - the metric position
        applyNow - whether to apply change
        extraURL - extra url information to append
        addState - whether add the beans's state
        eventManager - EventManager object
        Returns:
        the link as String
      • getMoveMetricLink

        public static java.lang.String getMoveMetricLink​(ViewBean vb,
                                                         java.lang.String fromPos,
                                                         java.lang.String toPos,
                                                         boolean applyNow,
                                                         java.lang.String extraURL,
                                                         boolean addState,
                                                         EventManager eventManager)
        Deprecated.
        please use the transform and cell information for pivot manipulations
        get a link for a move metric action
        Parameters:
        vb - the ViewBean object
        fromPos - the origin position
        toPos - the target position
        applyNow - whether to apply change
        extraURL - extra url information to append
        addState - whether add the beans's state
        eventManager - EventManager object
        Returns:
        the link as String
      • generateMoveContextMenu

        public static boolean generateMoveContextMenu​(ViewBean vb,
                                                      int pos,
                                                      boolean isFirst,
                                                      boolean isLast,
                                                      boolean applyNow,
                                                      java.lang.String extraUrl,
                                                      boolean isIFrame,
                                                      ContextMenu rhMenu,
                                                      ContextMenuManager cmm,
                                                      EventManager eventManager)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellMove
        generate a move RMC for a single metric
        Parameters:
        vb - the ViewBean object
        pos - metric position
        isFirst - if it's the first metric
        isLast - if it's the last metric
        applyNow - whether to apply change
        extraUrl - extra url info to the link
        isIFrame - whether it is iframe
        rhMenu - ContextMenu object
        cmm - ContextMenuManager object
        eventManager - EventManager object
        Returns:
        whether the move item is added to the context menu
      • generateMoveContextMenu

        public static boolean generateMoveContextMenu​(ViewBean vb,
                                                      int pos,
                                                      boolean isFirst,
                                                      boolean isLast,
                                                      ContextMenu rhMenu,
                                                      ContextMenuManager cmm)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellMove
        generate a client-side move RMC for a single metric
        Parameters:
        vb - the ViewBean object
        pos - metric position
        isFirst - if it's the first metric
        isLast - if it's the last metric
        rhMenu - ContextMenu object
        cmm - ContextMenuManager object
        Returns:
        whether the move item is added to the context menu
      • generateMoveContextMenu

        public static void generateMoveContextMenu​(ViewBean vb,
                                                   int axis,
                                                   int pos,
                                                   boolean isFirst,
                                                   boolean isLast,
                                                   boolean applyNow,
                                                   java.lang.String extraUrl,
                                                   boolean isIFrame,
                                                   ContextMenu rhMenu,
                                                   ContextMenuManager cmm,
                                                   EventManager eventManager)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellMove
        generate a move RMC for a template unit
        Parameters:
        vb - the ViewBean object
        axis - template unit axis
        pos - template unit position
        isFirst - if it's the first unit in the axis
        isLast - if it's the last unit in the axis
        applyNow - whether to apply change
        extraUrl - extra url info to the link
        isIFrame - whether it is iframe enabled
        rhMenu - ContextMenu object
        cmm - ContextMenuManager object
        eventManager - EventManager object
      • generateMoveContextMenu

        public static void generateMoveContextMenu​(ViewBean vb,
                                                   int axis,
                                                   int pos,
                                                   boolean isFirst,
                                                   boolean isLast,
                                                   ContextMenu rhMenu,
                                                   ContextMenuManager cmm)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellMove
        generate a client-side move RMC for a template unit
        Parameters:
        vb - the ViewBean object
        axis - template unit axis
        pos - template unit position
        isFirst - if it's the first unit in the axis
        isLast - if it's the last unit in the axis
        rhMenu - ContextMenu object
        cmm - ContextMenuManager object
      • generateRemoveWorkingSetUnitContextMenu

        public static void generateRemoveWorkingSetUnitContextMenu​(ViewBean vb,
                                                                   WebObjectInfo object,
                                                                   boolean applyNow,
                                                                   java.lang.String extraUrl,
                                                                   boolean isIframe,
                                                                   ContextMenu rhMenu,
                                                                   EventManager eventManager)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellRemoveFromReport and ReportCellRemoveFromGrid
        generate Remove context menu for working set specified by axis and position.
        Parameters:
        vb - the ViewBean object
        object - the object to remove from the working set of the report
        applyNow - whether to apply change
        extraUrl - extra url info on the url
        isIframe - whether it is iframe enabled
        rhMenu - ContextMenu object
        eventManager - EventManager object
      • generateRemoveContextMenu

        public static void generateRemoveContextMenu​(ViewBean vb,
                                                     int pos,
                                                     boolean applyNow,
                                                     java.lang.String extraUrl,
                                                     boolean isIframe,
                                                     ContextMenu rhMenu,
                                                     EventManager eventManager)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellRemoveFromReport and ReportCellRemoveFromGrid
        generate Remove context menu for single metric
        Parameters:
        vb - the ViewBean object
        pos - metric position
        applyNow - whether to apply change
        extraUrl - extra url info to the link
        isIframe - whether it is iframe enabled
        rhMenu - ContextMenu object
        eventManager - EventManager object
      • generateClientSideRemoveContextMenu

        public static void generateClientSideRemoveContextMenu​(ViewBean vb,
                                                               int pos,
                                                               ContextMenu rhMenu,
                                                               boolean enableExtraRemove)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellRemoveFromReport and ReportCellRemoveFromGrid
        generate client-side Remove context menu for single metric
        Parameters:
        vb - the ReportBean object
        pos - metric position
        rhMenu - ContextMenu object
        enableExtraRemove - boolean value indicating if Remove From Report option should be displayed if available
      • generateRemoveTemplateUnitContextMenu

        public static void generateRemoveTemplateUnitContextMenu​(ViewBean vb,
                                                                 int axis,
                                                                 int pos,
                                                                 boolean applyNow,
                                                                 java.lang.String extraUrl,
                                                                 boolean isIframe,
                                                                 ContextMenu rhMenu,
                                                                 EventManager eventManager)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellRemoveFromReport and ReportCellRemoveFromGrid
        generate Remove context menu for template unit
        Parameters:
        vb - the ViewBean object
        axis - template unit axis
        pos - template unit position
        applyNow - whether to apply change
        extraUrl - extra url info to the link
        isIframe - whether it is iframe enabled
        rhMenu - ContextMenu object
        eventManager - EventManager object
      • generateRemoveClientSideContextMenu

        public static void generateRemoveClientSideContextMenu​(ViewBean vb,
                                                               int axis,
                                                               int pos,
                                                               ContextMenu rhMenu,
                                                               boolean enableExtraRemove)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellRemoveFromReport and ReportCellRemoveFromGrid
        generate client-side Remove context menu for template unit
        Parameters:
        vb - the ViewBean object
        axis - template unit axis
        pos - template unit position
        rhMenu - ContextMenu object
        enableExtraRemove - boolean value indicating if Remove From Report option should be displayed if available
      • generateFilterOnContextMenu

        public static void generateFilterOnContextMenu​(ViewBean vb,
                                                       WebObjectInfo objInfo,
                                                       java.lang.String unitAlias,
                                                       ContextMenu cm,
                                                       EventManager eventManager,
                                                       boolean isIFrame)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellFilterOn
        Adds new context menu to either col or row header title for allow end-users to filter on given attribute or metric
        Parameters:
        vb - ViewBean
        objInfo - WebObjectInfo
        unitAlias - String
        cm - ContextMenu
        eventManager - EventManager
        isIFrame - boolean
      • getSinglePivotLink

        public static java.lang.String getSinglePivotLink​(ViewBean vb,
                                                          java.lang.String fromAxis,
                                                          java.lang.String fromPos,
                                                          java.lang.String toAxis,
                                                          java.lang.String toPos,
                                                          boolean applyNow,
                                                          java.lang.String extraURL,
                                                          boolean addState,
                                                          EventManager eventManager)
        Deprecated.
        Please use EventManager and event details available on transform related classes such as ReportGridDisplayCell for generating this information.
        get a link for a pivot action
        Parameters:
        vb - the ViewBean object
        fromAxis - the origin axis
        fromPos - the origin position
        toAxis - the target axis
        toPos - the target position
        applyNow - whether to apply change
        extraURL - extra url information to append
        addState - whether add the beans's state
        eventManager - EventManager object
        Returns:
        the link as String
      • getSinglePivotEvent

        public static WebEvent getSinglePivotEvent​(ViewBean vb,
                                                   java.lang.String fromAxis,
                                                   java.lang.String fromPos,
                                                   java.lang.String toAxis,
                                                   java.lang.String toPos,
                                                   boolean applyNow)
        Deprecated.
        Please use EventManager and event details available on transform related classes such as ReportGridDisplayCell for generating this information.
        get event object for a pivot action
        Parameters:
        vb - the ViewBean object
        fromAxis - the origin axis
        fromPos - the origin position
        toAxis - the target axis
        toPos - the target position
        applyNow - whether to apply change
        Returns:
        the WebEvent object
      • generateFormattingContextMenu

        public static void generateFormattingContextMenu​(ViewBean vb,
                                                         int pos,
                                                         java.lang.String extraUrl,
                                                         boolean isIframe,
                                                         ContextMenu rhMenu,
                                                         EventManager eventManager)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellFormat
        generate Formatting context menu for single metric. It uses the value sent as position (pos) minus one.
        Parameters:
        vb - the ViewBean object
        pos - metric position
        extraUrl - extra url info to the link
        isIframe - whether it is iframe enabled
        rhMenu - ContextMenu object
        eventManager - EventManager object
      • generateFormattingContextMenu

        public static void generateFormattingContextMenu​(ViewBean vb,
                                                         int axis,
                                                         int pos,
                                                         java.lang.String extraUrl,
                                                         boolean isIframe,
                                                         ContextMenu rhMenu,
                                                         EventManager eventManager)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellFormat
        generate Formatting context menu for template unit.
        Parameters:
        vb - the ViewBean object
        axis - template unit axis
        pos - template unit position
        extraUrl - extra url info to the link
        isIframe - whether it is iframe enabled
        rhMenu - ContextMenu object
        eventManager - EventManager object
      • generateFormattingContextMenuForRWB

        public static void generateFormattingContextMenuForRWB​(ViewBean vb,
                                                               int pos,
                                                               java.lang.String extraUrl,
                                                               boolean isIframe,
                                                               ContextMenu rhMenu,
                                                               EventManager eventManager,
                                                               java.lang.String viewerID)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellFormat
        generate Formatting context menu for single metric in case of a view bean in a RW document. It uses the value sent as position (pos) minus one.
        Parameters:
        vb - the ViewBean object
        pos - metric position
        extraUrl - extra url info to the link
        isIframe - whether it is iframe enabled
        rhMenu - ContextMenu object
        eventManager - EventManager object
        viewerID - The bone ID of the RW sviewer
      • generateFormattingContextMenuForRWB

        public static void generateFormattingContextMenuForRWB​(ViewBean vb,
                                                               int axis,
                                                               int pos,
                                                               java.lang.String extraUrl,
                                                               boolean isIframe,
                                                               ContextMenu rhMenu,
                                                               EventManager eventManager,
                                                               java.lang.String viewerID)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellFormat
        generate Formatting context menu for template unit in case of a view bean in a RW document.
        Parameters:
        vb - the ViewBean object
        axis - template unit axis
        pos - template unit position
        extraUrl - extra url info to the link
        isIframe - whether it is iframe enabled
        rhMenu - ContextMenu object
        eventManager - EventManager object
        viewerID - The bone ID of the RW sviewer
      • generateFormattingContextMenuForRWB

        public static void generateFormattingContextMenuForRWB​(ViewBean vb,
                                                               ContextMenu rhMenu,
                                                               java.lang.String viewerID)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellFormat
        generate client-side Formatting context menu for template unit in case of a view bean in a RW document.
        Parameters:
        vb - the ViewBean object
        rhMenu - ContextMenu object
        viewerID - The bone ID of the RW sviewer
      • generateRenameContextMenuForRWB

        public static void generateRenameContextMenuForRWB​(ViewBean vb,
                                                           int key,
                                                           java.lang.String extraUrl,
                                                           boolean isIframe,
                                                           ContextMenu rhMenu,
                                                           EventManager eventManager)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellRename
      • generateRenameContextMenu

        public static void generateRenameContextMenu​(ViewBean vb,
                                                     int key,
                                                     java.lang.String extraUrl,
                                                     boolean isIframe,
                                                     ContextMenu rhMenu,
                                                     EventManager eventManager)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellRename
      • generateAttributeFormContextMenu

        public static void generateAttributeFormContextMenu​(ViewBean vb,
                                                            WebTemplateUnit tu,
                                                            boolean isIFrame,
                                                            ContextMenu rhMenu,
                                                            ContextMenuManager cmm,
                                                            java.lang.String datasetID)
        Deprecated.
        please use the new approach for generating context menu options, see ReportCellAttributeForms
        Generates the Attribute forms context menu.
        Parameters:
        vb - ViewBean the view bean to display
        tu - WebTemplateUnit the template unit object
        isIFrame - boolean
        rhMenu - ContextMenu
        cmm - ContextMenuManager
        datasetID - String dataset ID. This assumes is a dataset inside a RW document.
      • getBlockProps

        public static Block getBlockProps​(WebTemplate template,
                                          java.lang.String[] properties,
                                          int axis,
                                          int position,
                                          int level,
                                          AppContext context)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • generateFormattingInfoBlock

        public static Block generateFormattingInfoBlock​(WebTemplate template,
                                                        AppContext context)
                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
        Since:
        MicroStrategy Web 9.0.0
      • generateFormattingInfoBlock

        public static void generateFormattingInfoBlock​(WebTemplate template,
                                                       AppContext context,
                                                       Block all)
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
        Since:
        MicroStrategy Web 9.0.0
      • generateGraphProperties

        public static void generateGraphProperties​(WebGraph graphObject,
                                                   AppContext appContext,
                                                   Block rootBlock)