public class

PromptHierarchicalCartTransform

extends PromptExpressionCartTransform
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
               ↳ com.microstrategy.web.app.transforms.PromptHierarchicalCartTransform
Known Direct Subclasses

This class is deprecated.
Use PromptHierarchicalCartXHTMLTransform instead

Class Overview

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

Summary

Constants
int ARGUMENT_PANE_QUALIFY
int ARGUMENT_PANE_SELECT
int ARGUMENT_PANE_STATUS
int ARGUMENT_ROOT_FOLDER_BROWSE_ID
String NONE_VALUE
int PANE_QUALIFY
int PANE_SELECT
[Expand]
Inherited Constants
From interface com.microstrategy.web.beans.EnumPromptsBeanEvents
Fields
protected String _1ptransImage Image name for a transparent graphic.
protected Enumeration _answers
protected WebDisplayUnit _attribute
protected WebDisplayUnits _attributeList
protected CartExpression _cartHelper
protected Enumeration _drillList
protected WebDisplayUnits _elementList
protected Vector _hierarchicalSubFolders Specifies a collection of CartElementFolders to be used for rendering folders pull-down menu.
protected WebDisplayUnit _hierarchy
protected WebDisplayUnits _hierarchyList
protected WebObjectInfo _origin
protected String _rootFolderId Class variable that specifies the root folder ID.
protected int _selectedPane
protected String _selectedPaneImage
protected boolean _showHierarchicalSubFolders Class variable that specifies a flag indicating whether or not to show hierarchical sub folders in pull-down menu.
protected String _step1Image
protected String _step2Image
protected String _step2disabledImage
protected String _unselectedPaneImage
public FormalParameter isQualifyAvailable Determine if qualification pane is available.
public FormalParameter isSearchRequired This field is deprecated. Use searchAvailable instead.
public FormalParameter selectedPaneImage Image of the selected pane of the attribute qualification.
public FormalParameter showAttributeSelection Specifies whether or not to show or hide the Attribute Selection dropdown for hierarchical prompts.
public FormalParameter step1Image Image to indicate the first step for hierarchical prompts.
public FormalParameter step2Image Image to indicate the second step for hierarchical prompts.
public FormalParameter step2disabledImage Image to indicate the second step for hierarchical prompts (when disabled).
public FormalParameter unselectedPaneImage Image of the unselected pane of the attribute qualification.
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.PromptExpressionCartTransform
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
PromptHierarchicalCartTransform()
Default no-args constructor, initialize all the formal parameters as Parent class has defined.
Public Methods
boolean areThereAvailableSelections()
This function checks size of available selections.
boolean canHierarchyPaneBeShown()
Indicates whether or not Hierarchy pane can be displayed.
WebDisplayUnits getAttributeElementList()
Returns list of all elements defined in selected Attribute.
WebDisplayUnits getAvailableDisplayUnits()
Returns an enumeraiton with the availalbe items.
CartExpression getCartHelper()
Returns instance of cart helper object.
WebDimensionAttribute getDimensionAttribute(WebDisplayUnit unit)
Returns WebDimensionAttribute intance from given unit.
Enumeration getDrillList()
Returns drill list.
WebDisplayUnit getFirstHighlightedItem(WebDisplayUnits units)
Returns the first highlighted item found in collection.
WebDisplayUnit getFirstNonHighlightedEntryPoint(WebDisplayUnits units)
Returns the first non-highlighted entry point found in collection.
WebDisplayUnit getFirstNonHighlightedItem(WebDisplayUnits units)
Returns the first non-highlighted item found in collection.
WebDisplayUnits getHierarchyAttributeList()
Returns instance of active hierarchy list of attributes.
WebDisplayUnit getSelectedAttribute()
Returns instance of active hierarchy list of attributes.
void initializeCart()
Initializes all Cart properties to default values.
void initializeDrillList()
Initializes the elements in the drill list.
void initializeImages()
Extends initializeImages by initialize the images for this transform.
void initializePromptContent()
Initializes prompt content to be displayed.
boolean isLocked(WebDisplayUnit unit)
Determines whether given unit is locked up or not.
boolean isLockedForSearch(WebDisplayUnit unit)
Determines whether or not given unit is locked up.
void parserHierarchicalSubFolderCollection(WebDisplayUnits subFolders, int level)
Parses hierarchy list and creates all sub folder browsing in pull-down menu.
void renderAdd(MarkupOutput out)
renderAdd, displays add arrow button.
void renderAttributeQualification(MarkupOutput out)
Renders attribute HTML components for an attribute qualification.
void renderAttributesPane(MarkupOutput out)
Renders attribute HTML list pane.
void renderAttributesPaneContent(MarkupOutput out, boolean enabled)
Renders attribute pane content.
void renderAttributesPaneContent(boolean enabled, MarkupOutput out)
This method is deprecated. This method cannot be used in a layout-xml. Instead, use renderAttributesPaneContent(MarkupOutput, boolean)
void renderAttributesPaneTile(boolean enabled, MarkupOutput out)
This method is deprecated. This method cannot be used in a layout-xml. Instead, use renderAttributesPaneTile(MarkupOutput, boolean).
void renderAttributesPaneTile(MarkupOutput out, boolean enabled)
Renders attribute pane title.
void renderAvailable(MarkupOutput out)
Will display available list.
void renderCart(MarkupOutput out)
Rendes the cart of hierarchical prompts.
void renderElementList(MarkupOutput out)
Renders a list of attribute elements.
void renderEmptyAttributeList(MarkupOutput out)
Renders HTML empty list of attributes.
void renderFoldersPane(MarkupOutput out)
Renders folder's pull-down area in current prompt question.
void renderFoldersPaneContent(MarkupOutput out)
Renders Hierarchies Pane Content.
void renderFoldersPaneTile(MarkupOutput out)
Renders Hierarchies Pane Title.
void renderHierarchiesPane(MarkupOutput out)
Renders hierarchies HTML pane.
void renderHierarchiesPaneContent(MarkupOutput out)
Renders Hierarchies Pane Content.
void renderHierarchiesPaneTile(MarkupOutput out)
Renders Hierarchies Pane Title.
void renderMatch(MarkupOutput out)
renderAdd, displays add arrow button.
void renderPromptHiddenInputs(MarkupOutput out)
Renders the hidden inputs of this prompt.
void renderPromptSummary(MarkupOutput out)
Renders prompt's default answer defininiton.
void renderRemove(MarkupOutput out)
renderRemove, displays remove arrow button.
void renderSelected(MarkupOutput out)
renderSelected, will display selected list.
Protected Methods
void cleanHierarchyList()
Filters out hierarchy list.
String getArgumentName(int argumentId)
Returns an argument name for the given id.
String getAttributeFormattedValue(WebDisplayUnit attribute)
Returns formatted string to be passed as request parameter.
Enumeration getAvailableItems()
Returns an enumeration with the availalbe items.
String getErrorMessage(WebBeanError promptError)
Returns localized error message.
String getLabelForFolderFirstOption()
Indicates localized label to be displayed as first option in Subfolder's pull-down menu.
boolean hasAccessGranted(WebDisplayUnit dispUnit)
Determines whether or not end-user has access to given item.
void initializeElementsForRequiredSearch()
It initializes elements list if a required search was performed on given attribute.
boolean isDimensionAttributeFiltered(WebDimensionAttribute dimAttr)
Checks whether given dimension attribute has a filter in its definition.
boolean isNodeComplex(WebNode node)
This method is deprecated. This method has been deprecated since this is specific to expression prompts.
Use the method on AbstractPromptExpressionTransform.
void processAvailableItems()
Initializes the avaialble units display list.
void processHierarchicalSubFolders()
Parses hierarchy sub folder list and initialize collection for its rendering.
void processIncrementalFetch()
Initializes incremental fetching settings.
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.PromptExpressionCartTransform
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

