public abstract class

AbstractExpressionTransform

extends AbstractTransform
implements ExpressionMessages
java.lang.Object
   ↳ com.microstrategy.web.transform.AbstractTransform
     ↳ com.microstrategy.web.app.transforms.AbstractExpressionTransform
Known Direct Subclasses

Class Overview

A base class for expression transforms. It proviedes a set of protected helper methods for building expression GUI.

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.web.app.transforms.ExpressionMessages
Fields
protected ExpressionObject exprOb A reference to the expression object being transformed
Public Constructors
AbstractExpressionTransform()
Public Methods
Class getSupportedBeanType()
function that returns an instance of Class defining this implementation.
void setShowDynamicDatesAsStatic(boolean val)
Sets the flag that indicates whether dynamic dates should be shown as dynamic or static.
void setUseMathOperators(boolean val)
Sets the flag indicating that the short (mathematical) form of comparison operators shall be used instead of long form.
boolean showDynamicDatesAsStatic()
Returns true if the dynamic form of dynamic dates in the expression shall be used instead of the static form.
void transform(Transformable data, MarkupOutput transOut)
This implementation of the Transform interface method stores the passed expression object in the member variable, then calls the doTransform(MarkupOutput) method.
boolean useMathOperators()
Returns true if the short (mathematical) form of comparison operators shall be used instead of long form.
Protected Methods
abstract void doTransform(MarkupOutput transOut)
Override this method (not the transform method)to do the real transform job
ExpressionParts getExpressionParts(WebNode node)
Creates and populates (@link ExpressionParts object for a specified operator node.
String getExpressionStr(WebNode node)
Builds a user-friendly string representation of an expression represented by the (@link node}.
ExpressionParts newExpressionParts(WebNode node)
Creates a new instance of ExpressionParts object.
[Expand]
Inherited Methods
From class com.microstrategy.web.transform.AbstractTransform
From class java.lang.Object
From interface com.microstrategy.web.transform.Transform

Fields

protected ExpressionObject exprOb

A reference to the expression object being transformed

Public Constructors

public AbstractExpressionTransform ()

Public Methods

public Class getSupportedBeanType ()

function that returns an instance of Class defining this implementation.

Returns
  • Class instance of this class

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.

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

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.

public void transform (Transformable data, MarkupOutput transOut)

This implementation of the Transform interface method stores the passed expression object in the member variable, then calls the doTransform(MarkupOutput) method.

Parameters
data an object to transform. It must be of WebExpression type or ClassCastExcetption will be thrown
transOut the MarkupOutput object where the transform result will be added.
Throws
ClassCastException if data is of the wrong type.

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.

Protected Methods

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

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

protected 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}.

protected ExpressionParts newExpressionParts (WebNode node)

Creates a new instance of ExpressionParts object. This implementation creates an istance of ExpressionPartsImpl object. Override this method if you wont to use a custom ExpressionParts implementaion.

Parameters
node where to extract expression parts from
Returns