public class

Visualization

extends AbstractConfigurationElement
java.lang.Object
   ↳ com.microstrategy.utils.config.AbstractConfigurationElement
     ↳ com.microstrategy.web.config.Visualization

Class Overview

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.

Summary

Constants
String ATT_ATTRIBUTE_MINIMUM The minimum number of attributes required by the visualization
String ATT_DESC xml attribute name for the description of the visualization
String ATT_DESC_ID xml attribute name for the descriptor ID of the visualization
String ATT_DROP_ZONES The class name of the drop zones to a certain customized visualization
String ATT_EDITOR_MODEL The class name of the editor model to a certain customized visualization
String ATT_FEATURE_ID Feature ID that indicates whether this visualization is enabled
String ATT_ID xml attribute name for the id of the visualization
String ATT_IMAGE xml attribute name for visualization's image
String ATT_INCLUDE_MD_PROPERTIES xml attribute name for including the metadata properties on the visualization's XML
String ATT_IS_MOJO Whether the visualization is rendered using a mojo class.
String ATT_MAX_SECONDARY_PROVIDERS xml attribute name for the maximum number of secondary data providers
String ATT_METRIC_MINIMUM The minimum number of metrics required by the visualization
String ATT_MIN_SECONDARY_PROVIDERS xml attribute name for the minimum number of secondary data providers
String ATT_PROJECTS xml attribute name for the list of projects that the visualization applies to.
String ATT_PROPS_EDITOR xml attribute name for the block that defines the layout of the visualization properties editor
String ATT_SCOPE xml attribute name for the scope of the visualization
String ATT_STYLE_NAME xml attribute name for the style-name of the visualization
String ATT_SUBTYPES The visualizations subtypes.
String ATT_WIDGET_TYPE The widget type of this visualization (used on dashboards)
String NODE_VISUALIZATION constant for the shortcut list node name
int SCOPE_ALL
int SCOPE_DASHBOARD
int SCOPE_REPORT
int SCOPE_RW
int SCOPE_RW_GRID
int SCOPE_RW_LAYOUT
[Expand]
Inherited Constants
From class com.microstrategy.utils.config.AbstractConfigurationElement
Public Constructors
Visualization(Node root)
Creates a Visualization with the information in the Xml Node.
Visualization(Node root, VisualizationList parentNode)
This constructor is deprecated. use Visualization(Node) instead
Visualization()
Visualization(String styleName, String description, VisualizationList parentNode)
This constructor is deprecated. use Visualization(String, String) instead.
Visualization(String styleName, String description)
Public Methods
String getAttributeMinimum()
The minimum number of attributes required by the visualization
String getDescriptor()
Get the identifier of the descriptor to be used for the visualization
String getDescriptorId()
Get the identifier of the descriptor to be used for the visualization
String getDropZones()
The class name of the drop zones to a certain customized visualization
String getEditorModel()
The class name of the editor model to a certain customized visualization
String getFeatureID()
String getId()
An ID attribute used to link a visualization with a widget if the IDs are the same.
String getImage()
String getIncludeMDProperties()
Whether to include the metadata properties on the visualization's XML
Object getKey()
Default implementation for getKey().
int getMaxSecondaryProviders()
String getMetricMinimum()
The minimum number of metrics required by the visualization
int getMinSecondaryProviders()
String[] getProjectList()
String getProjects()
Get the list of projects that the visualization applies to.
String getPropsEditor()
int getScope()
A bitwise flag that the termines what type of object does this visualization applies to: SCOPE_REPORT SCOPE_RW_GRID SCOPE_RW
boolean getShowInWeb()
Whether the object is supposed to be displayed in Web.
String getStyleName()
Get the style-name for this visualization.
String getSubtypes()
The visualizations subtypes.
int getViewMode()
Returns the view mode from the parent VisualizationList.
String getWidgetType()
The widget type of this visualization
static boolean isESRIMapVisualization(String styleName)
boolean isMojo()
static boolean isObjectInVisualizationMode(int visMode)
boolean isValid(int viewMode, int scope, WebIServerSession session, WebComponent bean)
Validates a visualization based on the viewMode, scope and session provided.
boolean isValid(int viewMode, int scope, WebIServerSession session)
Validates a visualization based on the viewMode, scope and session provided.
static int resolveVisualizationViewModeFromAbbreviation(String abbreviation)
void setAttributeMinimum(String value)
Sets the minimum number of attributes required by the visualization
void setDescriptor(String descriptor)
Set the descriptor property value of the visualization instance
void setDescriptorID(String descriptorID)
Set the identifier of the descriptor to be used for the visualization
void setDropZones(String value)
The class name of the drop zones to a certain customized visualization
void setEditorModel(String value)
The class name of the editor model to a certain customized visualization
void setFeatureID(String value)
Sets the visualization's feature id that indicates whether this visualization is enabled
void setId(String value)
Sets the visualization's id.
void setImage(String value)
Sets the visualization's image
void setIncludeMDProperties(String includeMDProperties)
Whether to include the metadata properties on the visualization's XML
void setIsMojo(boolean value)
Sets the is-mojo flag for the visualization
void setMaxSecondaryProviders(int value)
Sets the maximum number of secondary data providers
void setMetricMinimum(String value)
Set the minimum number of metrics required by the visualization
void setMinSecondaryProviders(int value)
Sets the minimum number of secondary data providers
void setProjects(String projects)
Sets the list of projects that the visualization applies to.
void setPropsEditor(String value)
Sets the name of the style that renders the visualization's properties editor properties editor
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
void setShowInWeb(boolean showInWeb)
Whether the object is supposed to be displayed in Web.
void setStyleName(String name)
Sets the name for this visualization.
void setViewMode(int viewMode)
Returns the view mode from the parent VisualizationList.
void setWidgetType(String value)
The widget type of this visualization
Protected Methods
String getKeyAttribute()
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.
[Expand]
Inherited Methods
From class com.microstrategy.utils.config.AbstractConfigurationElement
From class java.lang.Object
From interface com.microstrategy.utils.config.ConfigurationElement
From interface com.microstrategy.utils.config.ConfigurationFile

