Class PromptExpressionTransform
- java.lang.Object
-
- com.microstrategy.web.transform.AbstractTransform
-
- com.microstrategy.web.app.transforms.AbstractExpressionTransform
-
- com.microstrategy.web.app.transforms.PromptExpressionTransform
-
- All Implemented Interfaces:
ExpressionMessages
,Transform
public class PromptExpressionTransform extends AbstractExpressionTransform
This transform is meant to be used by Expression and Hierarchical prompts throughCartExpression
class. Pretty much, it parses current active node and renders HTML option element. It uses Expression transforms for getting sub expression output and it parses active node for constructing HTML and DHTML option values.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description static int
DHTML
Denotes a constant indicating DHTML mode.static int
HTML
Denotes a constant indicating HTML mode.-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractExpressionTransform
exprOb
-
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 PromptExpressionTransform()
Default no-args constructor, initialize all the formal parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doTransform(MarkupOutput transOut)
Executes transform logic on Prompt object.protected void
doTransform(WebNode activeNode, MarkupOutput transOut)
Executes transform logic on Prompt object.java.lang.String
getDescription()
Indicates class description.protected java.lang.String
getDescriptor(int key)
Indicates localized descriptor associated to given key or Id.protected java.lang.String
getDimensionalityInfo(WebNode node)
Indicates current expression prompt dimensionality type.void
setExcludeForNOTNodes(boolean flag)
Specifies whether or not to add exclude for Nodes with NOT as parent Node.void
setExpressionValueSeparator(java.lang.String value)
Specifies separator character for Expression answer.void
setIncludeExtraSelectedInfo(boolean flag)
Specifies whether or not to include extra HTML properties to option in Selected list.void
setPrependEmptySpaces(boolean flag)
Specifies whether or not to prepend empty spaces on the display portion.void
setRenderMode(int mode)
Specifies current render mode.void
setTruncateMode(boolean flag)
Specifies whether or not to truncate expression value output to custom size of characters.void
setTruncateSize(int size)
Specifies lenght of expression value to be displayed.-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractExpressionTransform
getExpressionParts, getExpressionStr, getSupportedBeanType, newExpressionParts, setShowDynamicDatesAsStatic, setUseMathOperators, showDynamicDatesAsStatic, transform, useMathOperators
-
Methods inherited from class com.microstrategy.web.transform.AbstractTransform
addFormalParam, canTransform, getEvents, getFormalParams, getID, getPreview, isPreviewAvailable, isResolved, removeFormalParam, setAnnotation, setDeprecated, supports, supports
-
-
-
-
Field Detail
-
DHTML
public static final int DHTML
Denotes a constant indicating DHTML mode.- See Also:
- Constant Field Values
-
HTML
public static final int HTML
Denotes a constant indicating HTML mode.- See Also:
- Constant Field Values
-
-
Method Detail
-
doTransform
protected void doTransform(MarkupOutput transOut)
Executes transform logic on Prompt object.
It checks whether there's an active node and starts processing from there. If there isn't active node, then by default it points to root node.- Specified by:
doTransform
in classAbstractExpressionTransform
- Parameters:
transOut
-MarkupOutput
instance that will be the output by this transform
-
doTransform
protected void doTransform(WebNode activeNode, MarkupOutput transOut)
Executes transform logic on Prompt object.
Generates HTML option for cart expression prompt.- Parameters:
activeNode
- node where transform will be applied totransOut
-MarkupOutput
instance that will be the output by this transform
-
getDimensionalityInfo
protected java.lang.String getDimensionalityInfo(WebNode node)
Indicates current expression prompt dimensionality type.
Based on dimty unit data type, a String gets returned with formatted dimensionality information.- Parameters:
node
-WebNode
instance, likely to be a dimty node.- Returns:
- String formatted text with dimensionality info.
- Since:
- MicroStrategy Web 8.0.0
-
getDescriptor
protected java.lang.String getDescriptor(int key)
Indicates localized descriptor associated to given key or Id.- Parameters:
key
- unique descriptor id.- Returns:
- descriptor localized string.
-
setExpressionValueSeparator
public void setExpressionValueSeparator(java.lang.String value)
Specifies separator character for Expression answer.
For those expressions whose answer is consisted of multiple values, a custom separator might be specified.- Parameters:
value
- String new separator.- Since:
- MicroStrategy Web 8.0.0
-
setRenderMode
public void setRenderMode(int mode)
- Parameters:
mode
- transform style to be used .
-
setTruncateMode
public void setTruncateMode(boolean flag)
Specifies whether or not to truncate expression value output to custom size of characters.- Parameters:
flag
- true if truncate should be performed.- Since:
- MicroStrategy Web 8.0.0
-
setTruncateSize
public void setTruncateSize(int size)
Specifies lenght of expression value to be displayed.
This property goes along with truncate mode which needs to be enabled in order to truncate value to be displayed. Size is defined by this property.- Parameters:
size
- int value indicating size for truncated strings.- Since:
- MicroStrategy Web 8.0.0
-
setIncludeExtraSelectedInfo
public void setIncludeExtraSelectedInfo(boolean flag)
Specifies whether or not to include extra HTML properties to option in Selected list.- Parameters:
flag
- boolean true to add extra HTML.- Since:
- MicroStrategy Web 8.0.0
-
setPrependEmptySpaces
public void setPrependEmptySpaces(boolean flag)
Specifies whether or not to prepend empty spaces on the display portion.- Parameters:
flag
- boolean true to add empty spaces.- Since:
- MicroStrategy Web 8.0.1
-
setExcludeForNOTNodes
public void setExcludeForNOTNodes(boolean flag)
Specifies whether or not to add exclude for Nodes with NOT as parent Node.- Parameters:
flag
- boolean true to add extra HTML.- Since:
- MicroStrategy Web 8.0.1
-
getDescription
public java.lang.String getDescription()
Indicates class description.- Returns:
- description string.
-
-