Class AbstractPromptObjectTransform
- java.lang.Object
-
- com.microstrategy.web.transform.AbstractTransform
-
- com.microstrategy.web.transform.AbstractLayoutTransform
-
- com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
-
- All Implemented Interfaces:
EnumPromptsBeanEvents
,Transform
- Direct Known Subclasses:
AbstractPromptExpressionTransform
,PromptCheckboxTransform
,PromptConstantTransform
,PromptListboxTransform
,PromptRadioTransform
,PromptXSLTransform
public abstract class AbstractPromptObjectTransform extends AbstractLayoutTransform implements EnumPromptsBeanEvents
The AbstractPromptObjectTransform is the base class we use for these prompt transforms should extend from. All prompt transforms will be invoked from prompt's container class (PromptsClassicTransform). It defines a generic layout for all prompt questions and it divides the rendering in following methods:
- renderPromptTitle()
- renderPromptMeaning()
- renderPromptAnswerMeaning()
- renderPromptErrorMessage()
- renderPromptQuestion()
- renderPromptRestrictions()
- renderPromptSummary()
- renderPromptSummaryAnswer()
- renderPromptSummaryTitle()
- renderPromptSummary()
- renderPromptNoSelectionsAvailable()
- renderPromptDefaultAnswer()
- renderPromptHiddenInputs()
Each concrete class will be responsible of implementing therenderContent()
method.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description protected int
_blockCount
Denotes generic block count.protected GGCalendar
_calendar
Represents calendar object.protected java.lang.String
_cssPrefix
Property for storing the value of thecssPrefix
formal parameter, initialized with theinitializeCss
method.protected int
_dataTypeForCalendar
Specifies data type for calendar.protected java.lang.String
_globalCss
Specifies CSS class of the main HTML container tag of the prompt information.protected java.lang.String
_imagesFolder
Indicates images folder path.FormalParameter
cssPrefix
Prefix to append to all css class names.FormalParameter
imgBackToTop
Deprecated.This formal parameter is no longer used.FormalParameter
imgCalendar
Specifies image to use when Calendar object is enabled and visible.FormalParameter
imgError
Specifies the image to use to highlight an error in a prompt.protected boolean
isDhtmlMode
Indicates whether or not DHTML mode is enabled.FormalParameter
levelFlag
Specifies what fields in prompt question are displayed.FormalParameter
showRequired
Specifies whether or not to display 'Required' message at the end of prompt title.-
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 AbstractPromptObjectTransform()
Default no-args constructor, initialize all the formal parameters.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description FormalParameter
addFormalParameter(java.lang.String name, int type, java.lang.Object defaultValue, java.lang.String description)
Adds a formal parameter to this transform based upon given information.protected boolean
arePromptsLoadedFirstTime()
Indicates whether or not prompts are loaded the firt time.boolean
areThereAvailableSelections()
Indicates size of available selections.protected boolean
checkLevel(int iLevelConst)
Indicates if the level parameter value contains given flag.protected WebEvent
getAnswerEvent()
Returns instance of prompt answer event.protected java.lang.String
getArgumentName(int argumentId)
Returns an argument name for the given id.int
getAttrElemBlockCount()
Indicates block count, an incremental fetch value for displaying attribute's elements.protected WebDisplayUnits
getAvailableDisplayUnits()
Specifies aWebDisplayUnits
collection of the available units of this prompt.protected GGCalendar
getCalendar()
Returns a localized instance of Calendar component.protected ContainerServices
getContainerServices()
Retrieves the connected Container Services object.protected java.lang.String
getDescriptor(int key)
Returns a descriptor (localized message) associated to this key.java.lang.String
getDescriptor(java.lang.String key)
Get the descriptor for the given key.java.lang.String
getDescriptor(java.lang.String key, java.lang.String defaultDescriptor)
WebDimensionAttribute
getDimensionAttribute(WebDisplayUnit unit)
Obtains the dimension attribute given theWebDisplayUnit
instance provided.protected WebDisplayHelper
getDisplayHelper()
Provides an instance of Web display helper object.protected java.lang.String
getErrorMessage(WebBeanError promptError)
Returns a localized error message.protected int
getIntValue(FormalParameter parameter)
Returns theint
value of aFormalParamter
.protected java.util.Locale
getLocale()
Returns instance of current Locale.boolean
getMatchCaseSensitivity()
Indicates default value for match case checkbox.protected WebEvent
getMultipleEvent()
protected java.lang.String
getMultipleEventArgumentString(WebEvent event, int[] args)
int
getObjectsBlockCount()
Indicates block count, an incremental fetch value for displaying list of objects.protected PromptObject
getPrompt()
Indicates instance of PromptObjectPromptObject
being transformed.protected AppContext
getPromptsAppContext()
Determines prompt's AppContext.protected PromptsBean
getPromptsBean()
Indicates current instance of PromptsBean to be transformed.java.util.ArrayList
getPromptsList()
Returns an arraylist containing DisplayWebUnits.protected RequestKeys
getRequestKeys()
boolean
getShowRequired()
Indicates property value for whether or not displaying required message.protected java.lang.String
getStringValue(FormalParameter parameter)
Returns the string value of the Formal Parameter.java.lang.Class
getSupportedBeanType()
Indicates Bean type of prompt object being used by the transform.TagsFactory
getTagsFactory()
Provides factory class for creating HTML tags.protected boolean
hasAnswer()
Indicates whether prompt instance has an answer in its definition.void
initializeCss()
Initializes the css information to be used by this transform.void
initializeImages()
Initializes the images to be used by this transform.protected void
initializePromptContent()
Initializes infrastructure needed for rendering prompt.protected void
initializePromptObject()
Initializes prompt object to default values.abstract boolean
isAnswerComplex()
Checks whether a prompt has a default answer, and if it has, if the default answer is complex.boolean
isBackToTopAnchorEnabled()
Indicates whether or not 'Back to Top' anchor is enabled for current prompt.boolean
isDhtmlMode()
Indicates whether or not DHTML mode is enabled.boolean
isDimensionalPrompt()
Determines whether or not given prompt was defined as Dimty prompt.boolean
isForDefinition()
protected boolean
isIFrameRequest()
Indicates whether or not Frame is active in Web application.boolean
isItemKeptInCartAvailable()
Indicates property value for whether or not selected item in cart's 'From' list should be removed.boolean
isLocked(WebDisplayUnit unit)
Determines whether givenWebDisplayUnit
unit is locked up.boolean
isLockedForSearch(WebDisplayUnit unit)
Determines whether givenWebDisplayUnit
unit is locked up for search only.protected boolean
isNodeComplex(WebNode node)
Deprecated.This method has been deprecated since this is specific to expression prompts.boolean
isPromptObjectInitialized()
Indicates whether or not given prompt is initialized.boolean
isPromptRequired()
Shortcut method to check whether the prompt is required.boolean
isPromptSummaryEnabled()
Indicates whether to display prompt summary or not.protected boolean
isTrue(FormalParameter parameter)
Indicates if givenFormalParamter
is a Boolean True instance.protected boolean
isXDA_CustomSQL_Report()
Indicates whether or not this a prompted CustomSQL Report.protected boolean
isXDA_MDX_Report()
Indicates whether or not this a prompted MDX Report.protected boolean
isXDAReport()
Indicates whether or not this a prompted XDA Report.protected ParameterBuilder
newHiddenInputBuilder()
Retrieves a new instance of a Hidden Input Builder from the connected Container Services object.protected NamespaceEncoder
newNamespaceEncoder()
Retrieves a new instance of a Namespace Encoder from the connected Container Services object.protected void
onBeforeApplyDefaultDisplaySettings()
protected void
processAvailableItems()
Initializes display settings for retrieving available items defined in prompt.protected void
processIncrementalFetch()
Initializes incremental fetching settings.protected boolean
renderLayout(MarkupOutput out)
Renders transform using layout infrastructure.void
renderMinMaxHiddenValues(MarkupOutput out)
Deprecated.the method is not been called by others.void
renderPromptAnswerMeaning(MarkupOutput out)
Renders prompt's meaning information.void
renderPromptBackToTopAnchor(MarkupOutput out)
Renders HTML anchor to allow end users to go back to Top of Prompts page.void
renderPromptContent(MarkupOutput out)
Renders the body of the prompt content.void
renderPromptDefaultAnswer(MarkupOutput out)
Renders HTML area with default answer definition.void
renderPromptErrorMessage(MarkupOutput out)
Renders a localized generic error message to end-users.void
renderPromptHiddenInputs(MarkupOutput out)
Renders the hidden inputs of this prompt.void
renderPromptIFrameRequest(MarkupOutput out)
Renders the content of the prompt in case of an IFrame request.void
renderPromptMeaning(MarkupOutput out)
Renders the meaning of the prompt.void
renderPromptNoSelectionsAvailable(MarkupOutput out)
Displays error message indicating that available list doesn't have any selection available.void
renderPromptNotAnswered(MarkupOutput out)
Renders a localized message for indicating given prompt is not answered.void
renderPromptQuestion(MarkupOutput out)
Renders each of the prompt fields in corresponding order.void
renderPromptRestrictions(MarkupOutput out)
Renders prompt's restrictions.void
renderPromptSummary(MarkupOutput out)
Renders prompt's Summary section when Page is in 'Summary' mode.void
renderPromptSummaryAnswer(MarkupOutput out)
Renders the prompt's answer in a formatted string in 'Summary' mode.void
renderPromptSummaryTitle(MarkupOutput out)
Renders Prompt's title in 'Summary' mode.void
renderPromptTitle(MarkupOutput out)
Renders the title of the prompt.protected void
setArgumentValue(int argumentId, java.lang.String value)
Specifies a new argument value denoted by an unique Id.void
setAttrElemBlockCount(int count)
Specifies incremental fetch value for the size of block of attribute's elements to be displayed.void
setEnableBackToTopAnchor(boolean flag)
Specifies whether or not to display 'Back to Top' anchor.protected void
setExtraArguments()
Sets extra arguments for this prompt.void
setIsItemKeptInCartAvailable(boolean flag)
Specifies flag value for enabling or disabling item removal in Cart prompt transforms.void
setLevelFlag(int level)
Specifies level of visibility for all fields in prompt question are displayed.protected void
setLocale(int localeId)
Sets active locale in Web application.void
setMatchCaseSensitivity(boolean flag)
Specifies default value for match case checkbox.void
setObjectsBlockCount(int count)
Specifies incremental fetch value for the size of block of objects to be displayed.void
setPromptSummary(boolean flag)
Specifies whether or not to enable prompt summary.void
setShowRequired(boolean show)
Specifies property for whether or not displaying required message.void
transform(Transformable data, MarkupOutput out)
Transforms the PromptObject and append the output to the MarkupOutput.-
Methods inherited from class com.microstrategy.web.transform.AbstractLayoutTransform
getLayoutContext, getLayoutDefinition, setLayoutDefinition, transformUsingLayout
-
Methods inherited from class com.microstrategy.web.transform.AbstractTransform
addFormalParam, canTransform, getEvents, getFormalParams, getID, getPreview, isPreviewAvailable, isResolved, removeFormalParam, setAnnotation, setDeprecated, supports, supports
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.transform.Transform
getDescription
-
-
-
-
Field Detail
-
_globalCss
protected java.lang.String _globalCss
Specifies CSS class of the main HTML container tag of the prompt information.- Since:
- MicroStrategy Web 8.0.0
-
_imagesFolder
protected java.lang.String _imagesFolder
Indicates images folder path.
-
levelFlag
public FormalParameter levelFlag
Specifies what fields in prompt question are displayed.
Prompt question is broken down in four visible fields: title, meaning, restriction and content. Multiple fields can be displayed at the same time. Which fields to be displayed is indicated by a bit-wise flag.
This flag is used as bit-wise value.
Allowed Values:
- Title = LEVEL_SHOW_TITLE
- Meaning = LEVEL_SHOW_MEANING
- Restriction = LEVEL_SHOW_RESTRICTION
- Content = LEVEL_SHOW_CONTENT
- Back to Top = LEVEL_SHOW_TITLE_BACKTOTOP
- Show all = LEVEL_SHOW_ALL
For complete list, refer toEnumPromptLevelFlags
Usage:
For example, if you want to specify name and owner, then you would specify (1 + 4 = 5) Default value isLEVEL_SHOW_ALL
-
showRequired
public FormalParameter showRequired
Specifies whether or not to display 'Required' message at the end of prompt title.
'Required' message is static and it's displayed along with prompt title. This message can be either displayed or not.
This flag is used as boolean value.
-
imgCalendar
public FormalParameter imgCalendar
Specifies image to use when Calendar object is enabled and visible.
The value to indicate should be a valid image file name, with any necessary path information not included already on theresourcesFolderImage
application configuration parameter.
-
imgError
public FormalParameter imgError
Specifies the image to use to highlight an error in a prompt.
The value to indicate should be a valid image file name, with any necessary path information not included already on theresourcesFolderImage
application configuration parameter.
-
cssPrefix
public FormalParameter cssPrefix
Prefix to append to all css class names.- Since:
- MicroStrategy Web 8.0.0
-
_cssPrefix
protected java.lang.String _cssPrefix
Property for storing the value of thecssPrefix
formal parameter, initialized with theinitializeCss
method.- Since:
- MicroStrategy Web 8.0.0
-
imgBackToTop
@Deprecated public FormalParameter imgBackToTop
Deprecated.This formal parameter is no longer used. There are no references to this formal parameter in the codeSpecifies the image to use to going back to top link.
The value to indicate should be a valid image file name, with any necessary path information not included already on theresourcesFolderImage
application configuration parameter.
-
_dataTypeForCalendar
protected int _dataTypeForCalendar
Specifies data type for calendar.
-
isDhtmlMode
protected boolean isDhtmlMode
Indicates whether or not DHTML mode is enabled.
This values is initialized based on thegetPromptsBean().getOutputFormat()
method.
-
_blockCount
protected int _blockCount
Denotes generic block count.
Determines size of elements page to be displayed.
-
_calendar
protected GGCalendar _calendar
Represents calendar object.- Since:
- MicroStrategy Web 7.5.1
-
-
Method Detail
-
getTagsFactory
public TagsFactory getTagsFactory()
Provides factory class for creating HTML tags.
ThisTagsFactory
instance is a factory class which will allow the creation ofTag
objects in order to create HTML tags.- Returns:
- TagsFactory instance of factory class.
- Since:
- MicroStrategy Web 8.0.0
-
addFormalParameter
public FormalParameter addFormalParameter(java.lang.String name, int type, java.lang.Object defaultValue, java.lang.String description)
Adds a formal parameter to this transform based upon given information.
Auxiliar method to initialize or create a new Formal parameter. Intensively used across all Prompt transforms.- Parameters:
name
- the name of the formal parametertype
- the type of the formal parameter, as defined in theFormalParameter
constants.defaultValue
- the default valuedescription
- Description of the FP, to use by the style catalog.- Returns:
- the FormalParameter created.
-
getDescriptor
protected java.lang.String getDescriptor(int key)
Returns a descriptor (localized message) associated to this key.- Parameters:
key
- int value for key or descriptor Id.- Returns:
- descriptor as localized text.
-
getDescriptor
public java.lang.String getDescriptor(java.lang.String key)
Get the descriptor for the given key.
The key is searched exactly as given in the Messages bundle.
If a descriptor is not found for the given key it returns [na]- Parameters:
key
- input key as aString
, for example,mstrWeb.1
- Returns:
- descriptor as a
String
corresponding to the key sent in as parameter, for example,
Home
. - Since:
- MicroStrategy Web 8.0.2
-
getDescriptor
public java.lang.String getDescriptor(java.lang.String key, java.lang.String defaultDescriptor)
- Since:
- MicroStrategy Web 8.0.2
-
arePromptsLoadedFirstTime
protected boolean arePromptsLoadedFirstTime()
Indicates whether or not prompts are loaded the firt time.
It looks for any 'prompt' hidden value in request indicating there was a prompt request to be processed. This means, user has started editing any prompt in report.- Returns:
- boolean true if there's no prompt request values.
- Since:
- MicroStrategy Web 8.0.0
-
getPromptsBean
protected PromptsBean getPromptsBean()
Indicates current instance of PromptsBean to be transformed.- Returns:
- PromptsBean instance object.
-
isPromptSummaryEnabled
public boolean isPromptSummaryEnabled()
Indicates whether to display prompt summary or not.- Returns:
- boolean true if summary is enabled
- Since:
- MicroStrategy Web 8.0.0
-
getRequestKeys
protected RequestKeys getRequestKeys()
- Since:
- MicroStrategy Web 9.0.0
-
getAttrElemBlockCount
public int getAttrElemBlockCount()
Indicates block count, an incremental fetch value for displaying attribute's elements.
This value is used to determine the number of attribute's elements displayed per page or block.
Note: incremental fetch isn't supported by all prompt types and styles. Available only in expression and element prompts with Cart styles, and some Hierarchical prompts.- Returns:
- int block count value.
-
getObjectsBlockCount
public int getObjectsBlockCount()
Indicates block count, an incremental fetch value for displaying list of objects.
This value is used to determine the number of objects displayed per page or block.
Note: incremental fetch isn't supported by all prompt types and styles. Available only in object prompts with Cart styles and most Hierarchical prompts.- Returns:
- int block count value
-
getMatchCaseSensitivity
public boolean getMatchCaseSensitivity()
Indicates default value for match case checkbox.
Intended for prompt styles where searches on attributes or objects are supported, such as cart prompts. Default value is determined by a project preference available in Web application. any prompts that have a search field with a 'match case' check box will default to this property value.- Returns:
- boolean value, true match case is enabled for searches.
-
getPrompt
protected PromptObject getPrompt()
Indicates instance of PromptObjectPromptObject
being transformed.
This interface represents information about a single prompt. It manages its position property and a WebPrompt object.- Returns:
- PromptObject instance.
-
setPromptSummary
public void setPromptSummary(boolean flag)
Specifies whether or not to enable prompt summary.
Used when prompt summary has to be displayed. Instead of rendering all prompt quiestion fields, a brief prompt summary of current will be displayed.- Parameters:
flag
- true enables prompt summary.
-
setAttrElemBlockCount
public void setAttrElemBlockCount(int count)
Specifies incremental fetch value for the size of block of attribute's elements to be displayed.- Parameters:
count
- int number of elements to display per page.
-
setMatchCaseSensitivity
public void setMatchCaseSensitivity(boolean flag)
Specifies default value for match case checkbox.
Intended for prompt styles where searches on attributes or objects are supported, such as cart prompts. Default value is determined by a project preference available in Web application. any prompts that have a search field with a 'match case' check box- Parameters:
flag
- true to check off match case checkbox.
-
setObjectsBlockCount
public void setObjectsBlockCount(int count)
Specifies incremental fetch value for the size of block of objects to be displayed.- Parameters:
count
- number of objects to display per page.
-
setLevelFlag
public void setLevelFlag(int level)
Specifies level of visibility for all fields in prompt question are displayed.
Prompt question is broken down in four visible fields: title, meaning, restriction and content. Multiple fields can be displayed at the same time. Which fields to be displayed is indicated by a bit-wise flag.
Allowed Values:
- Title = LEVEL_SHOW_TITLE
- Meaning = LEVEL_SHOW_MEANING
- Restriction = LEVEL_SHOW_RESTRICTION
- Content = LEVEL_SHOW_CONTENT
- Show all = LEVEL_SHOW_ALL
for complete list of values, refer toEnumPromptLevelFlags
- Parameters:
level
- bit-wise flag
-
setIsItemKeptInCartAvailable
public void setIsItemKeptInCartAvailable(boolean flag)
Specifies flag value for enabling or disabling item removal in Cart prompt transforms.- Parameters:
flag
- boolean true to remove selected item in 'From' list.- Since:
- MicroStrategy Web 8.0.1
-
isItemKeptInCartAvailable
public boolean isItemKeptInCartAvailable()
Indicates property value for whether or not selected item in cart's 'From' list should be removed.- Returns:
- boolean, true if item is to be removed.
- Since:
- MicroStrategy Web 8.0.1
-
setShowRequired
public void setShowRequired(boolean show)
Specifies property for whether or not displaying required message.- Parameters:
show
- boolean flag, true if 'Required' message gets displayed at the of the prompt title.
-
getShowRequired
public boolean getShowRequired()
Indicates property value for whether or not displaying required message.- Returns:
- boolean, true if 'Required' message is displayed at the of the prompt title.
-
initializePromptContent
protected void initializePromptContent() throws WebObjectsException
Initializes infrastructure needed for rendering prompt.
Part of initialization process requires to process or initialize at least three main areas: Incremental fetch, available items and set extra arguments. Incremental fetch process will initialize all corresponding objects needed for displaying it, if available. Available Items process, will require few calls to SDK in order to retrieve information from backend. Setting extra arguments will add at the end of the prompt's HTML form, all request parameters for persistance needed to be passed on every request.
Most likely, each prompt transform extending this interface will overwrite any of these functions. Each prompt type and style might have different ways of initializing their data.- Throws:
WebObjectsException
- if an error occurs. Functions invoking this method must handle this exception accordingly.
-
processAvailableItems
protected void processAvailableItems() throws WebObjectsException
Initializes display settings for retrieving available items defined in prompt.
This function will be responsible of initializing the settings for default highlighting and default selection prior to getting a formatted DisplayXML, which is used for rendering prompt question. These settings will be used for getting the available display units collection, which is used to display all available objects to end user. It will turn on default selection should be enabled. It will turn on default highlighting should be enabled. It will turn off whether default highlighting preventing it from being detailed.
These settings will be applied to a WebDisplayHelper object, property part of current PromptObject. It is used to generate display XML containing both the contents of an object (e.g. the current state of a filter) and a list of available objects which the user can choose from to add to the object.- Throws:
WebObjectsException
- this exception must be handled.
-
onBeforeApplyDefaultDisplaySettings
protected void onBeforeApplyDefaultDisplaySettings() throws WebObjectsException
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 8.0.1
-
isLocked
public boolean isLocked(WebDisplayUnit unit)
Determines whether givenWebDisplayUnit
unit is locked up.
Tests if the lock type isEnumDSSXMLAttributeLockType.DssXmlLockCustom
orEnumDSSXMLAttributeLockType.DssXmlLockLimit
, in which case returnsTrue
- Parameters:
unit
-WebDisplayUnit
to test.- Returns:
True
if attribute is locked. ReturnsFalse
otherwise.- Since:
- MicroStrategy Web 8.0.0
-
isLockedForSearch
public boolean isLockedForSearch(WebDisplayUnit unit)
Determines whether givenWebDisplayUnit
unit is locked up for search only.
Tests if the lock type isEnumDSSXMLAttributeLockType.DssXmlLockCustom
in which case returnsTrue
.- Parameters:
unit
-WebDisplayUnit
to test.- Returns:
True
if attribute is locked. ReturnsFalse
otherwise.- Since:
- MicroStrategy Web 8.0.0
-
getDimensionAttribute
public WebDimensionAttribute getDimensionAttribute(WebDisplayUnit unit)
Obtains the dimension attribute given theWebDisplayUnit
instance provided.- Parameters:
unit
-WebDisplayUnit
initialized instance to analyze- Returns:
WebDimensionAttribute
instance with the information obtained from the input parameter.- Since:
- MicroStrategy Web 8.0.0
-
processIncrementalFetch
protected void processIncrementalFetch() throws WebObjectsException
Initializes incremental fetching settings.
This function has to be overwritten for prompts different to element and object. It gets instance of WebPrompt by calling PromptObject.getWebPrompt() function; WebPrompt is an interface that represents a prompt object. It defines functionality common to all prompt types.
Depending upon what prompt type is, either element or object, properties for incremental fetch are set. For element prompts, WebPrompt instance is cast to WebElementsPrompt class and function setBlockCount is called.
In the case of an object prompt, we cast WebPrompt instance to a WebObjectsPrompt class. Here, search object (WebSearch instance) gets modified. Name pattern and block count are set.- Throws:
WebObjectsException
- needs to be handled.
-
getAvailableDisplayUnits
protected WebDisplayUnits getAvailableDisplayUnits()
Specifies aWebDisplayUnits
collection of the available units of this prompt.
This collection is used for rendering prompt question.- Returns:
- WebDisplayUnits collection instance.
-
getDisplayHelper
protected WebDisplayHelper getDisplayHelper() throws WebObjectsException
Provides an instance of Web display helper object.
This inteface is used to generate display XML containing both the contents of an object (e.g. the current state of a filter) and a list of available objects which the user can choose from to add to the object.- Returns:
- WebDisplayHelper instance.
- Throws:
WebObjectsException
- which must be handled.
-
transform
public void transform(Transformable data, MarkupOutput out)
Transforms the PromptObject and append the output to the MarkupOutput.
Here, all output transformation take place. PromptObject is processed in order to generate corresponding output through MarkupOutput instance.
Which type of output, either Prompt summary or prompt question, is determined here. Images and prompt content get initialized prior to rendering prompt fields.
-
renderPromptQuestion
public void renderPromptQuestion(MarkupOutput out)
Renders each of the prompt fields in corresponding order.
Level is checked before rendering each prompt field. The rendering order is as follows: title, error message (if any), meaning, restrictions, content or no selections available (if applies), and finally default answer.
Each of these fields has its own render method, for example, title gets rendered by function renderPromptTitle.- Parameters:
out
- MarkupOutput instance where to append the transform output.
-
isDimensionalPrompt
public boolean isDimensionalPrompt()
Determines whether or not given prompt was defined as Dimty prompt.
Prompt is considered dimensional prompt if level flag allows to display default answer and prompt's answer is considered as complex and prompt's type is Dimty.- Returns:
- boolean true if prompt is defined as Dimty prompt.
- Since:
- MicroStrategy Web 8.0.0
-
renderPromptNoSelectionsAvailable
public void renderPromptNoSelectionsAvailable(MarkupOutput out)
Displays error message indicating that available list doesn't have any selection available.
Available mostly with embedded promtps, where second prompt doesn't have selections. Error must be displayed to inform end-users.- Parameters:
out
- the transform output
-
renderPromptErrorMessage
public void renderPromptErrorMessage(MarkupOutput out)
Renders a localized generic error message to end-users.
Error is displayed mostly when a validation fails either in backend or SDK. It is enabled in all prompt types and styles.- Parameters:
out
- the transform output
-
getErrorMessage
protected java.lang.String getErrorMessage(WebBeanError promptError)
Returns a localized error message.
Error message is associated to promptError code returned by SDK. It's associated to a generic error message to be displayed.- 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
-
renderPromptSummary
public void renderPromptSummary(MarkupOutput out)
Renders prompt's Summary section when Page is in 'Summary' mode.
It displays summary title and immediately it displayes summary answer.- Parameters:
out
- the transform output
-
renderPromptHiddenInputs
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
-
renderMinMaxHiddenValues
@Deprecated public void renderMinMaxHiddenValues(MarkupOutput out)
Deprecated.the method is not been called by others.Renders hidden values for prompt's max/min limits.
Append prompt restrictions as hidden values to be used in DHTML mode for validating dates vs the minimum/maximum values if there are any.- Parameters:
out
- the transform output
-
renderPromptIFrameRequest
public void renderPromptIFrameRequest(MarkupOutput out)
Renders the content of the prompt in case of an IFrame request.
This method should be processed by the child transform if needed. Likely, when Hierarchical Prompt tree style is being processed.- Parameters:
out
- the transform output.- Since:
- MicroStrategy Web 8.0.0
-
renderPromptTitle
public void renderPromptTitle(MarkupOutput out)
Renders the title of the prompt.- Parameters:
out
- the transform output.
-
setEnableBackToTopAnchor
public void setEnableBackToTopAnchor(boolean flag)
Specifies whether or not to display 'Back to Top' anchor.
Property being set by Prompts container transform.- Parameters:
flag
- boolean true to display anchor.- Since:
- MicroStrategy Web 8.0.0
-
isBackToTopAnchorEnabled
public boolean isBackToTopAnchorEnabled()
Indicates whether or not 'Back to Top' anchor is enabled for current prompt.- Returns:
- boolean true if enabled.
- Since:
- MicroStrategy Web 8.0.0
-
renderPromptBackToTopAnchor
public void renderPromptBackToTopAnchor(MarkupOutput out)
Renders HTML anchor to allow end users to go back to Top of Prompts page.
This anchor won't be rendered if given prompt happens to be first one in collection when displaying all prompts in one page.- Parameters:
out
- MarkupOutput where to write anchor.- Since:
- MicroStrategy Web 8.0.0
-
renderPromptRestrictions
public void renderPromptRestrictions(MarkupOutput out)
Renders prompt's restrictions.
Restrictions are available in current prompt's definition.- Parameters:
out
- the transform output
-
renderPromptMeaning
public void renderPromptMeaning(MarkupOutput out)
Renders the meaning of the prompt.
Meaning information is available in Prompt's definition. It is rendered under the title.- Parameters:
out
- the transform output
-
renderPromptSummaryTitle
public void renderPromptSummaryTitle(MarkupOutput out)
Renders Prompt's title in 'Summary' mode.- Parameters:
out
- the transform output
-
renderPromptSummaryAnswer
public void renderPromptSummaryAnswer(MarkupOutput out)
Renders the prompt's answer in a formatted string in 'Summary' mode.- Parameters:
out
- the transform output
-
renderPromptNotAnswered
public void renderPromptNotAnswered(MarkupOutput out)
Renders a localized message for indicating given prompt is not answered.
It creates an HTML SPAN tag whose inner text is consisted of localized message associated to descriptor id 1068 ('Prompt not answered').- Parameters:
out
- MarkupOutput where to write message.- Since:
- MicroStrategy Web 8.0.0
-
hasAnswer
protected boolean hasAnswer()
Indicates whether prompt instance has an answer in its definition.
It could be either a default or previous answer.- Returns:
- boolean true if there's an answer.
-
setExtraArguments
protected void setExtraArguments()
Sets extra arguments for this prompt.
These arguments will be render later as hidden inputs.
-
renderPromptDefaultAnswer
public void renderPromptDefaultAnswer(MarkupOutput out)
Renders HTML area with default answer definition.
This answer is displayed below prompt question and it's only informative.- Parameters:
out
- where to write the output of the method.
-
renderPromptContent
public void renderPromptContent(MarkupOutput out)
Renders the body of the prompt content.
Each concrete class must override this method.- Parameters:
out
- the transform output
-
isAnswerComplex
public abstract boolean isAnswerComplex()
Checks whether a prompt has a default answer, and if it has, if the default answer is complex. Complex answers are those that cannot be displayed by the prompt answer input interface, so they need to be rendered in a separate window- Returns:
- true if the prompt has a default answer and it is complex.
-
renderPromptAnswerMeaning
public void renderPromptAnswerMeaning(MarkupOutput out)
Renders prompt's meaning information.
For the current answer, it renders it's meaning. Used when rendering the prompt summary, or when the prompt has a complex answer.- Parameters:
out
- the transform output
-
setArgumentValue
protected void setArgumentValue(int argumentId, java.lang.String value)
Specifies a new argument value denoted by an unique Id.
This new argument will set to prompt's Answer event arguments collection.- Parameters:
argumentId
- the idvalue
- to be used for setting argument
-
getArgumentName
protected java.lang.String getArgumentName(int argumentId)
Returns an argument name for the given id.
Argument will be read from prompt's Answer event arguments collection. 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
-
initializeCss
public void initializeCss()
Initializes the css information to be used by this transform.- Since:
- MicroStrategy Web 8.0.0
-
initializeImages
public void initializeImages()
Initializes the images to be used by this transform.
-
getCalendar
protected GGCalendar getCalendar()
Returns a localized instance of Calendar component.
This object is used for creating an calendar HTML object used for entering date values.- Returns:
- calendar as a GGCalendar instance.
-
getSupportedBeanType
public java.lang.Class getSupportedBeanType()
Indicates Bean type of prompt object being used by the transform.- Specified by:
getSupportedBeanType
in interfaceTransform
- Returns:
- Class object, reference to PromptObject instance
-
isIFrameRequest
protected boolean isIFrameRequest()
Indicates whether or not Frame is active in Web application.- Returns:
- boolean true if frame is active.
-
areThereAvailableSelections
public boolean areThereAvailableSelections()
Indicates size of available selections.- Returns:
- boolean true if available selection is greater than 0
-
isNodeComplex
@Deprecated protected boolean isNodeComplex(WebNode node)
Deprecated.This method has been deprecated since this is specific to expression prompts.
Use the method on AbstractPromptExpressionTransform.Indicates if a single subexpression is considered as Complex.
An expression is complex if it cannot be created using the Web interface.
This is used by ExpressionPrompts transforms to determine if the Answer is Complex.- Parameters:
node
- the root node of the subexpression to check- Returns:
- True if the Node is complex, that is, it cannot be created using Web.
-
isTrue
protected boolean isTrue(FormalParameter parameter)
Indicates if givenFormalParamter
is a Boolean True instance.- Parameters:
parameter
- the formal parameter to check- Returns:
- true if the parameter is true.
-
setLocale
protected void setLocale(int localeId)
Sets active locale in Web application.
Locale is used for localizing all messages displayed to end user.- Parameters:
localeId
- indicates country language to be used.
-
checkLevel
protected boolean checkLevel(int iLevelConst)
Indicates if the level parameter value contains given flag.
Level flag is used for determining which sections in prompt will be displayed.- Parameters:
iLevelConst
- level flag- Returns:
- true means the level flag is included in the level parameter value
-
getLocale
protected java.util.Locale getLocale()
Returns instance of current Locale.
Locale is used for localizing all messages displayed to end user.- Returns:
- Locale instance
-
getPromptsAppContext
protected AppContext getPromptsAppContext()
Determines prompt's AppContext.
It creates an AppContext from Prompt's Bean context.- Returns:
- instance of AppContext
-
getAnswerEvent
protected WebEvent getAnswerEvent()
Returns instance of prompt answer event.- Returns:
- WebEvent instance.
- Since:
- MicroStrategy Web 7.5.0
-
isXDAReport
protected boolean isXDAReport()
Indicates whether or not this a prompted XDA Report.- Returns:
- boolean true if XDA report.
- Since:
- MicroStrategy Web 8.0.0
-
isXDA_MDX_Report
protected boolean isXDA_MDX_Report()
Indicates whether or not this a prompted MDX Report.- Returns:
- boolean true if MDX report.
- Since:
- MicroStrategy Web 8.0.0
-
isXDA_CustomSQL_Report
protected boolean isXDA_CustomSQL_Report()
Indicates whether or not this a prompted CustomSQL Report.- Returns:
- boolean true if CustomSQL report.
- Since:
- MicroStrategy Web 8.0.0
-
getContainerServices
protected ContainerServices getContainerServices()
Retrieves the connected Container Services object.
If anything fails along the way, returns null.- Returns:
- The ContainerServices instance.
- Since:
- MicroStrategy Web 8.0.0
-
newHiddenInputBuilder
protected ParameterBuilder newHiddenInputBuilder()
Retrieves a new instance of a Hidden Input Builder from the connected Container Services object.
If anything fails along the way, returns null.- Returns:
- The ParameterBuilder instance to use for building Hidden Input strings.
- Since:
- MicroStrategy Web 8.0.0
-
newNamespaceEncoder
protected NamespaceEncoder newNamespaceEncoder()
Retrieves a new instance of a Namespace Encoder from the connected Container Services object.
If anything fails along the way, returns null.- Returns:
- The NamespaceEncoder instance to use for encoding names.
- Since:
- MicroStrategy Web 8.0.0
-
renderLayout
protected boolean renderLayout(MarkupOutput out)
Renders transform using layout infrastructure.
It process prompt transform through Layouts and if this approach fails a localized error message (descript 'An error has ocurred on this page' denoted by descriptor id 116) is displayed.- Parameters:
out
- where to write Prompt layout.- Returns:
- boolean true if transform was rendered successfully using Layouts.
- Since:
- MicroStrategy Web 8.0.0
-
getStringValue
protected java.lang.String getStringValue(FormalParameter parameter)
Returns the string value of the Formal Parameter.- Parameters:
parameter
- the formal parameter to check- Returns:
- the String value of the parameter
- Since:
- MicroStrategy Web 8.0.0
-
initializePromptObject
protected void initializePromptObject()
Initializes prompt object to default values.
Here, properties for determining whether or not prompts are sorted by required and level flag are specified.- Since:
- MicroStrategy Web 8.0.0
-
isPromptObjectInitialized
public boolean isPromptObjectInitialized()
Indicates whether or not given prompt is initialized.- Returns:
- boolean true if prompt is initialized.
- Since:
- MicroStrategy Web 8.0.0
-
isDhtmlMode
public boolean isDhtmlMode()
Indicates whether or not DHTML mode is enabled.- Returns:
- boolean true if DHTML is on.
- Since:
- MicroStrategy Web 8.0.0
-
getPromptsList
public java.util.ArrayList getPromptsList()
Returns an arraylist containing DisplayWebUnits.
This list can be processed by a layout file using a "list" structure. For example: This snippet shows how the "list" structure gets its elements using the getPromptsList function. The "render" method receives an item from the list as an argument to give back some output.- Returns:
- ArrayList collection consisted of all available items.
- Since:
- MicroStrategy Web 8.0.0
-
getIntValue
protected int getIntValue(FormalParameter parameter)
Returns theint
value of aFormalParamter
.
TheFormalParamter
needs to be of typeInteger
.- Parameters:
parameter
- the formal parameter to check- Returns:
- the intValue() of the parameter, 0 if the parameter is invalid.
- Since:
- MicroStrategy Web 8.0.1
-
isPromptRequired
public boolean isPromptRequired()
Shortcut method to check whether the prompt is required.- Returns:
- true if the prompt is required.
- Since:
- MicroStrategy Web 8.0.2
-
getMultipleEvent
protected WebEvent getMultipleEvent()
- Since:
- MicroStrategy Web 9.0.0
-
getMultipleEventArgumentString
protected java.lang.String getMultipleEventArgumentString(WebEvent event, int[] args)
- Since:
- MicroStrategy Web 9.0.0
-
isForDefinition
public boolean isForDefinition()
- Since:
- MicroStrategy Web 9.0.0
-
-