Class PromptHierarchicalCartXHTMLTransform

    • Field Detail

      • _origin

        protected WebObjectInfo _origin
        Indicates origin object.
        Object used for determining hierarchy list folder.
      • _hierarchy

        protected WebDisplayUnit _hierarchy
        Indicates current active hierarchy object.
      • _attribute

        protected WebDisplayUnit _attribute
        Indicates current active attribute instance.
      • _hierarchyList

        protected WebDisplayUnits _hierarchyList
        Current collection of hierarchies defined in Prompt.
      • _attributeList

        protected WebDisplayUnits _attributeList
        Current collection of attributes defined in active Hierarchy object.
      • _elementList

        protected WebDisplayUnits _elementList
        Current collection of elements defined in active Attribute object.
      • _drillList

        protected java.util.Enumeration _drillList
        Current collection of items defined in Drilling list.
      • _answers

        protected java.util.Enumeration _answers
        Collection of WebNode which is the current prompt answer.
      • PANE_SELECT

        protected static final int PANE_SELECT
        Constans denoting possible Hierarchical Web states.
        PANE_SELECT corresponds to mode of listing items and allowing end-user to select them. PANE_QUALIFY corresponds to GUI mode where end-user are expected to create their own qualifications.
        See Also:
        Constant Field Values
      • _selectedPane

        protected int _selectedPane
        Indicates which pane mode is selected.
        It defaults to PANE_SELECT.
      • ARGUMENT_PANE_STATUS

        protected static final int ARGUMENT_PANE_STATUS
        Constant indicating argument Id for Tab's status value.
        In order to get request value, it's required to provide an argument Id which is associated to an argument name in the request.
        See Also:
        Constant Field Values
      • ARGUMENT_PANE_SELECT

        protected static final int ARGUMENT_PANE_SELECT
        Constant indicating that 'Select' tab is active.
        Value denoted by argument ARGUMENT_PANE_STATUS in request compared against this constant will indicate this transform that current tab is 'Select'.
        See Also:
        Constant Field Values
      • ARGUMENT_PANE_QUALIFY

        protected static final int ARGUMENT_PANE_QUALIFY
        Constant indicating that 'Qualify' tab is active.
        Value denoted by argument ARGUMENT_PANE_STATUS in request compared against this constant will indicate this transform that current tab is 'Qualify'.
        See Also:
        Constant Field Values
      • ARGUMENT_ROOT_FOLDER_BROWSE_ID

        protected static final int ARGUMENT_ROOT_FOLDER_BROWSE_ID
        Argument Id for folder browser event.
        See Also:
        Constant Field Values
      • _showHierarchicalSubFolders

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

        protected CartExpression _cartHelper
        CartExpression instance used for storing and rendering information regarding this prompt options and answers.
      • NONE_VALUE

        protected static final java.lang.String NONE_VALUE
        Default text for 'None' value to be used in Pull-down menus.
        See Also:
        Constant Field Values
      • isQualifyAvailable

        public FormalParameter isQualifyAvailable
        Indicates if qualification pane is available.
      • showAttributeSelection

        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.
      • attributeSearchRequired

        public FormalParameter attributeSearchRequired
        Indicates whether or not a search is required for displaying attribute elements.
        FP associated to Hierarchical prompt style and it is applied when search is required before displaying current highlighted attribute elements.
      • showEntryPointSelectBox

        public FormalParameter showEntryPointSelectBox
        Specifies whether or not to show the entry point select box for hierarchical prompts.
        This flag is used as a boolean value.
    • Constructor Detail

      • PromptHierarchicalCartXHTMLTransform

        public PromptHierarchicalCartXHTMLTransform()
        Default no-args constructor, initialize all the formal parameters.
    • Method Detail

      • validateItemsList

        protected boolean validateItemsList​(SimpleList items)
        Deprecated.
        not used anymore. Use validateItemForDrillingList(WebDisplayUnit) for individual items in drilling list.
        Verifies that for each item in collection, end-user has priviliges to access it.
        Parameters:
        items - SimpleList collection of item to be validated.
        Returns:
        boolean true if user has access priviliges to all items.
      • validateItemForDrillingList

        protected boolean validateItemForDrillingList​(WebDisplayUnit item)
        Indicates whether or not given item is a valid item to be appended to Drilling list.
        It checks if the user has access to given item (attribute).
        Parameters:
        item - WebDisplayUnit item being validated.
        Returns:
        boolean true if user has access granted to given item.
        Since:
        MicroStrategy Web 8.0.1
      • processHierarchicalSubFolders

        protected void processHierarchicalSubFolders()
                                              throws WebObjectsException
        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
      • parserHierarchicalSubFolderCollection

        public void parserHierarchicalSubFolderCollection​(WebDisplayUnits subFolders,
                                                          int level)
                                                   throws WebObjectsException
        Parses hierarchy list and creates all sub folder browsing in pull-down menu.
        Parameters:
        subFolders - WebDisplayUnits collection of subfolders
        level - int value indicating indentation size.
        Throws:
        WebObjectsException
      • isNodeComplex

        protected boolean isNodeComplex​(WebNode node)
        Indicates if a single subexpression denoted by a WebNode instance is complex.
        An expression is complex if it cannot be created using the Web interface.
        This method overrides isNodeComplex by supporting expressions of type EnumDSSXMLExpressionType.DssXmlFilterListQual (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
        Overrides:
        isNodeComplex in class AbstractPromptExpressionTransform
        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.
      • areThereAvailableSelections

        public boolean areThereAvailableSelections()
        Indicates whether or not there are available items in collection.
        Returns False when selections are less or equal to zero.
        Overrides:
        areThereAvailableSelections in class PromptCartXHTMLTransform
        Returns:
        boolean True if available selection is greater than zero.
      • isHierarchyInformationVisible

        public boolean isHierarchyInformationVisible()
        Indicates if the hierarchy information will remain visible when displaying Cart.
        Returns:
        boolean True if the hierarchy information should be included on the HTML output for the user.
      • isButtonTabControlVisible

        public boolean isButtonTabControlVisible()
        Indicates if the tab control buttons (for allowing users to switch from Select to Qualify) will be visible.
        Returns:
        boolean True if the button tab control information should be included on the HTML output for the user.
      • isAttributeInformationVisible

        public boolean isAttributeInformationVisible()
        Indicates if the attribute information will remain visible for this cart's display.
        Returns:
        boolean True if the attribute information should be included on the HTML output for the user.
      • isAttributeElementSearchRequired

        public boolean isAttributeElementSearchRequired()
        Indicates whether or not search is required before listing selected attribute's elements.
        Associated to Hierarchical prompt style where search is required.
        Returns:
        boolean true when search is required.
      • isSearchVisible

        public boolean isSearchVisible()
        Indicates if the search information and options will remain visible for this cart's display.
        Returns:
        boolean True if the search information should be included on the HTML output for the user.
      • isDrillVisible

        public boolean isDrillVisible()
        Indicates if the drill information and options will remain visible for this cart's display.
        Returns:
        boolean True if the drill information should be included on the HTML output for the user.
      • isExpressionVisible

        public boolean isExpressionVisible()
        Indicates if the expression information and options will remain visible for this cart's display.
        Returns:
        boolean True if the expression definition details should be included on the HTML output for the user.
      • isFolderInformationVisible

        public boolean isFolderInformationVisible()
        Indicates if folder information and browsing options will remain visible for this cart's display.
        Returns:
        boolean True if the folder sbrowsing information should be included on the HTML output for the user.
      • getArgumentName

        protected java.lang.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
        Overrides:
        getArgumentName in class AbstractPromptObjectTransform
        Parameters:
        argumentId - the id of the argument to process
        Returns:
        the full argument name for the given id to use
      • getAttributeFormattedValue

        protected java.lang.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.
      • cleanHierarchyList

        protected void cleanHierarchyList()
        Filters out hierarchy list by eliminating any item different to a WebDimension.
      • getErrorMessage

        protected java.lang.String getErrorMessage​(WebBeanError promptError)
        Return localized error message, associated with the WebBeanError code.
        Overrides:
        getErrorMessage in class PromptCartXHTMLTransform
        Parameters:
        promptError - instance of WebBeanError, most likely an validation error thrown in process prompt phase.
        Returns:
        error message as String, localized to active language.
      • getAvailableItems

        protected java.util.Enumeration getAvailableItems()
        Returns an enumeration with the available items to display as part of the cart information.
        Calls getAvailableDisplayUnits.
        Overrides:
        getAvailableItems in class PromptCartXHTMLTransform
        Returns:
        Enumeration with the available list of items.
      • hasAccessGranted

        protected boolean hasAccessGranted​(WebObjectInfo objInfo)
        Indicates whether or not current user has access granted to given WebObjectInfo instance.
        Parameters:
        objInfo - WebObjectInfo instance which user is validated against
        Returns:
        boolean true if user can access given WebObjectInfo instance.
      • getFirstNonHighlightedEntryPoint

        public WebDisplayUnit getFirstNonHighlightedEntryPoint​(WebDisplayUnits units)
        Returns the first non-highlighted entry point found.
        Parameters:
        units - WebDisplayUnits instance with all the items available
        Returns:
        WebDisplayUnit corresponding to a not highlighted entry point.
      • getFirstNonHighlightedItem

        public WebDisplayUnit getFirstNonHighlightedItem​(WebDisplayUnits units)
        Returns the first non-highlighted item found.
        Parameters:
        units - WebDisplayUnits instance with all the items available
        Returns:
        WebDisplayUnit corresponding to a not-highlighted item.
      • getCartHelper

        public CartExpression getCartHelper()
        Returns instance of cart helper object.
        Returns:
        CartExpression instance corresponding to this transform.
      • getHierarchyAttributeList

        public WebDisplayUnits getHierarchyAttributeList()
        Returns instance of active hierarchy list of attributes.
        Returns:
        WebDisplayUnits instance.
      • getSelectedAttribute

        public WebDisplayUnit getSelectedAttribute()
        Returns instance of active hierarchy attribute.
        Returns:
        WebDisplayUnit instance.
      • getAttributeElementList

        public WebDisplayUnits getAttributeElementList()
        Returns list of all elements defined in selected attribute.
        Returns:
        WebDisplayUnits instance
      • getDrillList

        public java.util.Enumeration getDrillList()
        Returns collection for Drilling list.
        Returns:
        Enumeration instance with the drilling items.
      • renderPromptHiddenInput

        public void renderPromptHiddenInput​(MarkupOutput out)
        Renders hidden inputs for Web GUI specific actions.
        It adds new argument for Pane Status.
        Parameters:
        out - MarkupOutput where to write hidden inputs.
      • renderIncrementalFetch

        public void renderIncrementalFetch​(MarkupOutput out)
        Renders the incremental fetch information for the cart available list.
        Overwrites the parent method by not updating the incremental fetch information before rendering it since it has been already defined on the initCart method, associated with the list of attribute selections.
        Overrides:
        renderIncrementalFetch in class PromptCartXHTMLTransform
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • renderHierarchyInformation

        public void renderHierarchyInformation​(MarkupOutput out)
        Renders the hierarchy information of the prompt cart being displayed.
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • renderAttributeInformationDisabled

        public void renderAttributeInformationDisabled​(MarkupOutput out)
        Renders the attribute information combo box when is not yet available to the user.
        since a hierarchy has not been pre-selected first.
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • renderAttributeInformationList

        public void renderAttributeInformationList​(MarkupOutput out)
        Renders the attribute information combo box corresponding to the hierarchy previously selected.
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • filterAttributesList

        protected java.util.Enumeration filterAttributesList​(WebDisplayUnits list)
        Filters out attribute's list.
        It removes from list thos attributes which user doesn't have access granted.
        Parameters:
        list - WebDisplayUnits list of attributes
        Returns:
        Enumeration filtered list of attributes.
      • renderButtonTabControl

        public void renderButtonTabControl​(MarkupOutput out)
        Renders the tab control buttons which allow the user to switch from Select to Qualify - if allowed - when defining the prompt answers.
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • renderCart

        public void renderCart​(MarkupOutput out)
        Renders a hierarchical shopping cart output by calling different methods that will render the individual sections of the prompt layout.
        The output is organized with a series of DIV HTML tags created.
        Overrides:
        renderCart in class PromptExpressionCartXHTMLTransform
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • renderInputLabel

        public void renderInputLabel​(MarkupOutput out)
        Renders label for Input textbox.
        It creates an HTML label to be displayed along with input textbox menu.
        Parameters:
        out - MarkupOutput where to write the Label.
      • renderAvailableHeaderContent

        public void renderAvailableHeaderContent​(MarkupOutput out)
        Renders the label that will go as header of the available list of objects on the cart.
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • renderEmptyAttributeList

        public void renderEmptyAttributeList​(MarkupOutput out)
        Renders the HTML corresponding to an empty list of attributes.
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • renderElementList

        public void renderElementList​(MarkupOutput out)
        Renders the list of attribute elements to be shown as available to the user.
        If none is available, messages indicate so.
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • renderDrillInformation

        public void renderDrillInformation​(MarkupOutput out)
        Renders the drill information and options section.
        It is consisted of a header label and then it calls the renderElementListDrillInformation(MarkupOutput) method, plus its corresponding submit button.
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • isDrillButtonEnabled

        public boolean isDrillButtonEnabled()
        Deprecated.
        This method is no longer used in the application as we do not disable the button.
        Determines whether or not Drill 'Go' button is enabled when rendering it.
        It makes sure there are available selections in order to enable this button.
        Returns:
        boolean true if there's at least one item to be selected in Elements list.
        Since:
        MicroStrategy Web 8.0.1
      • renderElementListDrillInformation

        public void renderElementListDrillInformation​(MarkupOutput out)
        Renders drilling item pull-down menu.
        Update the CartExpression instance with the information for the available drilling options and call for its renderAvailable(MarkupOutput) method for showing them to the user.
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • renderFolderInformation

        public void renderFolderInformation​(MarkupOutput out)
        Renders Folder pull-down menu.
        Obtain and render folder information that gives the option from where to obtain the hierarchies to be available for the prompt.
        Parameters:
        out - MarkupOutput instance where the output HTML will be stored.
      • renderAdd

        public void renderAdd​(MarkupOutput out)
        Renders the add button information for the cart.
        It overwrites the parent renderAdd method by initializing specific JavaScript code associated with the button depending on what the user is adding: a qualification or the selection of a single element.
        Overrides:
        renderAdd in class PromptCartXHTMLTransform
        Parameters:
        out - MarkupOutput instance where the HTML content generated by this method will be saved
      • renderRemove

        public void renderRemove​(MarkupOutput out)
        Renders the remove button information for the cart.
        It overwrites the parent renderRemove method by initializing specific JavaScript code associated with the button depending on what the user is deleting: a qualification or the selection of a single element.
        Overrides:
        renderRemove in class PromptCartXHTMLTransform
        Parameters:
        out - MarkupOutput instance where the HTML content generated by this method will be saved
      • isSAPExpression

        protected boolean isSAPExpression()
        Check whether the prompt is a SAP Expression Prompt
        Returns:
        true if the Prompt's ExpressionType is EnumDSSXMLExpressionType.DssXmlExpressionMDXSAPVariable
        Since:
        MicroStrategy Web 8.0.1
      • isQualifyAvailable

        protected boolean isQualifyAvailable()
        Returns true isQualifyAvailable FormalParameter is true and the expression is not a SAP Expression.
        Returns:
        whether the Qualify Section is Available
        Since:
        MicroStrategy Web 8.0.1