Class PromptExpressionTransform

  • All Implemented Interfaces:
    ExpressionMessages, Transform

    public class PromptExpressionTransform
    extends AbstractExpressionTransform
    This transform is meant to be used by Expression and Hierarchical prompts through CartExpression 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 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
    • Constructor Detail

      • PromptExpressionTransform

        public PromptExpressionTransform()
        Default no-args constructor, initialize all the formal parameters.
    • 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 class AbstractExpressionTransform
        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 to
        transOut - 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)
        Specifies current render mode.
        Intended to set transform style, either flat HTML or linked DHTML.
        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.