Class Visualization

  • All Implemented Interfaces:
    ConfigurationElement, ConfigurationFile, java.lang.Cloneable

    public class Visualization
    extends AbstractConfigurationElement
    This class represents a visualization node of the visualizations.xml
    A Visualization is a way to display the report/document data. Its name must match a style name from the style catalog.
    Since:
    MicroStrategy Web 9.0.0
    • Field Detail

      • NODE_VISUALIZATION

        public static final java.lang.String NODE_VISUALIZATION
        constant for the shortcut list node name
        See Also:
        Constant Field Values
      • ATT_DESC

        protected static final java.lang.String ATT_DESC
        xml attribute name for the description of the visualization
        See Also:
        Constant Field Values
      • ATT_DESC_ID

        protected static final java.lang.String ATT_DESC_ID
        xml attribute name for the descriptor ID of the visualization
        See Also:
        Constant Field Values
      • ATT_SCOPE

        protected static final java.lang.String ATT_SCOPE
        xml attribute name for the scope of the visualization
        See Also:
        Constant Field Values
      • ATT_STYLE_NAME

        protected static final java.lang.String ATT_STYLE_NAME
        xml attribute name for the style-name of the visualization
        See Also:
        Constant Field Values
      • ATT_ID

        protected static final java.lang.String ATT_ID
        xml attribute name for the id of the visualization
        See Also:
        Constant Field Values
      • ATT_PROJECTS

        protected static final java.lang.String ATT_PROJECTS
        xml attribute name for the list of projects that the visualization applies to.
        The list should be separated by pipe "|"
        See Also:
        Constant Field Values
      • ATT_MIN_SECONDARY_PROVIDERS

        protected static final java.lang.String ATT_MIN_SECONDARY_PROVIDERS
        xml attribute name for the minimum number of secondary data providers
        See Also:
        Constant Field Values
      • ATT_MAX_SECONDARY_PROVIDERS

        protected static final java.lang.String ATT_MAX_SECONDARY_PROVIDERS
        xml attribute name for the maximum number of secondary data providers
        See Also:
        Constant Field Values
      • ATT_INCLUDE_MD_PROPERTIES

        protected static final java.lang.String ATT_INCLUDE_MD_PROPERTIES
        xml attribute name for including the metadata properties on the visualization's XML
        Since:
        MicroStrategy Web 9.0.1
        See Also:
        Constant Field Values
      • ATT_IMAGE

        protected static final java.lang.String ATT_IMAGE
        xml attribute name for visualization's image
        See Also:
        Constant Field Values
      • ATT_PROPS_EDITOR

        protected static final java.lang.String ATT_PROPS_EDITOR
        xml attribute name for the block that defines the layout of the visualization properties editor
        See Also:
        Constant Field Values
      • ATT_IS_MOJO

        protected static final java.lang.String ATT_IS_MOJO
        Whether the visualization is rendered using a mojo class.
        See Also:
        Constant Field Values
      • ATT_DROP_ZONES

        protected static final java.lang.String ATT_DROP_ZONES
        The class name of the drop zones to a certain customized visualization
        See Also:
        Constant Field Values
      • ATT_EDITOR_MODEL

        protected static final java.lang.String ATT_EDITOR_MODEL
        The class name of the editor model to a certain customized visualization
        See Also:
        Constant Field Values
      • ATT_ATTRIBUTE_MINIMUM

        protected static final java.lang.String ATT_ATTRIBUTE_MINIMUM
        The minimum number of attributes required by the visualization
        See Also:
        Constant Field Values
      • ATT_METRIC_MINIMUM

        protected static final java.lang.String ATT_METRIC_MINIMUM
        The minimum number of metrics required by the visualization
        See Also:
        Constant Field Values
      • ATT_SUMMARY

        protected static final java.lang.String ATT_SUMMARY
        The summary / definition of the visualization
        See Also:
        Constant Field Values
      • ATT_USE_CASE

        protected static final java.lang.String ATT_USE_CASE
        The use case / example of the visualization
        See Also:
        Constant Field Values
      • ATT_REQUIREMENTS

        protected static final java.lang.String ATT_REQUIREMENTS
        The number of attributes and metrics required by the visualization, Note: This requirements has higher priority than ATT_ATTRIBUTE_MINIMUM and ATT_METRIC_MINIMUM
        See Also:
        Constant Field Values
      • ATT_FEATURE_ID

        protected static final java.lang.String ATT_FEATURE_ID
        Feature ID that indicates whether this visualization is enabled
        See Also:
        Constant Field Values
      • ATT_WIDGET_TYPE

        protected static final java.lang.String ATT_WIDGET_TYPE
        The widget type of this visualization (used on dashboards)
        See Also:
        Constant Field Values
      • ATT_SUBTYPES

        protected static final java.lang.String ATT_SUBTYPES
        The visualizations subtypes. Used for the graph matrix in dashboards
        See Also:
        Constant Field Values
      • ATT_REACT_CONFIG

        protected static final java.lang.String ATT_REACT_CONFIG
        Flag for custom visualizations to determine if it should use a react configuration
        See Also:
        Constant Field Values
    • Method Detail

      • getKeyAttribute

        protected java.lang.String getKeyAttribute()
        Description copied from class: AbstractConfigurationElement
        This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.
        Specified by:
        getKeyAttribute in class AbstractConfigurationElement
      • getDescriptor

        public java.lang.String getDescriptor()
        Get the identifier of the descriptor to be used for the visualization
        Returns:
        the String value of the descriptor identifier property.
      • setDescriptor

        public void setDescriptor​(java.lang.String descriptor)
        Set the descriptor property value of the visualization instance
        Parameters:
        descriptor - the String value of the descriptor property.
      • getDescriptorId

        public java.lang.String getDescriptorId()
        Get the identifier of the descriptor to be used for the visualization
        Returns:
        the String value of the descriptor identifier property.
      • setDescriptorID

        public void setDescriptorID​(java.lang.String descriptorID)
        Set the identifier of the descriptor to be used for the visualization
        Parameters:
        descriptorID - the String value of the descriptor identifier property.
      • getScope

        public int getScope()
        A bitwise flag that the termines what type of object does this visualization applies to: SCOPE_REPORT SCOPE_RW_GRID SCOPE_RW
        Returns:
        A bitwise flag that the termines what type of object does this visualization applies to.
      • setScope

        public void setScope​(int scope)
        Sets a bitwise flag that the termines what type of object does this visualization applies to: SCOPE_REPORT SCOPE_RW_GRID SCOPE_RW
        Parameters:
        scope - the flag
      • getMinSecondaryProviders

        public int getMinSecondaryProviders()
        Returns:
        the minimum number of secondary data providers
      • setMinSecondaryProviders

        public void setMinSecondaryProviders​(int value)
        Sets the minimum number of secondary data providers
        Parameters:
        value - the minimum number of secondary data providers
      • getMaxSecondaryProviders

        public int getMaxSecondaryProviders()
        Returns:
        the maximum number of secondary data providers
      • setMaxSecondaryProviders

        public void setMaxSecondaryProviders​(int value)
        Sets the maximum number of secondary data providers
        Parameters:
        value - the maximum number of secondary data providers
      • getStyleName

        public java.lang.String getStyleName()
        Get the style-name for this visualization.
        This name must be unique on the visualization list and must match to the name of a style in the style catalog.
        Returns:
        the String value of the name property.
      • setStyleName

        public void setStyleName​(java.lang.String name)
        Sets the name for this visualization.
        This name must be unique on the visualization list and must match to the name of a style in the style catalog.
        Parameters:
        name -
      • getViewMode

        public int getViewMode()
        Returns the view mode from the parent VisualizationList.
        This value will be used to display a specific icon while folder browsing.
        The values should not overlap with the values from EnumWebReportViewMode
        Returns:
        the view mode.
      • getShowInWeb

        public boolean getShowInWeb()
        Whether the object is supposed to be displayed in Web.
        This property is read from the VisualizationList False for mobile.
        Returns:
        Whether the object is supposed to be displayed in Web.
      • setShowInWeb

        public void setShowInWeb​(boolean showInWeb)
        Whether the object is supposed to be displayed in Web.
        This property is read from the VisualizationList False for mobile.
      • setViewMode

        public void setViewMode​(int viewMode)
        Returns the view mode from the parent VisualizationList.
        This value will be used to display a specific icon while folder browsing.
        The values should not overlap with the values from EnumWebReportViewMode
      • getProjects

        public java.lang.String getProjects()
        Get the list of projects that the visualization applies to.
        The list should be separated by pipe "|"
        Returns:
        the String value of the projects property.
      • setProjects

        public void setProjects​(java.lang.String projects)
        Sets the list of projects that the visualization applies to.
        The list should be separated by pipe "|"
        Parameters:
        projects - the list or projects
      • getIncludeMDProperties

        public java.lang.String getIncludeMDProperties()
        Whether to include the metadata properties on the visualization's XML
        Since:
        MicroStrategy Web 9.0.1
      • getImage

        public java.lang.String getImage()
        Returns:
        the visualization's image
      • setImage

        public void setImage​(java.lang.String value)
        Sets the visualization's image
        Parameters:
        value - the visualization's image
      • getPropsEditor

        public java.lang.String getPropsEditor()
        Returns:
        the name of the style that renders the visualization properties editor properties editor
      • setPropsEditor

        public void setPropsEditor​(java.lang.String value)
        Sets the name of the style that renders the visualization's properties editor properties editor
        Parameters:
        value - the name of style
      • isMojo

        public boolean isMojo()
        Returns:
        if the visualization supports mojo
      • getDropZones

        public java.lang.String getDropZones()
        The class name of the drop zones to a certain customized visualization
      • setDropZones

        public void setDropZones​(java.lang.String value)
        The class name of the drop zones to a certain customized visualization
      • getEditorModel

        public java.lang.String getEditorModel()
        The class name of the editor model to a certain customized visualization
      • setEditorModel

        public void setEditorModel​(java.lang.String value)
        The class name of the editor model to a certain customized visualization
      • getAttributeMinimum

        public java.lang.String getAttributeMinimum()
        The minimum number of attributes required by the visualization
      • setAttributeMinimum

        public void setAttributeMinimum​(java.lang.String value)
        Sets the minimum number of attributes required by the visualization
      • getMetricMinimum

        public java.lang.String getMetricMinimum()
        The minimum number of metrics required by the visualization
      • setMetricMinimum

        public void setMetricMinimum​(java.lang.String value)
        Set the minimum number of metrics required by the visualization
      • getSummary

        public java.lang.String getSummary()
        Get the summary / definition of the visualization
      • setSummary

        public void setSummary​(java.lang.String value)
        Set the summary / definition of the visualization
      • getUseCase

        public java.lang.String getUseCase()
        Get the use case / example of the visualization
      • setUseCase

        public void setUseCase​(java.lang.String value)
        Set the use case / example of the visualization
      • getRequirements

        public java.lang.String getRequirements()
        Get the number of attributes and metrics required by the visualization, Note: This requirements has higher priority than ATT_ATTRIBUTE_MINIMUM and ATT_METRIC_MINIMUM
      • setRequirements

        public void setRequirements​(java.lang.String value)
        Set the number of attributes and metrics required by the visualization, Note: This requirements has higher priority than ATT_ATTRIBUTE_MINIMUM and ATT_METRIC_MINIMUM
      • setIsMojo

        public void setIsMojo​(boolean value)
        Sets the is-mojo flag for the visualization
        Parameters:
        value - boolean value if the style supports mojo
      • setIncludeMDProperties

        public void setIncludeMDProperties​(java.lang.String includeMDProperties)
        Whether to include the metadata properties on the visualization's XML
        Parameters:
        includeMDProperties -
        Since:
        MicroStrategy Web 9.0.1
      • getProjectList

        public java.lang.String[] getProjectList()
        Returns:
        the list of projects that the visualization applies to.
      • getId

        public java.lang.String getId()
        An ID attribute used to link a visualization with a widget if the IDs are the same. This is not the ID of the item on the Visualization list.
        Returns:
        the visualization's id.
      • setId

        public void setId​(java.lang.String value)
        Sets the visualization's id. An ID attribute used to link a visualization with a widget if the IDs are the same. This is not the ID of the item on the Visualization list.
        Parameters:
        value - the visualization's ID
      • getKey

        public java.lang.Object getKey()
        Description copied from class: AbstractConfigurationElement
        Default implementation for getKey(). It assumes a single attribute can be used to uniquely identify this element among its siblings; the attribute to use is specified by the getKeyAttribute() method.
        Specified by:
        getKey in interface ConfigurationElement
        Overrides:
        getKey in class AbstractConfigurationElement
        Returns:
        If getKeyAttribute() is empty returns null, otherwise it returns the value of the given attribute.
      • getFeatureID

        public java.lang.String getFeatureID()
        Returns:
        the visualization's feature id that indicates whether this visualization is enabled
      • setFeatureID

        public void setFeatureID​(java.lang.String value)
        Sets the visualization's feature id that indicates whether this visualization is enabled
        Parameters:
        value - the visualization's feature
      • getWidgetType

        public java.lang.String getWidgetType()
        The widget type of this visualization
      • setWidgetType

        public void setWidgetType​(java.lang.String value)
        The widget type of this visualization
      • getSubtypes

        public java.lang.String getSubtypes()
        The visualizations subtypes. Used for the graph matrix in dashboards
      • getUseReactConfig

        public java.lang.String getUseReactConfig()
        Get whether or not we should use a react configuration for this visualization
        Returns:
        string containig 'true' or 'false' to determine if the react config should be used
      • setUseReactConfig

        public void setUseReactConfig​(java.lang.String shouldUse)
        Set if the visualization should use a react configuration
        Parameters:
        shouldUse - string of 'true' or 'false' determining if the react config should be used
      • isValid

        public boolean isValid​(int viewMode,
                               int scope,
                               WebIServerSession session)
        Validates a visualization based on the viewMode, scope and session provided.
        Parameters:
        viewMode - the view mode to validate (-1 means all view modes)
        scope - the scope to validate (-1 means all scopes)
        session - the session used to validate the project (null means ignore)
        Returns:
        whether the visualization is valid
      • isValid

        public boolean isValid​(int viewMode,
                               int scope,
                               WebIServerSession session,
                               WebComponent bean)
        Validates a visualization based on the viewMode, scope and session provided.
        Parameters:
        viewMode - the view mode to validate (-1 means all view modes)
        scope - the scope to validate (-1 means all scopes)
        session - the session used to validate the project (null means ignore)
        bean - used to evaluate a feature
        Returns:
        whether the visualization is valid
      • isObjectInVisualizationMode

        public static boolean isObjectInVisualizationMode​(int visMode)
      • resolveVisualizationViewModeFromAbbreviation

        public static int resolveVisualizationViewModeFromAbbreviation​(java.lang.String abbreviation)
      • isESRIMapVisualization

        public static boolean isESRIMapVisualization​(java.lang.String styleName)
      • isMapboxVisualization

        public static boolean isMapboxVisualization​(java.lang.String styleName)
      • isKPICardVisualization

        public static boolean isKPICardVisualization​(java.lang.String styleName)
      • isCustomSmartKPIVisualization

        public static boolean isCustomSmartKPIVisualization​(java.lang.String styleName)
      • filterRWGridVisualizations

        public static boolean filterRWGridVisualizations​(java.lang.String styleName)