Constants

protected static final int ARGUMENT_PANE_QUALIFY

Constant Value: -2 (0xfffffffe)

protected static final int ARGUMENT_PANE_SELECT

Constant Value: -3 (0xfffffffd)

protected static final int ARGUMENT_PANE_STATUS

Constant Value: -4 (0xfffffffc)

protected static final int ARGUMENT_ROOT_FOLDER_BROWSE_ID

Constant Value: -5 (0xfffffffb)

protected static final String NONE_VALUE

Constant Value: "-none-"

protected static final int PANE_QUALIFY

Constant Value: 1 (0x00000001)

protected static final int PANE_SELECT

Constant Value: 0 (0x00000000)

Fields

protected String _1ptransImage

Image name for a transparent graphic.

protected Enumeration _answers

protected WebDisplayUnit _attribute

protected WebDisplayUnits _attributeList

protected CartExpression _cartHelper

protected Enumeration _drillList

protected WebDisplayUnits _elementList

protected Vector _hierarchicalSubFolders

Specifies a collection of CartElementFolders to be used for rendering folders pull-down menu.

protected WebDisplayUnit _hierarchy

protected WebDisplayUnits _hierarchyList

protected WebObjectInfo _origin

protected String _rootFolderId

Class variable that specifies the root folder ID.

