Class AbstractExpressionTransform
- java.lang.Object
 - 
- com.microstrategy.web.transform.AbstractTransform
 - 
- com.microstrategy.web.app.transforms.AbstractExpressionTransform
 
 
 
- 
- All Implemented Interfaces:
 ExpressionMessages,Transform
- Direct Known Subclasses:
 ExpressionFilterTransform,ExpressionPlainTextTransform,PromptExpressionTransform
public abstract class AbstractExpressionTransform extends AbstractTransform implements ExpressionMessages
A base class for expression transforms. It proviedes a set of protected helper methods for building expression GUI.- Since:
 - MicroStrategy Web 7.3.1 or earlier
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected ExpressionObjectexprObA reference to the expression object being transformed- 
Fields inherited from interface com.microstrategy.web.app.transforms.ExpressionMessages
DM_DEFAULT_LVL, DM_PREF_BREAKBY, DM_PREF_EVALSET, DM_PREF_SETOF, DM_RPT_BASE_LVL, DM_RPT_LVL, DM_UNKNOWN_LVL, DM_WHERE, FN_APPLY_AGGREGATION, FN_APPLY_COMPARISON, FN_APPLY_LOGIC, FN_APPLY_RELATIVE, FN_APPLY_SYMPLE, MRP_BETWEEN, MRP_EQUAL, MRP_EXCL_HIGHEST, MRP_EXCL_LOWEST, MRP_HIGHEST, MRP_LOWEST, MRP_NOT_BETWEEN, MRP_NOT_EQUAL, MRP_PERCENT, MRP_PERCENT_TEMPLATE, MRP_RANK, MRP_RANK_TEMPLATE, OP_AND, OP_BEGINS_WITH, OP_BETWEEN, OP_CONTAINS, OP_DIVIDE, OP_ENDS_WITH, OP_EQUAL, OP_GREATER, OP_GREATER_EQUAL, OP_IN, OP_IN_LIST, OP_IS_NOT_NULL, OP_IS_NULL, OP_LESS, OP_LESS_EQUAL, OP_LIKE, OP_MINUS, OP_NOT, OP_NOT_BEGINS_WITH, OP_NOT_BETWEEN, OP_NOT_CONTAINS, OP_NOT_ENDS_WITH, OP_NOT_EQUAL, OP_NOT_IN, OP_NOT_IN_LIST, OP_NOT_LIKE, OP_OR, OP_PLUS, OP_TIMES 
 - 
 
- 
Constructor Summary
Constructors Constructor Description AbstractExpressionTransform() 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddoTransform(MarkupOutput transOut)Override this method (not the transform method)to do the real transform jobprotected ExpressionPartsgetExpressionParts(WebNode node)Creates and populates (@link ExpressionParts object for a specified operator node.protected java.lang.StringgetExpressionStr(WebNode node)Builds a user-friendly string representation of an expression represented by the (@link node}.java.lang.ClassgetSupportedBeanType()function that returns an instance of Class defining this implementation.protected ExpressionPartsnewExpressionParts(WebNode node)Creates a new instance ofExpressionPartsobject.voidsetShowDynamicDatesAsStatic(boolean val)Sets the flag that indicates whether dynamic dates should be shown as dynamic or static.voidsetUseMathOperators(boolean val)Sets the flag indicating that the short (mathematical) form of comparison operators shall be used instead of long form.booleanshowDynamicDatesAsStatic()Returns true if the dynamic form of dynamic dates in the expression shall be used instead of the static form.voidtransform(Transformable data, MarkupOutput transOut)This implementation of theTransforminterface method stores the passed expression object in the member variable, then calls thedoTransform(com.microstrategy.web.beans.MarkupOutput)method.booleanuseMathOperators()Returns true if the short (mathematical) form of comparison operators shall be used instead of long form.- 
Methods inherited from class com.microstrategy.web.transform.AbstractTransform
addFormalParam, canTransform, getEvents, getFormalParams, getID, getPreview, isPreviewAvailable, isResolved, removeFormalParam, setAnnotation, setDeprecated, supports, supports 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface com.microstrategy.web.transform.Transform
getDescription 
 - 
 
 - 
 
- 
- 
Field Detail
- 
exprOb
protected ExpressionObject exprOb
A reference to the expression object being transformed 
 - 
 
- 
Method Detail
- 
getSupportedBeanType
public java.lang.Class getSupportedBeanType()
function that returns an instance of Class defining this implementation.- Specified by:
 getSupportedBeanTypein interfaceTransform- Returns:
 - Class instance of this class
 
 
- 
transform
public void transform(Transformable data, MarkupOutput transOut) throws java.lang.ClassCastException
This implementation of theTransforminterface method stores the passed expression object in the member variable, then calls thedoTransform(com.microstrategy.web.beans.MarkupOutput)method.- Specified by:
 transformin interfaceTransform- Parameters:
 data- an object to transform. It must be of WebExpression type or ClassCastExcetption will be throwntransOut- the MarkupOutput object where the transform result will be added.- Throws:
 java.lang.ClassCastException- if data is of the wrong type.
 
- 
doTransform
protected abstract void doTransform(MarkupOutput transOut)
Override this method (not the transform method)to do the real transform job- Parameters:
 transOut- where to write output
 
- 
getExpressionParts
protected ExpressionParts getExpressionParts(WebNode node)
Creates and populates (@link ExpressionParts object for a specified operator node.- Parameters:
 node- a node used to populate expression parts object- Returns:
 - expression parts collection
 
 
- 
getExpressionStr
protected java.lang.String getExpressionStr(WebNode node)
Builds a user-friendly string representation of an expression represented by the (@link node}.- Parameters:
 node- an operator node- Returns:
 - a user-friendly string representation of an expression represented by the (@link node}.
 
 
- 
useMathOperators
public boolean useMathOperators()
Returns true if the short (mathematical) form of comparison operators shall be used instead of long form. For example the ">" operator will be used instead of "grater" word.- Returns:
 - true if the short (mathematical) form of comparison operators shall be used instead of long form.
 
 
- 
setUseMathOperators
public void setUseMathOperators(boolean val)
Sets the flag indicating that the short (mathematical) form of comparison operators shall be used instead of long form.- Parameters:
 val- the flag value
 
- 
newExpressionParts
protected ExpressionParts newExpressionParts(WebNode node)
Creates a new instance ofExpressionPartsobject. This implementation creates an istance ofExpressionPartsImplobject. Override this method if you wont to use a customExpressionPartsimplementaion.- Parameters:
 node- where to extract expression parts from- Returns:
 - a new instance of 
ExpressionPartsobject. 
 
- 
showDynamicDatesAsStatic
public boolean showDynamicDatesAsStatic()
Returns true if the dynamic form of dynamic dates in the expression shall be used instead of the static form.- Returns:
 - true if dynamic dates will be shown as dynamic, false if they are shown as static.
 - Since:
 - MicroStrategy Web 8.0.2
 
 
- 
setShowDynamicDatesAsStatic
public void setShowDynamicDatesAsStatic(boolean val)
Sets the flag that indicates whether dynamic dates should be shown as dynamic or static.- Parameters:
 val- The flag value.- Since:
 - MicroStrategy Web 8.0.2
 
 
 - 
 
 -