com.microstrategy.web.objects.WebPrompt |
![]() |
This interface represents a prompt object. It defines finctionality common to all prompt types. Note that if the properties of a prompt object are needed, it is highly preferred to use getDisplayProperties instead of getPropertySets.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
answerPrompt()
Submits prompt answers to the I-Server.
| ||||||||||
abstract void | buildShortAnswerXML(WebXMLBuilder builder) | ||||||||||
abstract String |
getAnswerXML(boolean shortFormat, boolean encode, boolean includeClosed)
Returns an XML string representing the prompt answer.
| ||||||||||
abstract String |
getAnswerXML()
Returns the XML representation of prompt answer.
| ||||||||||
abstract String |
getAnswerXML(boolean encode)
Returns the XML representation of prompt answer.
| ||||||||||
abstract int |
getBrowsableDataSourceFlags()
Returns the XDA flags
EnumDSSXMLExternalSourceFlags of the data source for browsing. | ||||||||||
abstract int | getDSSPromptType() | ||||||||||
abstract WebDisplayHelper |
getDisplayHelper()
Returns a display helper object that can be used to build prompt display
XML.
| ||||||||||
abstract WebDisplayHelper |
getDisplayHelper(boolean populateDisplayUnits)
Returns a display helper object that can be used to build prompt display
XML.
| ||||||||||
abstract WebProperties |
getDisplayProperties()
Returns prompt display properties or null.
| ||||||||||
abstract String |
getKey()
Returns a key to uniquely identify a
WebPrompt . | ||||||||||
abstract String |
getMax()
Returns value of prompt miximum property or null.
| ||||||||||
abstract String |
getMeaning()
Returns prompt meaning or null
| ||||||||||
abstract boolean |
getMerge()
????
| ||||||||||
abstract String | getMessageId() | ||||||||||
abstract String |
getMin()
Returns value of prompt minimum property or null.
| ||||||||||
abstract int |
getPIN()
Returns prompt's PIN assigned by the I-Server that uniquely identifies
this prompt inside prompts collection.
| ||||||||||
abstract WebPromptLocation | getPrimaryLocation() | ||||||||||
abstract int |
getPromptType()
Returns prompt type
| ||||||||||
abstract int |
getReuse()
Returns prompt reuse mode.
| ||||||||||
abstract String |
getShortAnswerXML(boolean encode)
Returns the XML representation of prompt answer in the format used by the
Narrowcast server.
| ||||||||||
abstract String |
getShortAnswerXML()
Returns the XML representation of prompt answer in the format used by the
Narrowcast server.
| ||||||||||
abstract String | getShortPa() | ||||||||||
abstract String | getShortPa(boolean includeClosed) | ||||||||||
abstract String |
getTitle()
Returns prompt title or null.
| ||||||||||
abstract WebUserAnswers |
getUserAnswers()
Returns a collection of user prompt answers.
| ||||||||||
abstract int[] |
getXDATypes()
Returns all XDA types associated with this prompt.
| ||||||||||
abstract boolean |
hasAnswer()
A prompt contains a collections of answers (previous/default/current).
| ||||||||||
abstract boolean |
hasDefaultAnswer()
A prompt contains a collections of answers (previous/default/current).
| ||||||||||
abstract boolean |
hasOriginalAnswer()
Returns true if original prompt XML contained current answer, false otherwise.
| ||||||||||
abstract boolean |
hasPreviousAnswer()
A prompt contains a collections of answers (previous/default/current).
| ||||||||||
abstract boolean |
isAnswerEmpty()
Returns true if the current prompt answer is null or the
answer collection is empty (For example, in Elements collection is empty
in case of an element prompt).
| ||||||||||
abstract boolean |
isCanceled()
Returns true if the prompt is canceled, false otherwise
| ||||||||||
abstract boolean |
isClosed()
Returns true if the prompt is closed, false otherwise.
| ||||||||||
abstract boolean |
isRequired()
Returns true if this prompt is required, false otherwise
| ||||||||||
abstract boolean |
isUsed()
Returns true if the prompt is used, false otherwise
| ||||||||||
abstract void |
populateAnswer(String answerXML)
Populate the current answer from the XML.
| ||||||||||
abstract void |
resetAnswer()
Resets the current answer to be either the previous answer or the default answer.
| ||||||||||
abstract void |
resetToDefault()
Resets the current answer to the default answer if there is one
| ||||||||||
abstract void |
setCanceled()
Sets prompt closed flag.
| ||||||||||
abstract void |
setClosed(boolean closed)
Sets prompt closed flag.
| ||||||||||
abstract void |
setMax(String max)
Sets the maximum property of the prompt to the new value.
| ||||||||||
abstract void |
setMeaning(String meaning)
Sets the meaning of the prompt definition.
| ||||||||||
abstract void |
setMin(String min)
Sets the minimum property of the prompt to the new value.
| ||||||||||
abstract void |
setRequired(boolean isRequired)
Sets the required flag on the prompt.
| ||||||||||
abstract void |
setReuse(int reuse)
Sets the prompt reuse mode for a prompt definition.
| ||||||||||
abstract void |
setTitle(String title)
Sets the title of the prompt definition.
| ||||||||||
abstract void |
validate()
Validates whether the prompt passes the maximum and minimum limits (normally are limits on count of answers),
and required validation requirements.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Submits prompt answers to the I-Server. This method behaves differently based on the values of Closed and Cancel properties (see the table below)
Property Values |
Comments |
Closed = False and Cancel = False |
The answer method will send the answer in the prompt object to the I-Server. If the object did not have any answer, it will send an empty answer to I-Server. If the call is successful, it will mark the object as closed. |
Closed = False and Cancel = True |
The answer method will ask the I-Server to cancel the prompt. If the call is successful it will mark the object as closed. Note that canceling a prompt is semantically different that answering a prompt with empty answer. |
Closed = True and Cancel = True or False |
Since the prompt is marked closed, the answer method will not make any call to the I-Server. |
WebObjectsException | if there were some problems submitting answers to the I-Server. |
---|
Returns an XML string representing the prompt answer. This XML can be persisted and used later to populate answer of prompt object received from I-Server. This way it is possible to reduce significantly the size of information persisted on the client.
shortFormat | if true , the returned XML is formated for
use by Narrowcast Server |
---|---|
encode | if true , the returned XML will have all the
special characters HTML-encoded. |
includeClosed | if true , thr returned XML also contains the answer
XML for all the closed prompts. |
Returns the XML representation of prompt answer. This XML can be persisted and used later to populate answer of prompt object received from I-Server. This way it is possible to reduce significantly the size of information persisted on the client.
Returns the XML representation of prompt answer. If the encode
parameter is true the reurned string will be HTML encodded.
encode | a flag indicating that the XML must be HTM encoded |
---|
Returns the XDA flags EnumDSSXMLExternalSourceFlags
of the data source for browsing.
GUI can use this flag to determine the functionalities supported by this data source
(for example, element search).
EnumDSSXMLExternalSourceFlags
of the data source for browsing for this prompt.
Default value is DssXmlExternalSourceNone
.
Returns a display helper object that can be used to build prompt display XML.
WebObjectsException |
---|
Returns a display helper object that can be used to build prompt display XML.
populateDisplayUnits | suggests that the suggested answers must be populated |
---|
WebObjectsException |
---|
Returns prompt display properties or null. This should be used instead of getPropertySets for prompt objects - this collection will contain only those properties that are specific to executing the prompt.
Returns a key to uniquely identify a WebPrompt
. The key never
changes in the duration of running a report or document, while the
pin
could change if there are embedded prompt emerging out.
WebPrompt
.Returns value of prompt miximum property or null. This value is used to validate prompt answers.
Returns prompt meaning or null
????
Returns value of prompt minimum property or null. This value is used to validate prompt answers.
Returns prompt's PIN assigned by the I-Server that uniquely identifies this prompt inside prompts collection.
Returns prompt reuse mode. This will be a value from EnumDSSXMLPromptReuse
.
EnumDSSXMLPromptReuse
Returns the XML representation of prompt answer in the format used by the
Narrowcast server. If the encode
parameter is true the reurned string will be HTML encodded.
encode | a flag indicating that the XML must be HTM encoded |
---|
Returns the XML representation of prompt answer in the format used by the Narrowcast server. This XML can be persisted in the Narrowcast server repository and used later to populate answer of prompt object received from I-Server.
Returns prompt title or null.
Returns a collection of user prompt answers. An empty collection is returned if there is no user prompt answers from the prompt question object.
Returns all XDA types associated with this prompt. This should be used by the GUI to determine any features which may need to be disabled. If this is not an XDA report, then this will be null.
EnumDSSXMLXDAType
, or null if this
is not an XDA prompt.A prompt contains a collections of answers (previous/default/current). This method checks whether there is a non-null current answer.The current answer is the answer that gets submitted to the Server when you call answer prompt.
A prompt contains a collections of answers (previous/default/current). The default answer is part of the prompt definition. Returns true if the prompt has a non-null default answer, false otherwise.
Returns true if original prompt XML contained current answer, false otherwise.
A prompt contains a collections of answers (previous/default/current). The previous answer is the answer from the previous execution. Returns true if the prompt has previous answer, false otherwise.
hasAnswer()
Returns true if the current prompt answer is null or the answer collection is empty (For example, in Elements collection is empty in case of an element prompt).
Returns true if the prompt is canceled, false otherwise
Returns true if the prompt is closed, false otherwise. When a prompt's answer has been submitted to and validated by Intelligence Server, the prompt is marked as closed.
Returns true if this prompt is required, false otherwise
Returns true if the prompt is used, false otherwise
Populate the current answer from the XML. This method takes both
standard and short answer formats. If the answerXML
parameter
is null and the prompt has the current answer it will be removed.
answerXML | the answer XML. |
---|
WebObjectsException |
---|
Resets the current answer to be either the previous answer or the default answer. Sets the previous Answer if available as the current answer. If there is no previous answer, it sets the default answer as the current answer.
WebObjectsException |
---|
Resets the current answer to the default answer if there is one
WebObjectsException |
---|
Sets prompt closed flag. If this flag set to true then when the answerPrompt is called for this prompt the SDK will request the I-Server to cancel the prompt
Sets prompt closed flag. If this flag set to true the prompt answer will not be sent to I-Server.
closed | the closed flag value |
---|
Sets the maximum property of the prompt to the new value. This is only a meaningful thing to do for prompt definitions, not prompt answers.
max | The new maximum value, or null to remove the maximum restriction. |
---|
Sets the meaning of the prompt definition.
meaning | The new value for the meaning property. |
---|
Sets the minimum property of the prompt to the new value. This is only a meaningful thing to do for prompt definitions, not prompt answers.
min | The new minimum value, or null to remove the minimum restriction. |
---|
Sets the required flag on the prompt. This is only a meaningful thing to do for a prompt definition, not a prompt question.
isRequired | The new value for the isRequired flag. |
---|
Sets the prompt reuse mode for a prompt definition. This should be a value from EnumDSSXMLPromptReuse
.
reuse | The new value to use for the reuse mode of the prompt, from EnumDSSXMLPromptReuse . |
---|
Sets the title of the prompt definition.
title | The new title for the prompt definition. |
---|
Validates whether the prompt passes the maximum and minimum limits (normally are limits on count of answers),
and required validation requirements.
This method should be called after setting answer for this prompt and before calling answerPrompt()
.
This check in done at web server side, no Intelligence Server call involved.
An exception is thrown if one of the conditions fails - check the error code
to see which test failed.
Signals that the prompt answer failed validation requirements. | |
WebObjectsException |