Constants

protected static final String ATT_ATTRIBUTE_MINIMUM

The minimum number of attributes required by the visualization

Constant Value: "attribute-minimum"

protected static final String ATT_DESC

xml attribute name for the description of the visualization

Constant Value: "desc"

protected static final String ATT_DESC_ID

xml attribute name for the descriptor ID of the visualization

Constant Value: "desc-id"

protected static final String ATT_DROP_ZONES

The class name of the drop zones to a certain customized visualization

Constant Value: "drop-zones"

protected static final String ATT_EDITOR_MODEL

The class name of the editor model to a certain customized visualization

Constant Value: "editor-model"

protected static final String ATT_FEATURE_ID

Feature ID that indicates whether this visualization is enabled

Constant Value: "feature-id"

protected static final String ATT_ID

xml attribute name for the id of the visualization

Constant Value: "id"

protected static final String ATT_IMAGE

xml attribute name for visualization's image

Constant Value: "image"

protected static final String ATT_INCLUDE_MD_PROPERTIES

xml attribute name for including the metadata properties on the visualization's XML

Constant Value: "includeMDProperties"

protected static final String ATT_IS_MOJO

Whether the visualization is rendered using a mojo class.

Constant Value: "is-mojo"

protected static final String ATT_MAX_SECONDARY_PROVIDERS

xml attribute name for the maximum number of secondary data providers

Constant Value: "maxSecondaryProviders"

protected static final String ATT_METRIC_MINIMUM

The minimum number of metrics required by the visualization

Constant Value: "metric-minimum"

protected static final String ATT_MIN_SECONDARY_PROVIDERS

xml attribute name for the minimum number of secondary data providers

Constant Value: "minSecondaryProviders"

protected static final String ATT_PROJECTS

xml attribute name for the list of projects that the visualization applies to.
The list should be separated by pipe "|"

Constant Value: "projects"

protected static final String ATT_PROPS_EDITOR

xml attribute name for the block that defines the layout of the visualization properties editor

Constant Value: "propsEditor"

protected static final String ATT_SCOPE

xml attribute name for the scope of the visualization

Constant Value: "scope"

protected static final String ATT_STYLE_NAME

xml attribute name for the style-name of the visualization

Constant Value: "style-name"

protected static final String ATT_SUBTYPES

The visualizations subtypes. Used for the graph matrix in dashboards

Constant Value: "subtypes"

protected static final String ATT_WIDGET_TYPE

The widget type of this visualization (used on dashboards)

Constant Value: "widget-type"

public static final String NODE_VISUALIZATION

constant for the shortcut list node name

Constant Value: "visualization"

public static final int SCOPE_ALL

Constant Value: -1 (0xffffffff)

public static final int SCOPE_DASHBOARD

