Package com.microstrategy.web.transform
Class StyleMapDefaultImpl
- java.lang.Object
-
- com.microstrategy.utils.config.AbstractConfigurationElement
-
- com.microstrategy.web.transform.AbstractStyleCatalogElement
-
- com.microstrategy.web.transform.StyleMapDefaultImpl
-
- All Implemented Interfaces:
ConfigurationElement
,ConfigurationFile
,StyleMapClause
,StyleMapDefault
,java.lang.Cloneable
public class StyleMapDefaultImpl extends AbstractStyleCatalogElement implements StyleMapDefault
This class represents a "default" clause in a Style Map.- 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.String
ATTR_NAME_MAPDEFAULT_TO_STYLE
The name of the map default "to style" attribute.static java.lang.String
ELEM_NAME_MAPDEFAULT
The name of the map default element.-
Fields inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
ATT_CONFIG_SRC, ATT_DELETED, ATT_POSITION, ATT_PROTOTYPE, ATT_USE_DEFAULT
-
Fields inherited from interface com.microstrategy.web.transform.StyleMapClause
CLAUSE_CONDITION, CLAUSE_DEFAULT, CLAUSE_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description StyleMapDefaultImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 java.lang.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 thegetKey
andsetKey
methods.java.lang.String
getToStyle()
Returns the style to map to.int
getType()
Returns the type of the clause.StyleMapperResult
mapStyle(java.lang.String fromStyle, StyleRequestContext context)
Maps the specified style to a new style based on the data in theStyleRequestContext
object as well as any additional data specified on the condition.void
setToStyle(java.lang.String toStyle)
Sets the style to map to.-
Methods inherited from class com.microstrategy.web.transform.AbstractStyleCatalogElement
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
-
Methods inherited from interface com.microstrategy.web.transform.StyleMapClause
getType
-
-
-
-
Field Detail
-
ELEM_NAME_MAPDEFAULT
public static final java.lang.String ELEM_NAME_MAPDEFAULT
The name of the map default element.- See Also:
- Constant Field Values
-
ATTR_NAME_MAPDEFAULT_TO_STYLE
public static final java.lang.String ATTR_NAME_MAPDEFAULT_TO_STYLE
The name of the map default "to style" attribute.- See Also:
- Constant Field Values
-
-
Method Detail
-
mapStyle
public StyleMapperResult mapStyle(java.lang.String fromStyle, StyleRequestContext context)
Maps the specified style to a new style based on the data in theStyleRequestContext
object as well as any additional data specified on the condition.- Specified by:
mapStyle
in interfaceStyleMapClause
- Parameters:
fromStyle
- The style that is being requested.context
- The data in the current style's request context.- Returns:
- A
StyleMapperResult
object that describes the result of the mapping condition.
-
getToStyle
public java.lang.String getToStyle()
Returns the style to map to.- Specified by:
getToStyle
in interfaceStyleMapClause
- Returns:
- The style to map to.
-
setToStyle
public void setToStyle(java.lang.String toStyle)
Sets the style to map to.- Specified by:
setToStyle
in interfaceStyleMapClause
- Parameters:
toStyle
- The style to map to.
-
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 thegetKey
andsetKey
methods.- Specified by:
getKeyAttribute
in classAbstractConfigurationElement
-
clearCaches
protected void clearCaches()
Description copied from class:AbstractStyleCatalogElement
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.- Overrides:
clearCaches
in classAbstractStyleCatalogElement
-
getType
public int getType()
Returns the type of the clause.- Specified by:
getType
in interfaceStyleMapClause
- Returns:
- The type of the clause.
- See Also:
StyleMapClause.CLAUSE_CONDITION
,StyleMapClause.CLAUSE_DEFAULT
-
-