public abstract class

AbstractPromptObjectTransform

extends AbstractLayoutTransform
implements EnumPromptsBeanEvents
java.lang.Object
   ↳ com.microstrategy.web.transform.AbstractTransform
     ↳ com.microstrategy.web.transform.AbstractLayoutTransform
       ↳ com.microstrategy.web.app.transforms.AbstractPromptObjectTransform
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

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 the renderContent() method.

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.web.beans.EnumPromptsBeanEvents
Fields
protected int _blockCount Denotes generic block count.
protected GGCalendar _calendar Represents calendar object.
protected String _cssPrefix Property for storing the value of the cssPrefix formal parameter, initialized with the initializeCss method.
protected int _dataTypeForCalendar Specifies data type for calendar.
protected String _globalCss Specifies CSS class of the main HTML container tag of the prompt information.
protected String _imagesFolder Indicates images folder path.
public FormalParameter cssPrefix Prefix to append to all css class names.
public FormalParameter imgBackToTop This field is deprecated. This formal parameter is no longer used. There are no references to this formal parameter in the code
public FormalParameter imgCalendar Specifies image to use when Calendar object is enabled and visible.
public 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.
public FormalParameter levelFlag Specifies what fields in prompt question are displayed.
public FormalParameter showRequired Specifies whether or not to display 'Required' message at the end of prompt title.
Public Constructors
AbstractPromptObjectTransform()
Default no-args constructor, initialize all the formal parameters.
Public Methods
FormalParameter addFormalParameter(String name, int type, Object defaultValue, String description)
Adds a formal parameter to this transform based upon given information.
boolean areThereAvailableSelections()
Indicates size of available selections.
int getAttrElemBlockCount()
Indicates block count, an incremental fetch value for displaying attribute's elements.
String getDescriptor(String key, String defaultDescriptor)
String getDescriptor(String key)

Get the descriptor for the given key.

WebDimensionAttribute getDimensionAttribute(WebDisplayUnit unit)
Obtains the dimension attribute given the WebDisplayUnit instance provided.
boolean getMatchCaseSensitivity()
Indicates default value for match case checkbox.
int getObjectsBlockCount()
Indicates block count, an incremental fetch value for displaying list of objects.
ArrayList getPromptsList()
Returns an arraylist containing DisplayWebUnits.
boolean getShowRequired()
Indicates property value for whether or not displaying required message.
Class getSupportedBeanType()
Indicates Bean type of prompt object being used by the transform.
TagsFactory getTagsFactory()
Provides factory class for creating HTML tags.
void initializeCss()
Initializes the css information to be used by this transform.
void initializeImages()
Initializes the images to be used by this transform.
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()
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 given WebDisplayUnit unit is locked up.
boolean isLockedForSearch(WebDisplayUnit unit)
Determines whether given WebDisplayUnit unit is locked up for search only.
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.
void renderMinMaxHiddenValues(MarkupOutput out)
This method is 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.
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.
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.
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.
Protected Methods
boolean arePromptsLoadedFirstTime()
Indicates whether or not prompts are loaded the firt time.
boolean checkLevel(int iLevelConst)
Indicates if the level parameter value contains given flag.
WebEvent getAnswerEvent()
Returns instance of prompt answer event.
String getArgumentName(int argumentId)
Returns an argument name for the given id.
WebDisplayUnits getAvailableDisplayUnits()
Specifies a WebDisplayUnits collection of the available units of this prompt.
GGCalendar getCalendar()
Returns a localized instance of Calendar component.
ContainerServices getContainerServices()
Retrieves the connected Container Services object.
String getDescriptor(int key)
Returns a descriptor (localized message) associated to this key.
WebDisplayHelper getDisplayHelper()
Provides an instance of Web display helper object.
String getErrorMessage(WebBeanError promptError)
Returns a localized error message.
int getIntValue(FormalParameter parameter)
Returns the int value of a FormalParamter.
Locale getLocale()
Returns instance of current Locale.
WebEvent getMultipleEvent()
String getMultipleEventArgumentString(WebEvent event, int[] args)
PromptObject getPrompt()
Indicates instance of PromptObject PromptObject being transformed.
AppContext getPromptsAppContext()
Determines prompt's AppContext.
PromptsBean getPromptsBean()
Indicates current instance of PromptsBean to be transformed.
RequestKeys getRequestKeys()
String getStringValue(FormalParameter parameter)
Returns the string value of the Formal Parameter.
boolean hasAnswer()
Indicates whether prompt instance has an answer in its definition.
void initializePromptContent()
Initializes infrastructure needed for rendering prompt.
void initializePromptObject()
Initializes prompt object to default values.
boolean isIFrameRequest()
Indicates whether or not Frame is active in Web application.
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.
boolean isTrue(FormalParameter parameter)
Indicates if given FormalParamter is a Boolean True instance.
boolean isXDAReport()
Indicates whether or not this a prompted XDA Report.
boolean isXDA_CustomSQL_Report()
Indicates whether or not this a prompted CustomSQL Report.
boolean isXDA_MDX_Report()
Indicates whether or not this a prompted MDX Report.
ParameterBuilder newHiddenInputBuilder()
Retrieves a new instance of a Hidden Input Builder from the connected Container Services object.
NamespaceEncoder newNamespaceEncoder()
Retrieves a new instance of a Namespace Encoder from the connected Container Services object.
void onBeforeApplyDefaultDisplaySettings()
void processAvailableItems()
Initializes display settings for retrieving available items defined in prompt.
void processIncrementalFetch()
Initializes incremental fetching settings.
boolean renderLayout(MarkupOutput out)
Renders transform using layout infrastructure.
void setArgumentValue(int argumentId, String value)
Specifies a new argument value denoted by an unique Id.
void setExtraArguments()
Sets extra arguments for this prompt.
void setLocale(int localeId)
Sets active locale in Web application.
[Expand]
Inherited Methods
From class com.microstrategy.web.transform.AbstractLayoutTransform
From class com.microstrategy.web.transform.AbstractTransform
From class java.lang.Object
From interface com.microstrategy.web.transform.Transform

