public class

StyleMapConditionImpl

extends AbstractStyleCatalogElement
implements StyleMapClause StyleMapCondition
java.lang.Object
   ↳ com.microstrategy.utils.config.AbstractConfigurationElement
     ↳ com.microstrategy.web.transform.AbstractStyleCatalogElement
       ↳ com.microstrategy.web.transform.StyleMapConditionImpl

Class Overview

This class implements the StyleMapCondition interface for the Style Catalog.

Summary

Constants
String ATTR_NAME_MAPCONDITION_ADDL_DATA The name of the map condition "additional data" attribute.
String ATTR_NAME_MAPCONDITION_MAPPER The name of the map condition mapper attribute.
String ATTR_NAME_MAPCONDITION_TO_STYLE The name of the map condition "to style" attribute.
String ELEM_NAME_MAPCONDITION The name of the map condition element.
[Expand]
Inherited Constants
From class com.microstrategy.utils.config.AbstractConfigurationElement
From interface com.microstrategy.web.transform.StyleMapClause
Public Constructors
StyleMapConditionImpl()
Public Methods
String getAdditionalData()
Returns the additional data associated with this specific mapping condition.
Object getKey()
This method is used to uniquely identify this StyleMapCondition within the StyleMap.
String getMapper()
MapperDefn getMapperDefn()
Returns the MapperDefn object associated with this mapper condition.
String getToStyle()
Returns the style to map to.
int getType()
Returns the type of the clause.
StyleMapperResult mapStyle(String fromStyle, StyleRequestContext context)
Maps the specified style to a new style based on the data in the StyleRequestContext object as well as any additional data specified on the condition.
void setAdditionalData(String addlData)
Sets the additional data associated with this specific mapping condition.
void setMapper(String mapper)
void setMapperDefn(MapperDefn mapperDefn)
Sets the MapperDefn object associated with this mapper condition.
void setToStyle(String toStyle)
Sets the style to map to.
Protected Methods
void clearCaches()
This method is invoked whenever the structure of the style catalog has changed and caches to other objects in the structure needs to be updated.
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.
boolean isKeyAttribute(String name)
Returns true is the name is that of the key attribute.
[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.StyleMapClause
From interface com.microstrategy.web.transform.StyleMapCondition

Constants

public static final String ATTR_NAME_MAPCONDITION_ADDL_DATA

The name of the map condition "additional data" attribute.

Constant Value: "addl_data"

public static final String ATTR_NAME_MAPCONDITION_MAPPER

The name of the map condition mapper attribute.

Constant Value: "mapper"

public static final String ATTR_NAME_MAPCONDITION_TO_STYLE

The name of the map condition "to style" attribute.

Constant Value: "to_style"

public static final String ELEM_NAME_MAPCONDITION

The name of the map condition element.

Constant Value: "MapCondition"

Public Constructors

public StyleMapConditionImpl ()

Public Methods

public String getAdditionalData ()

Returns the additional data associated with this specific mapping condition.

Returns
  • The additional data associated with this specific mapping condition.

public Object getKey ()

This method is used to uniquely identify this StyleMapCondition within the StyleMap.

Returns
  • The value representing the key of this object.

public String getMapper ()

public MapperDefn getMapperDefn ()

Returns the MapperDefn object associated with this mapper condition.

Returns
  • The MapperDefn object associated with this mapper condition.

public String getToStyle ()

Returns the style to map to.

Returns
  • The style to map to.

public int getType ()

Returns the type of the clause.

Returns
  • The type of the clause.

public StyleMapperResult mapStyle (String fromStyle, StyleRequestContext context)

Maps the specified style to a new style based on the data in the StyleRequestContext object as well as any additional data specified on the condition.

Parameters
fromStyle The style that is being requested.
context The data in the current style's request context.
Returns

public void setAdditionalData (String addlData)

Sets the additional data associated with this specific mapping condition.

Parameters
addlData The additional data associated with this specific mapping condition.

public void setMapper (String mapper)

public void setMapperDefn (MapperDefn mapperDefn)

Sets the MapperDefn object associated with this mapper condition.

Parameters
mapperDefn The MapperDefn object associated with this mapper condition.

public void setToStyle (String toStyle)

Sets the style to map to.

Parameters
toStyle The style to map to.

Protected Methods

protected void clearCaches ()

This method is invoked whenever the structure of the style catalog has changed and caches to other objects in the structure needs to be updated.

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.

protected boolean isKeyAttribute (String name)

Returns true is the name is that of the key attribute.