protected int _selectedPane

protected String _selectedPaneImage

protected boolean _showHierarchicalSubFolders

Class variable that specifies a flag indicating whether or not to show hierarchical sub folders in pull-down menu.

protected String _step1Image

protected String _step2Image

protected String _step2disabledImage

protected String _unselectedPaneImage

public FormalParameter isQualifyAvailable

Determine if qualification pane is available.

public FormalParameter isSearchRequired

This field is deprecated.
Use searchAvailable instead.

Specifies whether a search is required to display the elements of the selected attribute.
Hierarchical prompts specify in their definition whether a search is permitted on given attribute's element. Displaying a search section is controlled by this flag.
This flag is used as a boolean value.

public FormalParameter selectedPaneImage

Image of the selected pane of the attribute qualification.

public FormalParameter showAttributeSelection

Specifies whether or not to show or hide the Attribute Selection dropdown for hierarchical prompts.
This flag is used as a boolean value.

public FormalParameter step1Image

Image to indicate the first step for hierarchical prompts.

public FormalParameter step2Image

Image to indicate the second step for hierarchical prompts.

public FormalParameter step2disabledImage

Image to indicate the second step for hierarchical prompts (when disabled).

public FormalParameter unselectedPaneImage

Image of the unselected pane of the attribute qualification.

Public Constructors

public PromptHierarchicalCartTransform ()

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

Public Methods

public boolean areThereAvailableSelections ()

This function checks size of available selections. Returns false when selections are less or equal to zero.

Returns
  • boolean true if available selection is greater than 0

public boolean canHierarchyPaneBeShown ()

Indicates whether or not Hierarchy pane can be displayed.
Hierarchical Cart prompt always has to display this pane when necessary.

Returns
  • boolean true if it is to be displayed.

public WebDisplayUnits getAttributeElementList ()

Returns list of all elements defined in selected Attribute.

Returns
  • WebDisplayUnits instance

public WebDisplayUnits getAvailableDisplayUnits ()

Returns an enumeraiton with the availalbe items.

Returns

public CartExpression getCartHelper ()

Returns instance of cart helper object.

Returns
  • CartExpression instance

public WebDimensionAttribute getDimensionAttribute (WebDisplayUnit unit)

Returns WebDimensionAttribute intance from given unit.
It checks whether or not given WebDisplayUnit parameter (unit) is an instance of WebAttribute or WebDimensionAttribute in order to return instance of WebDimensionAttribute.
This function encapsulates logic for avoinding code replication.

Parameters
unit WebDisplayUnit being parsed.
Returns

public Enumeration getDrillList ()

Returns drill list.

Returns
  • Enumeration instance

public WebDisplayUnit getFirstHighlightedItem (WebDisplayUnits units)

Returns the first highlighted item found in collection.

Parameters
units WebDisplayUnits collection to be parsed.
Returns
  • WebDisplayUnit highlighted item.

public WebDisplayUnit getFirstNonHighlightedEntryPoint (WebDisplayUnits units)

Returns the first non-highlighted entry point found in collection.

Parameters
units WebDisplayUnits collection being parsed.
Returns
  • WebDisplayUnit first non-highlighted item in collection.

public WebDisplayUnit getFirstNonHighlightedItem (WebDisplayUnits units)

Returns the first non-highlighted item found in collection.

Parameters
units WebDisplayUnits collection to be parsed.
Returns
  • WebDisplayUnit first non-highlighted item.

public WebDisplayUnits getHierarchyAttributeList ()