Fields

protected int _blockCount

Denotes generic block count.
Determines size of elements page to be displayed.

protected GGCalendar _calendar

Represents calendar object.

protected String _cssPrefix

Property for storing the value of the cssPrefix formal parameter, initialized with the initializeCss method.

protected int _dataTypeForCalendar

Specifies data type for calendar.

protected String _globalCss

Specifies CSS class of the main HTML container tag of the prompt information.

protected String _imagesFolder

Indicates images folder path.

public FormalParameter cssPrefix

Prefix to append to all css class names.

public FormalParameter imgBackToTop

This field is deprecated.
This formal parameter is no longer used. There are no references to this formal parameter in the code

Specifies 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 the resourcesFolderImage application configuration parameter.

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 the resourcesFolderImage application configuration parameter.

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 the resourcesFolderImage application configuration parameter.

protected boolean isDhtmlMode

Indicates whether or not DHTML mode is enabled.
This values is initialized based on the getPromptsBean().getOutputFormat() method.

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 to EnumPromptLevelFlags
Usage:
For example, if you want to specify name and owner, then you would specify (1 + 4 = 5) Default value is LEVEL_SHOW_ALL

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.

Public Constructors

public AbstractPromptObjectTransform ()

Default no-args constructor, initialize all the formal parameters.

Public Methods

