Package com.microstrategy.web.transform
Class StyleMapImpl
- java.lang.Object
 - 
- com.microstrategy.utils.config.AbstractConfigurationElement
 - 
- com.microstrategy.web.transform.AbstractStyleCatalogElement
 - 
- com.microstrategy.web.transform.StyleMapImpl
 
 
 
 
- 
- All Implemented Interfaces:
 ConfigurationElement,ConfigurationFile,StyleMap,java.lang.Cloneable
public class StyleMapImpl extends AbstractStyleCatalogElement implements StyleMap
This class implements theStyleMapinterface for the Style Catalog.- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
AbstractConfigurationElement.FilteredList 
 - 
 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTR_NAME_STYLEMAP_FROM_STYLEThe name of the style map "from style" attribute.static java.lang.StringELEM_NAME_STYLEMAPThe name of the style map element.- 
Fields inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
ATT_CONFIG_SRC, ATT_DELETED, ATT_POSITION, ATT_PROTOTYPE, ATT_USE_DEFAULT 
 - 
 
- 
Constructor Summary
Constructors Constructor Description StyleMapImpl() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclear()Clears the collection of style map clause objects.intgetCount()Returns the number ofStyleMapClauseobjects in this collection.protected java.lang.StringgetKeyAttribute()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 thegetKeyandsetKeymethods.StyleMapClausegetStyleMapClause(int index)Gets theStyleMapClauseassociated with supplied index.java.lang.StringgetStyleName()Returns the style name that this map exists for.java.lang.StringmapStyle(java.lang.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.StyleMapConditionnewStyleMapCondition(java.lang.String toStyle)Deprecated.StyleMapConditionnewStyleMapCondition(java.lang.String toStyle, java.lang.String mapperDefn, java.lang.String addlData)Creates a new style map condition object that, if the conditions were satisfied, would map the style to the specified name.voidremove(int index)Removes theStyleMapClauseobject at the specified index.StyleMapDefaultsetStyleMapDefault(java.lang.String toStyle)Creates a new style map default object that maps the style to the specified name.voidsetStyleName(java.lang.String styleName)Sets the style name that this map exists for.- 
Methods inherited from class com.microstrategy.web.transform.AbstractStyleCatalogElement
clearCaches, copyContents, getStyleCatalog, hasChanged, reload, resetChanged, setStrAttribute 
- 
Methods inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
addFileSource, applyCustomization, applyCustomizations, cleanUpDeletedElements, clone, delete, deltas, deltas, equalAtts, equalElements, equalNodeValues, equals, equalsIncludingDeletedElements, exportAttributesToXML, exportElementsToXML, exportNodeValueToXML, getAttribute, getAttributes, getBoolAttribute, getChildKey, getConfigSrc, getDTDFileName, getElement, getElement, getElements, getFileLoader, getIntAttribute, getIntAttribute, getKey, getLineNumber, getList, getNextKey, getNodeName, getNodeValue, getNodeValue, getOrCreateElement, getParent, getPosition, getPrototype, getRegisteredClass, getSelfInitPath, getSource, getStrAttribute, getUseDefault, getXMLParserParameters, getXMLSerializerParameters, hashCode, hashCodeAtts, hashCodeElements, hashCodeNodeValues, hasRegisteredClass, initAttributesFromXML, initDefaultAttributes, initElementFromXML, initElementsFromXML, initFromFile, initFromResource, initFromXML, initFromXML, initNodeValueFromXML, initPrototype, isActive, isCustomized, isDeleted, isDirty, isInSource, isKeyAttribute, load, mergeChanges, newChildInstance, newSource, original, populate, printAttributes, printElements, printNodeValue, refreshLists, registerClass, registerElement, registerElement, registerElementList, reloadPrototype, removeAttribute, removeDefaults, replaceList, restore, save, save, saveChangesAs, saveConfig, saveFlatXML, saveNode, saveSource, setAttribute, setBoolAttribute, setChildOriginals, setConfigSrc, setCustomized, setElement, setFileLoader, setIntAttribute, setKey, setLineNumber, setNodeName, setNodeValue, setPosition, setPrototype, setSelfInitPath, setUseDefault, setUseValidation, throwConfigParseException, toString, toXML, toXML, toXML, toXML, useNodeValue, useValidation 
- 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface com.microstrategy.utils.config.ConfigurationElement
getAttribute, getAttributes, getElement, getElements, getKey, getNodeName, getStrAttribute, initFromXML, reload, toXML 
 - 
 
 - 
 
- 
- 
Field Detail
- 
ELEM_NAME_STYLEMAP
public static final java.lang.String ELEM_NAME_STYLEMAP
The name of the style map element.- See Also:
 - Constant Field Values
 
 
- 
ATTR_NAME_STYLEMAP_FROM_STYLE
public static final java.lang.String ATTR_NAME_STYLEMAP_FROM_STYLE
The name of the style map "from style" attribute.- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
getStyleName
public java.lang.String getStyleName()
Returns the style name that this map exists for.- Specified by:
 getStyleNamein interfaceStyleMap- Returns:
 - The style name that this map exists for.
 
 
- 
setStyleName
public void setStyleName(java.lang.String styleName)
Sets the style name that this map exists for.- Specified by:
 setStyleNamein interfaceStyleMap- Parameters:
 styleName- The name of the style that this map exists for.- Throws:
 java.lang.IllegalArgumentException- DOCUMENT ME!
 
- 
getCount
public int getCount()
Returns the number ofStyleMapClauseobjects in this collection. 
- 
getStyleMapClause
public StyleMapClause getStyleMapClause(int index) throws java.lang.IndexOutOfBoundsException
Gets theStyleMapClauseassociated with supplied index. A valid index begins at 0 and continues togetCount() - 1.- Specified by:
 getStyleMapClausein interfaceStyleMap- Parameters:
 index- The index of theStyleMapClauseto return.- Returns:
 - The 
StyleMapClauseat the supplied index. - Throws:
 java.lang.IndexOutOfBoundsException- This exception is thown if the argument is outside the range of a valid index.
 
- 
clear
public void clear() throws java.lang.UnsupportedOperationExceptionDescription copied from interface:StyleMapClears the collection of style map clause objects. 
- 
remove
public void remove(int index) throws java.lang.IndexOutOfBoundsException, java.lang.UnsupportedOperationExceptionRemoves theStyleMapClauseobject at the specified index.- Specified by:
 removein interfaceStyleMap- Parameters:
 index- The index of the style map clause object to remove.- Throws:
 java.lang.IndexOutOfBoundsException- This exception is thown if the argument is outside the range of a valid index.java.lang.UnsupportedOperationException- This exception is thrown if the Style Catalog is in "read only" mode.
 
- 
newStyleMapCondition
public StyleMapCondition newStyleMapCondition(java.lang.String toStyle) throws java.lang.UnsupportedOperationException
Deprecated.Creates a new style map condition object that, if the conditions were satifisfied, would map the style to the specified name.- Specified by:
 newStyleMapConditionin interfaceStyleMap- Parameters:
 toStyle- The name of the style to use if the conditions were met.- Returns:
 - A new 
StyleMapConditionobject. - Throws:
 java.lang.UnsupportedOperationException- This exception is thrown if the Style Catalog is in "read only" mode.
 
- 
newStyleMapCondition
public StyleMapCondition newStyleMapCondition(java.lang.String toStyle, java.lang.String mapperDefn, java.lang.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 theMapperDefnobject associated with this mapping condition.addlData- The additional data associated with this mapping condition.- Returns:
 - A new 
StyleMapConditionobject. - Since:
 - MicroStrategy Web 9.0.1
 
 
- 
setStyleMapDefault
public StyleMapDefault setStyleMapDefault(java.lang.String toStyle) throws java.lang.UnsupportedOperationException
Creates a new style map default object that maps the style to the specified name.- Specified by:
 setStyleMapDefaultin interfaceStyleMap- Parameters:
 toStyle- The name of the style to use.- Returns:
 - A new 
StyleMapDefaultobject. - Throws:
 java.lang.UnsupportedOperationException- This exception is thrown if the Style Catalog is in "read only" mode.
 
- 
mapStyle
public java.lang.String mapStyle(java.lang.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.- Specified by:
 mapStylein interfaceStyleMap- Parameters:
 origStyleName- The original style name.context- TheStyleRequestContextobject that contain context data.- Returns:
 - The name of the new style name to use.
 
 
- 
getKeyAttribute
protected java.lang.String getKeyAttribute()
Description copied from class:AbstractConfigurationElementThis method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override thegetKeyandsetKeymethods.- Specified by:
 getKeyAttributein classAbstractConfigurationElement
 
 - 
 
 -