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 theStyleMapConditioninterface 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_MAPCONDITION_ADDL_DATAThe name of the map condition "additional data" attribute.static java.lang.StringATTR_NAME_MAPCONDITION_MAPPERThe name of the map condition mapper attribute.static java.lang.StringATTR_NAME_MAPCONDITION_TO_STYLEThe name of the map condition "to style" attribute.static java.lang.StringELEM_NAME_MAPCONDITIONThe 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 voidclearCaches()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.StringgetAdditionalData()Returns the additional data associated with this specific mapping condition.java.lang.ObjectgetKey()This method is used to uniquely identify this StyleMapCondition within the StyleMap.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.java.lang.StringgetMapper()MapperDefngetMapperDefn()Returns theMapperDefnobject associated with this mapper condition.java.lang.StringgetToStyle()Returns the style to map to.intgetType()Returns the type of the clause.protected booleanisKeyAttribute(java.lang.String name)Returnstrueis the name is that of the key attribute.StyleMapperResultmapStyle(java.lang.String fromStyle, StyleRequestContext context)Maps the specified style to a new style based on the data in theStyleRequestContextobject as well as any additional data specified on the condition.voidsetAdditionalData(java.lang.String addlData)Sets the additional data associated with this specific mapping condition.voidsetMapper(java.lang.String mapper)voidsetMapperDefn(MapperDefn mapperDefn)Sets theMapperDefnobject associated with this mapper condition.voidsetToStyle(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 theMapperDefnobject associated with this mapper condition.- Specified by:
 getMapperDefnin interfaceStyleMapCondition- Returns:
 - The 
MapperDefnobject associated with this mapper condition. 
 
- 
setMapperDefn
public void setMapperDefn(MapperDefn mapperDefn)
Sets theMapperDefnobject associated with this mapper condition.- Specified by:
 setMapperDefnin interfaceStyleMapCondition- Parameters:
 mapperDefn- TheMapperDefnobject 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:
 getAdditionalDatain 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:
 setAdditionalDatain 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 theStyleRequestContextobject as well as any additional data specified on the condition.- Specified by:
 mapStylein interfaceStyleMapClause- Parameters:
 fromStyle- The style that is being requested.context- The data in the current style's request context.- Returns:
 - A 
StyleMapperResultobject that describes the result of the mapping condition. 
 
- 
getToStyle
public java.lang.String getToStyle()
Returns the style to map to.- Specified by:
 getToStylein interfaceStyleMapClause- Returns:
 - The style to map to.
 
 
- 
setToStyle
public void setToStyle(java.lang.String toStyle)
Sets the style to map to.- Specified by:
 setToStylein interfaceStyleMapClause- Parameters:
 toStyle- The style to map to.
 
- 
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
 
- 
getKey
public java.lang.Object getKey()
This method is used to uniquely identify this StyleMapCondition within the StyleMap.- Specified by:
 getKeyin interfaceConfigurationElement- Overrides:
 getKeyin 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:AbstractConfigurationElementReturnstrueis the name is that of the key attribute.- Overrides:
 isKeyAttributein classAbstractConfigurationElement- Since:
 - MicroStrategy Web 9.0.1
 
 
- 
clearCaches
protected void clearCaches()
Description copied from class:AbstractStyleCatalogElementThis 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:
 clearCachesin classAbstractStyleCatalogElement
 
- 
getType
public int getType()
Returns the type of the clause.- Specified by:
 getTypein interfaceStyleMapClause- Returns:
 - The type of the clause.
 - See Also:
 StyleMapClause.CLAUSE_CONDITION,StyleMapClause.CLAUSE_DEFAULT
 
 - 
 
 -