public FormalParameter addFormalParameter (String name, int type, Object defaultValue, 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 parameter
type the type of the formal parameter, as defined in the FormalParameter constants.
defaultValue the default value
description Description of the FP, to use by the style catalog.
Returns
  • the FormalParameter created.

public boolean areThereAvailableSelections ()

Indicates size of available selections.

Returns
  • boolean true if available selection is greater than 0

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.

public String getDescriptor (String key, String defaultDescriptor)

public String getDescriptor (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 a String, for example, mstrWeb.1
Returns
  • descriptor as a String corresponding to the key sent in as parameter, for example, Home.

public WebDimensionAttribute getDimensionAttribute (WebDisplayUnit unit)

Obtains the dimension attribute given the WebDisplayUnit instance provided.

Parameters
unit WebDisplayUnit initialized instance to analyze
Returns

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.

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

public 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.

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.

public Class getSupportedBeanType ()

Indicates Bean type of prompt object being used by the transform.

Returns
  • Class object, reference to PromptObject instance

public TagsFactory getTagsFactory ()

Provides factory class for creating HTML tags.
This TagsFactory instance is a factory class which will allow the creation of Tag objects in order to create HTML tags.

Returns
  • TagsFactory instance of factory class.

public void initializeCss ()

Initializes the css information to be used by this transform.

public void initializeImages ()

Initializes the images to be used by this transform.

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.

public boolean isBackToTopAnchorEnabled ()

Indicates whether or not 'Back to Top' anchor is enabled for current prompt.

Returns
  • boolean true if enabled.

public boolean isDhtmlMode ()

Indicates whether or not DHTML mode is enabled.

Returns
  • boolean true if DHTML is on.

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.

public boolean isForDefinition ()

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.

public boolean isLocked (WebDisplayUnit unit)

Determines whether given WebDisplayUnit unit is locked up.
Tests if the lock type is DssXmlLockCustom or DssXmlLockLimit, in which case returns True

Parameters
unit WebDisplayUnit to test.
Returns
  • True if attribute is locked. Returns False otherwise.

public boolean isLockedForSearch (WebDisplayUnit unit)

Determines whether given WebDisplayUnit unit is locked up for search only.
Tests if the lock type is DssXmlLockCustom in which case returns True.

Parameters
unit WebDisplayUnit to test.
Returns
  • True if attribute is locked. Returns False otherwise.

public boolean isPromptObjectInitialized ()

Indicates whether or not given prompt is initialized.

Returns
  • boolean true if prompt is initialized.

public boolean isPromptRequired ()

Shortcut method to check whether the prompt is required.

Returns
  • true if the prompt is required.

public boolean isPromptSummaryEnabled ()

Indicates whether to display prompt summary or not.

Returns
  • boolean true if summary is enabled

public void renderMinMaxHiddenValues (MarkupOutput out)

This method is 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

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

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.

public void renderPromptContent (MarkupOutput out)

Renders the body of the prompt content.
Each concrete class must override this method.

Parameters
out the transform output

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.

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

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

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

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

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.

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.

public void renderPromptRestrictions (MarkupOutput out)

Renders prompt's restrictions.
Restrictions are available in current prompt's definition.

Parameters
out the transform output

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

public void renderPromptSummaryAnswer (MarkupOutput out)

Renders the prompt's answer in a formatted string in 'Summary' mode.

Parameters
out the transform output

public void renderPromptSummaryTitle (MarkupOutput out)

Renders Prompt's title in 'Summary' mode.

Parameters
out the transform output

public void renderPromptTitle (MarkupOutput out)

Renders the title of the prompt.

Parameters
out the transform output.

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.

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.

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.

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 to EnumPromptLevelFlags

Parameters
level bit-wise flag

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.

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.

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.

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.

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.

Parameters
data Transformable instance, hence the prompt to transform.
out MarkupOutput where to append output by this Transform

Protected Methods

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.

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

protected WebEvent getAnswerEvent ()

Returns instance of prompt answer event.

Returns
  • WebEvent instance.

protected 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

protected WebDisplayUnits getAvailableDisplayUnits ()

Specifies a WebDisplayUnits collection of the available units of this prompt.
This collection is used for rendering prompt question.

Returns
  • WebDisplayUnits collection instance.

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.

protected ContainerServices getContainerServices ()

Retrieves the connected Container Services object.
If anything fails along the way, returns null.

Returns
  • The ContainerServices instance.

protected 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.

protected WebDisplayHelper getDisplayHelper ()

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.

protected 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

protected int getIntValue (FormalParameter parameter)

Returns the int value of a FormalParamter.
The FormalParamter needs to be of type Integer.

Parameters
parameter the formal parameter to check
Returns
  • the intValue() of the parameter, 0 if the parameter is invalid.

protected Locale getLocale ()

Returns instance of current Locale.
Locale is used for localizing all messages displayed to end user.

Returns
  • Locale instance

protected WebEvent getMultipleEvent ()

protected String getMultipleEventArgumentString (WebEvent event, int[] args)

protected PromptObject getPrompt ()

Indicates instance of PromptObject PromptObject being transformed.
This interface represents information about a single prompt. It manages its position property and a WebPrompt object.

Returns
  • PromptObject instance.

protected AppContext getPromptsAppContext ()

Determines prompt's AppContext.
It creates an AppContext from Prompt's Bean context.

Returns
  • instance of AppContext

protected PromptsBean getPromptsBean ()

Indicates current instance of PromptsBean to be transformed.

Returns
  • PromptsBean instance object.

protected RequestKeys getRequestKeys ()

protected 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

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.

protected void initializePromptContent ()

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.

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.

protected boolean isIFrameRequest ()

Indicates whether or not Frame is active in Web application.

Returns
  • boolean true if frame is active.

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

protected boolean isTrue (FormalParameter parameter)

Indicates if given FormalParamter is a Boolean True instance.

Parameters
parameter the formal parameter to check
Returns
  • true if the parameter is true.

protected boolean isXDAReport ()

Indicates whether or not this a prompted XDA Report.

Returns
  • boolean true if XDA report.

protected boolean isXDA_CustomSQL_Report ()

Indicates whether or not this a prompted CustomSQL Report.

Returns
  • boolean true if CustomSQL report.

protected boolean isXDA_MDX_Report ()

Indicates whether or not this a prompted MDX Report.

Returns
  • boolean true if MDX report.

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.

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.

protected void onBeforeApplyDefaultDisplaySettings ()

protected void processAvailableItems ()

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.

protected void processIncrementalFetch ()

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.

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.

protected void setArgumentValue (int argumentId, 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 id
value to be used for setting argument

protected void setExtraArguments ()

Sets extra arguments for this prompt.
These arguments will be render later as hidden inputs.

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.