public class

StyleMapImpl

extends AbstractStyleCatalogElement
implements StyleMap
java.lang.Object
   ↳ com.microstrategy.utils.config.AbstractConfigurationElement
     ↳ com.microstrategy.web.transform.AbstractStyleCatalogElement
       ↳ com.microstrategy.web.transform.StyleMapImpl

Class Overview

This class implements the StyleMap interface for the Style Catalog.

Summary

Constants
String ATTR_NAME_STYLEMAP_FROM_STYLE The name of the style map "from style" attribute.
String ELEM_NAME_STYLEMAP The name of the style map element.
[Expand]
Inherited Constants
From class com.microstrategy.utils.config.AbstractConfigurationElement
Public Constructors
StyleMapImpl()
Public Methods
void clear()
Clears the collection of style map clause objects.
int getCount()
Returns the number of StyleMapClause objects in this collection.
StyleMapClause getStyleMapClause(int index)
Gets the StyleMapClause associated with supplied index.
String getStyleName()
Returns the style name that this map exists for.
String mapStyle(String origStyleName, StyleRequestContext context)
Maps the original style name to a new one, based on the "style map clauses" contained in this map along with any contextual data.
StyleMapCondition newStyleMapCondition(String toStyle)
This method is deprecated. replaced by newStyleMapCondition(String, String, String)
StyleMapCondition newStyleMapCondition(String toStyle, String mapperDefn, String addlData)
Creates a new style map condition object that, if the conditions were satisfied, would map the style to the specified name.
void remove(int index)
Removes the StyleMapClause object at the specified index.
StyleMapDefault setStyleMapDefault(String toStyle)
Creates a new style map default object that maps the style to the specified name.
void setStyleName(String styleName)
Sets the style name that this map exists for.
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.web.transform.AbstractStyleCatalogElement
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
From interface com.microstrategy.web.transform.StyleMap

Constants

public static final String ATTR_NAME_STYLEMAP_FROM_STYLE

The name of the style map "from style" attribute.

Constant Value: "from_style"

public static final String ELEM_NAME_STYLEMAP

The name of the style map element.

Constant Value: "StyleMap"

Public Constructors

public StyleMapImpl ()

Public Methods

public void clear ()

Clears the collection of style map clause objects.

Throws
UnsupportedOperationException

public int getCount ()

Returns the number of StyleMapClause objects in this collection.

Returns
  • The count of style map clause objects.

public StyleMapClause getStyleMapClause (int index)

Gets the StyleMapClause associated with supplied index. A valid index begins at 0 and continues to getCount() - 1.

Parameters
index The index of the StyleMapClause to return.
Returns
Throws
IndexOutOfBoundsException This exception is thown if the argument is outside the range of a valid index.

public String getStyleName ()

Returns the style name that this map exists for.

Returns
  • The style name that this map exists for.

public String mapStyle (String origStyleName, StyleRequestContext context)

Maps the original style name to a new one, based on the "style map clauses" contained in this map along with any contextual data.

Parameters
origStyleName The original style name.
context The StyleRequestContext object that contain context data.
Returns
  • The name of the new style name to use.

public StyleMapCondition newStyleMapCondition (String toStyle)

This method is deprecated.
replaced by newStyleMapCondition(String, String, String)

Creates a new style map condition object that, if the conditions were satifisfied, would map the style to the specified name.

Parameters
toStyle The name of the style to use if the conditions were met.
Returns
Throws
UnsupportedOperationException This exception is thrown if the Style Catalog is in "read only" mode.

public StyleMapCondition newStyleMapCondition (String toStyle, String mapperDefn, String addlData)

Creates a new style map condition object that, if the conditions were satisfied, would map the style to the specified name.

Parameters
toStyle The name of the style to use if the conditions were met.
mapperDefn The name of the MapperDefn object associated with this mapping condition.
addlData The additional data associated with this mapping condition.
Returns

public void remove (int index)

Removes the StyleMapClause object at the specified index.

Parameters
index The index of the style map clause object to remove.
Throws
IndexOutOfBoundsException This exception is thown if the argument is outside the range of a valid index.
UnsupportedOperationException This exception is thrown if the Style Catalog is in "read only" mode.

public StyleMapDefault setStyleMapDefault (String toStyle)

Creates a new style map default object that maps the style to the specified name.

Parameters
toStyle The name of the style to use.
Returns
Throws
UnsupportedOperationException This exception is thrown if the Style Catalog is in "read only" mode.

public void setStyleName (String styleName)

Sets the style name that this map exists for.

Parameters
styleName The name of the style that this map exists for.
Throws
IllegalArgumentException DOCUMENT ME!

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.