Package com.microstrategy.web.transform
Class StyleMapConditionImpl
- java.lang.Object
-
- com.microstrategy.utils.config.AbstractConfigurationElement
-
- com.microstrategy.web.transform.AbstractStyleCatalogElement
-
- com.microstrategy.web.transform.StyleMapConditionImpl
-
- All Implemented Interfaces:
ConfigurationElement
,ConfigurationFile
,StyleMapClause
,StyleMapCondition
,java.lang.Cloneable
public class StyleMapConditionImpl extends AbstractStyleCatalogElement implements StyleMapCondition
This class implements theStyleMapCondition
interface 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.String
ATTR_NAME_MAPCONDITION_ADDL_DATA
The name of the map condition "additional data" attribute.static java.lang.String
ATTR_NAME_MAPCONDITION_MAPPER
The name of the map condition mapper attribute.static java.lang.String
ATTR_NAME_MAPCONDITION_TO_STYLE
The name of the map condition "to style" attribute.static java.lang.String
ELEM_NAME_MAPCONDITION
The name of the map condition 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 StyleMapConditionImpl()
-
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.java.lang.String
getAdditionalData()
Returns the additional data associated with this specific mapping condition.java.lang.Object
getKey()
This method is used to uniquely identify this StyleMapCondition within the StyleMap.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
getMapper()
MapperDefn
getMapperDefn()
Returns theMapperDefn
object associated with this mapper condition.java.lang.String
getToStyle()
Returns the style to map to.int
getType()
Returns the type of the clause.protected boolean
isKeyAttribute(java.lang.String name)
Returnstrue
is the name is that of the key attribute.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
setAdditionalData(java.lang.String addlData)
Sets the additional data associated with this specific mapping condition.void
setMapper(java.lang.String mapper)
void
setMapperDefn(MapperDefn mapperDefn)
Sets theMapperDefn
object associated with this mapper 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, 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, 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, getNodeName, getStrAttribute, initFromXML, reload, toXML
-
Methods inherited from interface com.microstrategy.web.transform.StyleMapClause
getType
-
-
-
-
Field Detail
-
ELEM_NAME_MAPCONDITION
public static final java.lang.String ELEM_NAME_MAPCONDITION
The name of the map condition element.- See Also:
- Constant Field Values
-
ATTR_NAME_MAPCONDITION_TO_STYLE
public static final java.lang.String ATTR_NAME_MAPCONDITION_TO_STYLE
The name of the map condition "to style" attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_MAPCONDITION_MAPPER
public static final java.lang.String ATTR_NAME_MAPCONDITION_MAPPER
The name of the map condition mapper attribute.- See Also:
- Constant Field Values
-
ATTR_NAME_MAPCONDITION_ADDL_DATA
public static final java.lang.String ATTR_NAME_MAPCONDITION_ADDL_DATA
The name of the map condition "additional data" attribute.- See Also:
- Constant Field Values
-
-
Method Detail
-
getMapperDefn
public MapperDefn getMapperDefn()
Returns theMapperDefn
object associated with this mapper condition.- Specified by:
getMapperDefn
in interfaceStyleMapCondition
- Returns:
- The
MapperDefn
object associated with this mapper condition.
-
setMapperDefn
public void setMapperDefn(MapperDefn mapperDefn)
Sets theMapperDefn
object associated with this mapper condition.- Specified by:
setMapperDefn
in interfaceStyleMapCondition
- Parameters:
mapperDefn
- TheMapperDefn
object associated with this mapper condition.
-
getMapper
public java.lang.String getMapper()
-
setMapper
public void setMapper(java.lang.String mapper)
-
getAdditionalData
public java.lang.String getAdditionalData()
Returns the additional data associated with this specific mapping condition.- Specified by:
getAdditionalData
in interfaceStyleMapCondition
- Returns:
- The additional data associated with this specific mapping condition.
-
setAdditionalData
public void setAdditionalData(java.lang.String addlData)
Sets the additional data associated with this specific mapping condition.- Specified by:
setAdditionalData
in interfaceStyleMapCondition
- Parameters:
addlData
- The additional data associated with this specific mapping condition.
-
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
-
getKey
public java.lang.Object getKey()
This method is used to uniquely identify this StyleMapCondition within the StyleMap.- Specified by:
getKey
in interfaceConfigurationElement
- Overrides:
getKey
in classAbstractConfigurationElement
- Returns:
- The value representing the key of this object.
- Since:
- MicroStrategy Web 9.0.1
-
isKeyAttribute
protected boolean isKeyAttribute(java.lang.String name)
Description copied from class:AbstractConfigurationElement
Returnstrue
is the name is that of the key attribute.- Overrides:
isKeyAttribute
in classAbstractConfigurationElement
- Since:
- MicroStrategy Web 9.0.1
-
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
-
-