Constant Value: 16 (0x00000010)

public static final int SCOPE_REPORT

Constant Value: 1 (0x00000001)

public static final int SCOPE_RW

Constant Value: 4 (0x00000004)

public static final int SCOPE_RW_GRID

Constant Value: 2 (0x00000002)

public static final int SCOPE_RW_LAYOUT

Constant Value: 8 (0x00000008)

Public Constructors

public Visualization (Node root)

Creates a Visualization with the information in the Xml Node. Internally it calls initFromXML(Node).

Parameters
root the xml node.

public Visualization (Node root, VisualizationList parentNode)

This constructor is deprecated.
use Visualization(Node) instead

Creates a Visualization with the information in the Xml Node. Internally it calls initFromXML(Node).

Parameters
root the xml node.

public Visualization ()

public Visualization (String styleName, String description, VisualizationList parentNode)

This constructor is deprecated.
use Visualization(String, String) instead.

Constructor

public Visualization (String styleName, String description)

Public Methods

public String getAttributeMinimum ()

The minimum number of attributes required by the visualization

public String getDescriptor ()

Get the identifier of the descriptor to be used for the visualization

Returns
  • the String value of the descriptor identifier property.

public String getDescriptorId ()

Get the identifier of the descriptor to be used for the visualization

Returns
  • the String value of the descriptor identifier property.

public String getDropZones ()

The class name of the drop zones to a certain customized visualization

public String getEditorModel ()

The class name of the editor model to a certain customized visualization

public String getFeatureID ()

Returns
  • the visualization's feature id that indicates whether this visualization is enabled

public 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.

public String getImage ()

Returns
  • the visualization's image

public String getIncludeMDProperties ()

Whether to include the metadata properties on the visualization's XML

public Object getKey ()

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.

Returns
  • If getKeyAttribute() is empty returns null, otherwise it returns the value of the given attribute.

public int getMaxSecondaryProviders ()

Returns
  • the maximum number of secondary data providers

public String getMetricMinimum ()

The minimum number of metrics required by the visualization

public int getMinSecondaryProviders ()

Returns
  • the minimum number of secondary data providers

public String[] getProjectList ()

Returns
  • the list of projects that the visualization applies to.

public 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.

public String getPropsEditor ()

Returns
  • the name of the style that renders the visualization properties editor properties editor

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.

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.

public 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.

public String getSubtypes ()

The visualizations subtypes. Used for the graph matrix in dashboards

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.

public String getWidgetType ()

The widget type of this visualization

public static boolean isESRIMapVisualization (String styleName)

public boolean isMojo ()

Returns
  • if the visualization supports mojo

public static boolean isObjectInVisualizationMode (int visMode)

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

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

public static int resolveVisualizationViewModeFromAbbreviation (String abbreviation)

public void setAttributeMinimum (String value)

Sets the minimum number of attributes required by the visualization

public void setDescriptor (String descriptor)

Set the descriptor property value of the visualization instance

Parameters
descriptor the String value of the descriptor property.

public void setDescriptorID (String descriptorID)

Set the identifier of the descriptor to be used for the visualization

Parameters
descriptorID the String value of the descriptor identifier property.

public void setDropZones (String value)

The class name of the drop zones to a certain customized visualization

public void setEditorModel (String value)

The class name of the editor model to a certain customized visualization

public void setFeatureID (String value)

Sets the visualization's feature id that indicates whether this visualization is enabled

Parameters
value the visualization's feature

public void setId (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

public void setImage (String value)

Sets the visualization's image

Parameters
value the visualization's image

public void setIncludeMDProperties (String includeMDProperties)

Whether to include the metadata properties on the visualization's XML

public void setIsMojo (boolean value)

Sets the is-mojo flag for the visualization

Parameters
value boolean value if the style supports mojo

public void setMaxSecondaryProviders (int value)

Sets the maximum number of secondary data providers

Parameters
value the maximum number of secondary data providers

public void setMetricMinimum (String value)

Set the minimum number of metrics required by the visualization

public void setMinSecondaryProviders (int value)

Sets the minimum number of secondary data providers

Parameters
value the minimum number of secondary data providers

public void setProjects (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

public void setPropsEditor (String value)

Sets the name of the style that renders the visualization's properties editor properties editor

Parameters
value the name of style

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

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.

public void setStyleName (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.

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

public void setWidgetType (String value)

The widget type of this visualization

Protected Methods

protected String getKeyAttribute ()

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.