Returns instance of active hierarchy list of attributes.

Returns
  • WebDisplayUnits instance

public WebDisplayUnit getSelectedAttribute ()

Returns instance of active hierarchy list of attributes.

Returns
  • WebDisplayUnit instance

public void initializeCart ()

Initializes all Cart properties to default values.

public void initializeDrillList ()

Initializes the elements in the drill list.
It determines also whether or not 'Down' and 'Up'

Throws
WebObjectsException}
WebObjectsException

public void initializeImages ()

Extends initializeImages by initialize the images for this transform.

public void initializePromptContent ()

Initializes prompt content to be displayed.
Extends the initializePromptContent() by reading from the request the current attribute qualification type.

Throws
WebObjectsException}
WebObjectsException

public boolean isLocked (WebDisplayUnit unit)

Determines whether given unit is locked up or not.

Parameters
unit WebDisplayUnit item to be checked.
Returns
  • true if attribute is locked.

public boolean isLockedForSearch (WebDisplayUnit unit)

Determines whether or not given unit is locked up.
If unit is an instance of WebDimensionAttribute, then this function verifies whether or not is locked DssXmlLockCustom.

Parameters
unit WebDisplayUnit instance possbly locked.
Returns
  • true if attribute is locked

public void parserHierarchicalSubFolderCollection (WebDisplayUnits subFolders, int level)

Parses hierarchy list and creates all sub folder browsing in pull-down menu.

Parameters
subFolders WebDisplayUnits collection of subolfoder objects.
level int indentation level.
Throws
WebObjectsException thrown when an error happens while parsing folder objects.

public void renderAdd (MarkupOutput out)

renderAdd, displays add arrow button.

Parameters
out where to write the output of the method.

public void renderAttributeQualification (MarkupOutput out)

Renders attribute HTML components for an attribute qualification.

Parameters
out where to write the output of the method.

public void renderAttributesPane (MarkupOutput out)

Renders attribute HTML list pane.

Parameters
out where to write the output of the method.

public void renderAttributesPaneContent (MarkupOutput out, boolean enabled)

Renders attribute pane content.

Parameters
out where to write the output of the method.
enabled indicates whether to show 'qualify' and 'select' pane.

public void renderAttributesPaneContent (boolean enabled, MarkupOutput out)

This method is deprecated.
This method cannot be used in a layout-xml. Instead, use renderAttributesPaneContent(MarkupOutput, boolean)

Renders attribute pane content.

Parameters
enabled indicates whether to show 'qualify' and 'select' pane.
out where to write the output of the method.

public void renderAttributesPaneTile (boolean enabled, MarkupOutput out)

This method is deprecated.
This method cannot be used in a layout-xml. Instead, use renderAttributesPaneTile(MarkupOutput, boolean).

Renders attribute pane title.

Parameters
enabled indicates whether to show 'qualify' and 'select' pane.
out where to write the output of the method.

public void renderAttributesPaneTile (MarkupOutput out, boolean enabled)

Renders attribute pane title.

Parameters
out where to write the output of the method.
enabled indicates whether to show 'qualify' and 'select' pane.

public void renderAvailable (MarkupOutput out)

Will display available list.

Parameters
out where to write the output of the method.

public void renderCart (MarkupOutput out)

Rendes the cart of hierarchical prompts. It calls renderAvailable, renderSelected and renderAdd/renderRemove methods.

Parameters
out where to write the output of the method.

public void renderElementList (MarkupOutput out)

Renders a list of attribute elements.

Parameters
out where to write the output of the method.

public void renderEmptyAttributeList (MarkupOutput out)

Renders HTML empty list of attributes.

Parameters
out where to write the output of the method.

public void renderFoldersPane (MarkupOutput out)

Renders folder's pull-down area in current prompt question.

Parameters
out MarkupOutput where to write folder area.

public void renderFoldersPaneContent (MarkupOutput out)

Renders Hierarchies Pane Content.

Parameters
out where to write the output of the method.

public void renderFoldersPaneTile (MarkupOutput out)

Renders Hierarchies Pane Title.

Parameters
out where to write the output of the method.

public void renderHierarchiesPane (MarkupOutput out)

Renders hierarchies HTML pane.

