Class 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
-
- All Implemented Interfaces:
EnumPromptsBeanEvents
,Transform
- Direct Known Subclasses:
PromptExpressionCartTransform
,PromptObjectBrowsingTransform
public class PromptCartTransform extends AbstractPromptExpressionTransform
Deprecated.UsePromptCartXHTMLTransform
insteadRenders prompt content in a "shopping cart" style. It provides of minimun settings for creating simplest prompt cart style. This class is extended by different types of prompts specializing current behavior for meeting prompt specific needs.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
_addImage
Deprecated.protected java.lang.String
_endImage
Deprecated.protected java.lang.String
_findImage
Deprecated.protected java.lang.String
_firstImage
Deprecated.protected java.lang.String
_nextImage
Deprecated.protected java.lang.String
_previousImage
Deprecated.protected java.lang.String
_removeImage
Deprecated.FormalParameter
addImage
Deprecated.Image to add units to the selected list.FormalParameter
availableSize
Deprecated.The number of elements that the Available list box displays.FormalParameter
endImage
Deprecated.Image to page to last list of units in incremental browsing.FormalParameter
findImage
Deprecated.Image to submit searching for units.FormalParameter
firstImage
Deprecated.Image to page to first list of units in incremental browsing.FormalParameter
matchCase
Deprecated.Specifies whether the match case checkbox is displayed or not next to a search section.FormalParameter
nextImage
Deprecated.Image to page to next block of units in incremental browsing.FormalParameter
previousImage
Deprecated.Image to page to previous block of units in incremental browsing.FormalParameter
removeImage
Deprecated.Image to remove elements from the selected list.FormalParameter
searchAvailable
Deprecated.Specifies whether the transform should display a search section.FormalParameter
selectedSize
Deprecated.The number of elements that the Selected list box displays.-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractPromptExpressionTransform
attrFormTypeInAvailableList, defaultOperatorId, editMetricQualificationOutputLevel, inputFromTextFile
-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
_blockCount, _calendar, _cssPrefix, _dataTypeForCalendar, _globalCss, _imagesFolder, cssPrefix, imgBackToTop, imgCalendar, imgError, isDhtmlMode, levelFlag, showRequired
-
Fields inherited from interface com.microstrategy.web.beans.EnumPromptsBeanEvents
ANSWER_SEPARATOR, EXPRESSION_SEPARATOR, ITEM_SEPARATOR, ITEM_SPECIAL_SEPARATOR, PROMPTS_EVENT_ADD_UNITS, PROMPTS_EVENT_ANSWER_ALL_PROMPTS, PROMPTS_EVENT_ANSWER_ANY_PROMPTS, PROMPTS_EVENT_ANSWER_CONSTANT_PROMPT, PROMPTS_EVENT_ANSWER_DIMTY_PROMPT, PROMPTS_EVENT_ANSWER_ELEMENTS_PROMPT, PROMPTS_EVENT_ANSWER_EXPRESSION_PROMPT, PROMPTS_EVENT_ANSWER_OBJECTS_PROMPT, PROMPTS_EVENT_ANSWER_PROMPTS_IN_ADVANCE, PROMPTS_EVENT_ARGUMENT_ACTION_ADD_UNITS, PROMPTS_EVENT_ARGUMENT_ACTION_ANSWER_PROMPT, PROMPTS_EVENT_ARGUMENT_ACTION_BROWSE_CHILD_FOLDER, PROMPTS_EVENT_ARGUMENT_ACTION_BROWSE_ELEMENT, PROMPTS_EVENT_ARGUMENT_ACTION_BROWSE_PARENT_FOLDER, PROMPTS_EVENT_ARGUMENT_ACTION_CANCEL_PROMPT, PROMPTS_EVENT_ARGUMENT_ACTION_CLEAR_EXISTING_AND_ADD_UNITS, PROMPTS_EVENT_ARGUMENT_ACTION_DRILL_WITHIN_HIERARCHY, PROMPTS_EVENT_ARGUMENT_ACTION_HIGHLIGHT_DIMENSION, PROMPTS_EVENT_ARGUMENT_ACTION_HIGHLIGHT_DIMENSION_ATTRIBUTE, PROMPTS_EVENT_ARGUMENT_ACTION_INCREMENTAL_FETCH, PROMPTS_EVENT_ARGUMENT_ACTION_REMOVE_UNITS, PROMPTS_EVENT_ARGUMENT_ACTION_SEARCH_BY_NAME, PROMPTS_EVENT_ARGUMENT_ACTION_SHOW_SUMMARY, PROMPTS_EVENT_ARGUMENT_ANSWER, PROMPTS_EVENT_ARGUMENT_ANSWER_FORMAT, PROMPTS_EVENT_ARGUMENT_ANSWER_MODE_OPTION, PROMPTS_EVENT_ARGUMENT_ANSWER_OPTIONS, PROMPTS_EVENT_ARGUMENT_ATTRIBUTE_ID, PROMPTS_EVENT_ARGUMENT_ATTRIBUTE_ID_AND_FORM_ID, PROMPTS_EVENT_ARGUMENT_BLOCK_BEGIN, PROMPTS_EVENT_ARGUMENT_BLOCK_COUNT, PROMPTS_EVENT_ARGUMENT_BROWSE_PATH, PROMPTS_EVENT_ARGUMENT_CALENDAR_BUTTON, PROMPTS_EVENT_ARGUMENT_CHILD_FOLDER_ID, PROMPTS_EVENT_ARGUMENT_DIMENSION_ID, PROMPTS_EVENT_ARGUMENT_DO_NOT_AUTO_REPROMPT, PROMPTS_EVENT_ARGUMENT_DRILL_TO_ATTRIBUTE_ID, PROMPTS_EVENT_ARGUMENT_EXEC_FLAGS, PROMPTS_EVENT_ARGUMENT_FILTER_STRING, PROMPTS_EVENT_ARGUMENT_FUNCTION, PROMPTS_EVENT_ARGUMENT_HIDDEN_ATTRIBUTE_ID, PROMPTS_EVENT_ARGUMENT_HIDDEN_DIMENSION_ID, PROMPTS_EVENT_ARGUMENT_INCREMENTAL_FETCH_GOTO_PAGE, PROMPTS_EVENT_ARGUMENT_LINK_ANSWERS, PROMPTS_EVENT_ARGUMENT_MATCH_CASE, PROMPTS_EVENT_ARGUMENT_MESSAGE_ALIAS, PROMPTS_EVENT_ARGUMENT_METRIC_ID, PROMPTS_EVENT_ARGUMENT_NAVIGATION, PROMPTS_EVENT_ARGUMENT_OBJECT_TYPE, PROMPTS_EVENT_ARGUMENT_ORIGIN_MESSAGE_ID, PROMPTS_EVENT_ARGUMENT_ORIGIN_SHORT_ANSWER_XML, PROMPTS_EVENT_ARGUMENT_PARENT_FOLDER_ID, PROMPTS_EVENT_ARGUMENT_PLAIN_ELEMENT_PROMPT_ANSWER, PROMPTS_EVENT_ARGUMENT_PLAIN_OBJECT_PROMPT_ANSWER, PROMPTS_EVENT_ARGUMENT_PLAIN_VALUE_PROMPT_ANSWER, PROMPTS_EVENT_ARGUMENT_PROMPT_POSITION, PROMPTS_EVENT_ARGUMENT_REOPEN_PROMPT, PROMPTS_EVENT_ARGUMENT_SAP_VARIABLE_EXCLUDE, PROMPTS_EVENT_ARGUMENT_SEARCH_NAME, PROMPTS_EVENT_ARGUMENT_SEARCH_ROOT, PROMPTS_EVENT_ARGUMENT_SRC_ANSWERS, PROMPTS_EVENT_ARGUMENT_SUB_ROOT_OPERATOR, PROMPTS_EVENT_ARGUMENT_SUBMIT_ANSWER, PROMPTS_EVENT_ARGUMENT_UNITS_TO_ADD, PROMPTS_EVENT_ARGUMENT_UNITS_TO_REMOVE, PROMPTS_EVENT_ARGUMENT_USE_SET_ANSWERS, PROMPTS_EVENT_ARGUMENT_USER_SEPARATOR, PROMPTS_EVENT_BROWSE_DIMENSION_ATTRIBUTE_ELEMENTS, PROMPTS_EVENT_BROWSE_ELEMENTS, PROMPTS_EVENT_BROWSE_HIERARCHICAL_CHILD_FOLDER, PROMPTS_EVENT_BROWSE_HIERARCHICAL_PARENT_FOLDER, PROMPTS_EVENT_CANCEL_ALL_PROMPTS, PROMPTS_EVENT_CANCEL_ANY_PROMPTS, PROMPTS_EVENT_CLEAR_EXISTING_AND_ADD_UNITS, PROMPTS_EVENT_CLEAR_HIERARCHICAL_SEARCH_EXPRESSION, PROMPTS_EVENT_DRILL_WITHIN_HIERARCHY, PROMPTS_EVENT_HIGHLIGHT_DIMENSION, PROMPTS_EVENT_HIGHLIGHT_DIMENSION_ATTRIBUTE, PROMPTS_EVENT_INCREMENTAL_FETCH, PROMPTS_EVENT_NAVIGATE_PROMPTS_BEAN, PROMPTS_EVENT_PROCESS_ALL_PROMPTS, PROMPTS_EVENT_PROCESS_ANY_PROMPTS, PROMPTS_EVENT_REMOVE_UNITS, PROMPTS_EVENT_SEARCH_BY_NAME, PROMPTS_EVENT_SHOW_ALL_PROMPTS_SUMMARY, PROMPTS_EVENT_SHOW_ANY_PROMPTS_SUMMARY, SIMPLE_SEPARATOR_CARET, SIMPLE_SEPARATOR_COMMA, SIMPLE_SEPARATOR_SEMICOLON, UNIT_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description PromptCartTransform()
Deprecated.Default no-args constructor, initialize all the formal parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
areThereAvailableSelections()
Deprecated.Indicates whether or not there is a least one item in available collection,
Verifies size of available selections is greater than zero.boolean
canTransform(Transformable data)
Deprecated.Indicates whether or not this given transform can be used to transform given component.protected java.util.Enumeration
getAvailableItems()
Deprecated.Returns all available items encapsulated in Enumeration class.protected Cart
getCart()
Deprecated.Returns active cart instance.java.lang.String
getDescription()
Deprecated.Returns a description of this transform.protected java.lang.String
getErrorMessage(WebBeanError promptError)
Deprecated.Returns a localized error message.protected java.lang.String
getSearchPattern()
Deprecated.Returns search pattern text defined in Prompt Object.protected java.util.Enumeration
getSelectedItems()
Deprecated.Returns an enumeration of all selected items.void
initializeCart()
Deprecated.Initializes all Cart properties to default values.void
initializeFormalParameters()
Deprecated.Initialize formal parameters.void
initializeImages()
Deprecated.Initializes the images for this transform.void
initializePromptContent()
Deprecated.Initializes prompt's content.boolean
isAnswerComplex()
Deprecated.Determines if the answer can be rendered in the GUI.protected boolean
isIncrementalFetchAvailable()
Deprecated.Indicates whether or not, incremental fetch feature is available.protected boolean
isSearchActive()
Deprecated.Indicates whether a search patter was entered or not.protected boolean
isSearchPossible(WebDisplayUnit unit)
Deprecated.Indicates whether or not it's possible to filter elements based on the display unit object.protected void
processSelectedItems()
Deprecated.Initialize selected items list.void
renderCart(MarkupOutput out)
Deprecated.Renders shopping's cart area.void
renderPromptContent(MarkupOutput out)
Deprecated.Renders layout where prompt's content will displayed.protected void
setExtraArguments()
Deprecated.Specifies extra arguments for this prompt.protected void
updateIncrementalFetchCartProperties()
Deprecated.Updates incremental fetch properties in Cart object.-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractPromptExpressionTransform
getDimtyAsString, getDimtyAttributesAsString, getOutputLevel, isBrowserIE6, isCart, isMQLevelEditingSupported, isNodeComplex, isNodeDimtyEmpty, renderHiddenInputsForMQEditor, renderOutputLevelLabel, renderPromptHiddenInputs, setMetricQualOutputLevelAndDimty
-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
addFormalParameter, arePromptsLoadedFirstTime, checkLevel, getAnswerEvent, getArgumentName, getAttrElemBlockCount, getAvailableDisplayUnits, getCalendar, getContainerServices, getDescriptor, getDescriptor, getDescriptor, getDimensionAttribute, getDisplayHelper, getIntValue, getLocale, getMatchCaseSensitivity, getMultipleEvent, getMultipleEventArgumentString, getObjectsBlockCount, getPrompt, getPromptsAppContext, getPromptsBean, getPromptsList, getRequestKeys, getShowRequired, getStringValue, getSupportedBeanType, getTagsFactory, hasAnswer, initializeCss, initializePromptObject, isBackToTopAnchorEnabled, isDhtmlMode, isDimensionalPrompt, isForDefinition, isIFrameRequest, isItemKeptInCartAvailable, isLocked, isLockedForSearch, isPromptObjectInitialized, isPromptRequired, isPromptSummaryEnabled, isTrue, isXDA_CustomSQL_Report, isXDA_MDX_Report, isXDAReport, newHiddenInputBuilder, newNamespaceEncoder, onBeforeApplyDefaultDisplaySettings, processAvailableItems, processIncrementalFetch, renderLayout, renderMinMaxHiddenValues, renderPromptAnswerMeaning, renderPromptBackToTopAnchor, renderPromptDefaultAnswer, renderPromptErrorMessage, renderPromptIFrameRequest, renderPromptMeaning, renderPromptNoSelectionsAvailable, renderPromptNotAnswered, renderPromptQuestion, renderPromptRestrictions, renderPromptSummary, renderPromptSummaryAnswer, renderPromptSummaryTitle, renderPromptTitle, setArgumentValue, setAttrElemBlockCount, setEnableBackToTopAnchor, setIsItemKeptInCartAvailable, setLevelFlag, setLocale, setMatchCaseSensitivity, setObjectsBlockCount, setPromptSummary, setShowRequired, transform
-
Methods inherited from class com.microstrategy.web.transform.AbstractLayoutTransform
getLayoutContext, getLayoutDefinition, setLayoutDefinition, transformUsingLayout
-
Methods inherited from class com.microstrategy.web.transform.AbstractTransform
addFormalParam, getEvents, getFormalParams, getID, getPreview, isPreviewAvailable, isResolved, removeFormalParam, setAnnotation, setDeprecated, supports, supports
-
-
-
-
Field Detail
-
findImage
public FormalParameter findImage
Deprecated.Image to submit searching for units.
-
_findImage
protected java.lang.String _findImage
Deprecated.
-
addImage
public FormalParameter addImage
Deprecated.Image to add units to the selected list.
-
_addImage
protected java.lang.String _addImage
Deprecated.
-
removeImage
public FormalParameter removeImage
Deprecated.Image to remove elements from the selected list.
-
_removeImage
protected java.lang.String _removeImage
Deprecated.
-
endImage
public FormalParameter endImage
Deprecated.Image to page to last list of units in incremental browsing.
-
_endImage
protected java.lang.String _endImage
Deprecated.
-
firstImage
public FormalParameter firstImage
Deprecated.Image to page to first list of units in incremental browsing.
-
_firstImage
protected java.lang.String _firstImage
Deprecated.
-
nextImage
public FormalParameter nextImage
Deprecated.Image to page to next block of units in incremental browsing.
-
_nextImage
protected java.lang.String _nextImage
Deprecated.
-
previousImage
public FormalParameter previousImage
Deprecated.Image to page to previous block of units in incremental browsing.
-
_previousImage
protected java.lang.String _previousImage
Deprecated.
-
searchAvailable
public FormalParameter searchAvailable
Deprecated.Specifies whether the transform should display a search section.
Not all prompt types support searching for elements, so even if this parameter is true, the search box might not be available.
This flag is used as a boolean value.
-
availableSize
public FormalParameter availableSize
Deprecated.The number of elements that the Available list box displays.
This flag is used as an int value.
-
selectedSize
public FormalParameter selectedSize
Deprecated.The number of elements that the Selected list box displays.
This flag is used as an int value.
-
matchCase
public FormalParameter matchCase
Deprecated.Specifies whether the match case checkbox is displayed or not next to a search section.
Indicates whether or not to show match case checkbox next to search section. Not all prompt types support searching for elements, so even if this parameter is true, the search box might not be available.
This flag is used as a boolean value.
-
-
Method Detail
-
initializeFormalParameters
public void initializeFormalParameters()
Deprecated.Initialize formal parameters.
-
initializeImages
public void initializeImages()
Deprecated.Initializes the images for this transform.
This function has been extended and it invokes parent method as well.- Overrides:
initializeImages
in classAbstractPromptObjectTransform
-
initializePromptContent
public void initializePromptContent() throws WebObjectsException
Deprecated.Initializes prompt's content.
Extends initializePromptContent() by calling processIncrementalFetch and processSelectedItems.
Parent method gets also invoked. Then, processSelectedItems() method is invoked.
It also initialize the Cart object associated by invoking initializeCart() method.- Overrides:
initializePromptContent
in classAbstractPromptObjectTransform
- Throws:
WebObjectsException
- if something goes wrong during initialization process.
-
getSearchPattern
protected java.lang.String getSearchPattern()
Deprecated.Returns search pattern text defined in Prompt Object.
It calls getPrompt() method in order to get an instance of current Prompt object.- Returns:
- String search pattern.
- Since:
- MicroStrategy Web 7.5.0
-
isAnswerComplex
public boolean isAnswerComplex()
Deprecated.Determines if the answer can be rendered in the GUI.- Specified by:
isAnswerComplex
in classAbstractPromptObjectTransform
- Returns:
- boolean true if answer is complex.
-
canTransform
public boolean canTransform(Transformable data)
Deprecated.Indicates whether or not this given transform can be used to transform given component.
Data should be instance of PromptObject, either an Object, Element or Dimension prompt type.
Returns true only if the prompt is of typeEnumWebPromptType.WebPromptTypeObjects
orEnumWebPromptType.WebPromptTypeElements
.- Specified by:
canTransform
in interfaceTransform
- Overrides:
canTransform
in classAbstractTransform
- Parameters:
data
- object (PromptObject) to transform- Returns:
- boolean true if the data is a PromptObject of a Expression WebPrompt.
-
isIncrementalFetchAvailable
protected boolean isIncrementalFetchAvailable()
Deprecated.Indicates whether or not, incremental fetch feature is available.
Only element or object prompt types are allowed to expose incremental fetch and if there's already a predefined list of answers, then incremental fetch gets disabled.- Returns:
- boolean true incremental fetch is available.
-
isSearchPossible
protected boolean isSearchPossible(WebDisplayUnit unit)
Deprecated.Indicates whether or not it's possible to filter elements based on the display unit object.
If given unit is a WebElementsPrompt or WebObjectsPrompt instance, then it returns false only if it has a pre-defined list or there an active search in progress.
If given unit is an WebDimensionAttribute instance, it gets its WebAttribure object and calls recursively isSearchPossible() function,
For WebAttribute instances, search isn't possible if any of the attribute's form happens to have a Date datatype.- Parameters:
unit
- the display unit for which we want to check:- Returns:
- true if it's possible to search (filter) elements of the given type.
-
processSelectedItems
protected void processSelectedItems() throws WebObjectsException
Deprecated.Initialize selected items list.
This cart only supports Element and Objects prompts lists. It gets prompt answer and from it, it obtains its enumeration instance which contains all possible answers.- Throws:
WebObjectsException
- when invoking API functions in order to retrieve prompt answers.
-
isSearchActive
protected boolean isSearchActive()
Deprecated.Indicates whether a search patter was entered or not.
It looks at PromptObject's user search pattern and if it isn't null then we determine user has entered a search pattern.- Returns:
- boolean true if search is active.
-
initializeCart
public void initializeCart()
Deprecated.Initializes all Cart properties to default values.
Cart instance used by this transform needs to be initialized accordingly. Properties for controlling Incremental fetch, Javascript functions, etc are specified in the method.
Cart instance is retrieve by invoking getCart() method which returns an instance of Cart object.
-
renderPromptContent
public void renderPromptContent(MarkupOutput out)
Deprecated.Renders layout where prompt's content will displayed.
It calls renderCart method for rendering prompt question layout.- Overrides:
renderPromptContent
in classAbstractPromptObjectTransform
- Parameters:
out
- where to write the output of the method.
-
renderCart
public void renderCart(MarkupOutput out)
Deprecated.Renders shopping's cart area.
Prior to rendering the cart, incremental fetch values are updated. Within the cart object, flow executes renderAvailable(), renderArrows() and renderSelected() methods.- Parameters:
out
- where to write the output of the method.
-
updateIncrementalFetchCartProperties
protected void updateIncrementalFetchCartProperties()
Deprecated.Updates incremental fetch properties in Cart object.
Mostly, the total of units is calculated after processing available units, hence, we need to reflect this in Cart incremental fetch properties.
-
getErrorMessage
protected java.lang.String getErrorMessage(WebBeanError promptError)
Deprecated.Returns a localized error message.
Error message is associated to promptError code passed in.- Overrides:
getErrorMessage
in classAbstractPromptObjectTransform
- 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
-
setExtraArguments
protected void setExtraArguments()
Deprecated.Specifies extra arguments for this prompt.
Arguments such as answer format are initialized here. If DHTML mode is on, answer format is set to Flat (values defined in EnumPromptAnswerFormat enumeration). If HTML is on then, answer format is set to List.
Also, if DHTML is on, answer argument is set to empty string because answers will processed from given string in request.
These arguments will be render later as hidden inputs.- Overrides:
setExtraArguments
in classAbstractPromptExpressionTransform
-
getCart
protected Cart getCart()
Deprecated.Returns active cart instance.
Makes sure this instance isn't null and if it's, a new one is created through GUI element factory.- Returns:
- Cart instance.
-
getAvailableItems
protected java.util.Enumeration getAvailableItems()
Deprecated.Returns all available items encapsulated in Enumeration class.
It gets all available display units and creates an Enumeration instance which is returned.- Returns:
- Enumeration of WebDisplayUnits objects.
-
getSelectedItems
protected java.util.Enumeration getSelectedItems()
Deprecated.Returns an enumeration of all selected items.
It gets all selected display units and creates an Enumeration instance which is returned.- Returns:
- Enumeration of WebDisplayUnits objects.
-
getDescription
public java.lang.String getDescription()
Deprecated.Returns a description of this transform.- Returns:
- String text description.
-
areThereAvailableSelections
public boolean areThereAvailableSelections()
Deprecated.Indicates whether or not there is a least one item in available collection,
Verifies size of available selections is greater than zero.
Returns false when selections are less or equal to zero.- Overrides:
areThereAvailableSelections
in classAbstractPromptObjectTransform
- Returns:
- boolean true if available selection is greater than 0
-
-