public class

PromptExpressionCartTransform

extends PromptCartTransform
java.lang.Object
   ↳ com.microstrategy.web.transform.AbstractTransform
     ↳ com.microstrategy.web.transform.AbstractLayoutTransform
       ↳ com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
         ↳ com.microstrategy.web.app.transforms.AbstractPromptExpressionTransform
           ↳ com.microstrategy.web.app.transforms.PromptCartTransform
             ↳ com.microstrategy.web.app.transforms.PromptExpressionCartTransform
Known Direct Subclasses
Known Indirect Subclasses

This class is deprecated.
Use PromptExpressionCartXHTMLTransform instead

Class Overview

Renders Expression prompt in "shopping cart" style. This transforms makes use of Tag instances to render HTML output. See reference to TagsFactory.

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.web.beans.EnumPromptsBeanEvents
Fields
public FormalParameter _dottedArrowImg Image for dotted line to be used as graphical separator.
protected String _dottedArrowImgName
public FormalParameter logicalOperatorAvailableUserDefined Specifies a custome boolean value indicating whether or not to displaye logical operators.
public FormalParameter logicalOperatorDefault Specifies 'And/Or' match case default value.
public FormalParameter logicalOperatorSelectionMethod Specifies whether the 'And/Or' match case checkbox is displayed or not next the selected list in cart style ouput.
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.PromptCartTransform
From class com.microstrategy.web.app.transforms.AbstractPromptExpressionTransform
From class com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
Public Constructors
PromptExpressionCartTransform()
Default no-args constructor, initialize all the formal parameters as Parent class has defined.
Public Methods
boolean canTransform(Transformable data)
Indicates whether or not given component, denoted by data, can be processed by this transform.
String getDescription()
Indicates this transforms description.
void initializeCart()
Initializes Cart properties to default values.
void initializeImages()
Initializes the images for this transform.
boolean isAnswerComplex()
Indicates whether or not current prompt answer is complex.
void renderCart(MarkupOutput out)
Renders an HTML shopping cart.
void renderInputTextFile(MarkupOutput out)
Renders HTML for input text file.
void renderPromptContent(MarkupOutput out)
Renders the prompt's content Question area.
Protected Methods
boolean checkLogicalOperatorMethod(int iConst)
Indicates if the logicalOperatorSelectionMethod parameter value contains this flag.
WebExpression getAnswer()
Returns Expression prompt answer.
Cart getCart()
Indicates an instance of a Cart object.
CartExpression getCartExpression()
Indicates an instance of CartExpression object.
Enumeration getSelectedItems()
Returns Expression prompt answer in an Enumeration instance.
void processAvailableItems()
Initializes the available units display list.
void processIncrementalFetch()
Initializes incremental fetching settings for Available list.
void processSelectedItems()
Initializes Selected list in Expression Prompt.
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.PromptCartTransform
From class com.microstrategy.web.app.transforms.AbstractPromptExpressionTransform
From class com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
From class com.microstrategy.web.transform.AbstractLayoutTransform
From class com.microstrategy.web.transform.AbstractTransform
From class java.lang.Object
From interface com.microstrategy.web.transform.Transform

Fields

public FormalParameter _dottedArrowImg

Image for dotted line to be used as graphical separator.

protected String _dottedArrowImgName

public FormalParameter logicalOperatorAvailableUserDefined

Specifies a custome boolean value indicating whether or not to displaye logical operators.

public FormalParameter logicalOperatorDefault

Specifies 'And/Or' match case default value.

public FormalParameter logicalOperatorSelectionMethod

Specifies whether the 'And/Or' match case checkbox is displayed or not next the selected list in cart style ouput.

Public Constructors

public PromptExpressionCartTransform ()

Default no-args constructor, initialize all the formal parameters as Parent class has defined.

Public Methods

public boolean canTransform (Transformable data)

Indicates whether or not given component, denoted by data, can be processed by this transform.
Extends canTransform() by returning true only if the prompt is of type EnumWebPromptType.WebPromptTypeExpression

Parameters
data object (PromptObject) to transform
Returns
  • true if the data is a PromptObject of a Expression WebPrompt.

public String getDescription ()

Indicates this transforms description.

Returns
  • the description of a shopping cart.

public void initializeCart ()

Initializes Cart properties to default values.
It invokes parent method so all shared properties get initialized first and immediately after this invokation, only expression cart specific properties get initialized.

public void initializeImages ()

Initializes the images for this transform.
It also invokes parent method to initialized all shared images.

public boolean isAnswerComplex ()

Indicates whether or not current prompt answer is complex.
An Expression prompt answer is considered complex if it is consisted of nested sub expression which can't be rendered in a HTML select list. Also, if root node of WebExpression isn't either an OR/AND logical operator.

Returns
  • true if answer is complex

public void renderCart (MarkupOutput out)

Renders an HTML shopping cart.

Parameters
out MarkupOutput where to write the output of the method.

public void renderInputTextFile (MarkupOutput out)

Renders HTML for input text file.

Parameters
out MarkupOutput where to write the output of the method.

public void renderPromptContent (MarkupOutput out)

Renders the prompt's content Question area.

Parameters
out MarkupOutputwhere to write the output of the method.

Protected Methods

protected boolean checkLogicalOperatorMethod (int iConst)

Indicates if the logicalOperatorSelectionMethod parameter value contains this flag.

Parameters
iConst logical operator mode flag
Returns
  • true means the level logical operator mode flag is included in the logicalOperatorSelectionMethod parameter value

protected WebExpression getAnswer ()

Returns Expression prompt answer.
Answer is an instance of WebExpression object.

Returns
  • WebExpression prompt answer.

protected Cart getCart ()

Indicates an instance of a Cart object.
Overrides getCart by providing a CartExpression.

Returns
  • Cart instance

protected CartExpression getCartExpression ()

Indicates an instance of CartExpression object.
It returns a new empty CartExpression instance if null.

Returns
  • cart instance.

protected Enumeration getSelectedItems ()

Returns Expression prompt answer in an Enumeration instance.
Returns enumeration consisted of WebNode objects that were parsed in function processSelectedItems().

Returns
  • selected items enumeration

protected void processAvailableItems ()

Initializes the available units display list.
It processes prompts available displayable units. It determines which item requires being marked as selected. It populates selected item if necessary by getting all Attribute's elements or forms.

Throws
WebObjectsException if something wrong happens when populating an specific item.

protected void processIncrementalFetch ()

Initializes incremental fetching settings for Available list.
It figures out block count size for Incremental fetch of items in Available list. If Expression type in Prompt is associated with a Metric Qualification, then block count is determined by invoking function getObjectsBlockCount(). Similar with Attribute Qualification, function getAttrElemBlockCount() gets invoked.
Both values are specified as Project preferences.

Throws
WebObjectsException if something goes wrong figuring out these values.

protected void processSelectedItems ()

Initializes Selected list in Expression Prompt.
It populates selected items collection by getting expression prompt answer. Each item in answer collection corresponds to a WebNode instance. Each node is parsed and if it isn't considered complex, then it gets added to selected list.

Throws
WebObjectsException if something goes wrong when parsing Expression prompt answer.