Parameters
out where to write the output of the method.

public void renderHierarchiesPaneContent (MarkupOutput out)

Renders Hierarchies Pane Content.

Parameters
out where to write the output of the method.

public void renderHierarchiesPaneTile (MarkupOutput out)

Renders Hierarchies Pane Title.

Parameters
out where to write the output of the method.

public void renderMatch (MarkupOutput out)

renderAdd, displays add arrow button.

Parameters
out where to write the output of the method.

public void renderPromptHiddenInputs (MarkupOutput out)

Renders the hidden inputs of this prompt. The inputs are retrieved from the answer event.

Parameters
out the transform output

public void renderPromptSummary (MarkupOutput out)

Renders prompt's default answer defininiton.
It displays default answer without any promtp question form.

Parameters
out the transform output

public void renderRemove (MarkupOutput out)

renderRemove, displays remove arrow button.

Parameters
out where to write the output of the method.

public void renderSelected (MarkupOutput out)

renderSelected, will display selected list.

Parameters
out where to write the output of the method.

Protected Methods

protected void cleanHierarchyList ()

Filters out hierarchy list.
Removes instances in collection that aren't WebDimension instances.

protected String getArgumentName (int argumentId)

Returns an argument name for the given id. Since the argument name depends on the PromptPosition, this method automatically returns the argument corresponding to the current Prompt

Parameters
argumentId the id
Returns
  • the argument name for the given id

protected String getAttributeFormattedValue (WebDisplayUnit attribute)

Returns formatted string to be passed as request parameter.
It parses attribute parameter in order to create a formatted text of its name.

Parameters
attribute to be parsed.
Returns
  • String formatted text.

protected Enumeration getAvailableItems ()

Returns an enumeration with the availalbe items.

Returns
  • available list enumeration.

protected String getErrorMessage (WebBeanError promptError)

Returns localized error message.
Error message is associated to promptError code.

Parameters
promptError instance of WebBeanError, most likely an validation error thrown in process prompt phase.
Returns
  • error message as String. Error is localized to active language

protected String getLabelForFolderFirstOption ()

Indicates localized label to be displayed as first option in Subfolder's pull-down menu.

Returns
  • String localized label.

protected boolean hasAccessGranted (WebDisplayUnit dispUnit)

Determines whether or not end-user has access to given item.

Parameters
dispUnit WebDisplayUnit to be checked.
Returns
  • WebDisplayUnits fitlered out list of attributes.

protected void initializeElementsForRequiredSearch ()

It initializes elements list if a required search was performed on given attribute.

Throws
WebObjectsException
WebObjectsException

protected boolean isDimensionAttributeFiltered (WebDimensionAttribute dimAttr)

Checks whether given dimension attribute has a filter in its definition.

Parameters
dimAttr WebDimensionAttribute item being checked.
Returns
  • boolean true if dimension attribute has a filter.

protected boolean isNodeComplex (WebNode node)

This method is deprecated.
This method has been deprecated since this is specific to expression prompts.
Use the method on AbstractPromptExpressionTransform.

Indicates if a single subexpression is Complex.
An expression is complex if it cannot be created using the Web interface.
This method overrides isNodeComplex(WebNode) by supporting ListQual expression (Element List expressions). It also checks if the styles supports Attribute qualification, if it doesn't all other type of expressions are also considered complex, if it does, then it calls super.isNodeComplex() to check if the expression is normally supported by attribute qualification

Parameters
node the root node of the subexpression to check
Returns
  • True if the Node is complex, that is, it cannot be created using this transform.

protected void processAvailableItems ()

Initializes the avaialble units display list.

Throws
WebObjectsException thrown when an error occurs when highlighting objects.

protected void processHierarchicalSubFolders ()

Parses hierarchy sub folder list and initialize collection for its rendering.
It parses hierarchy list and constructs a collection of sub folders to be displayed.

Throws
WebObjectsException as result of highlighting unsuccessfully an WebObjectInfo.

protected void processIncrementalFetch ()

Initializes incremental fetching settings.
Overrides super.processIncrementalFetch() by not setting incremental fetch settings. Hierarchical prompts gets the available items in a different schema.

Throws
WebObjectsException} as thrown by PromptExpressionCartTransform.
WebObjectsException