Package com.microstrategy.web.objects
Interface WebPrompt
- 
- All Superinterfaces:
- EnumWebPersistableState,- KeyedObject,- Persistable,- WebDisplayUnit,- WebFeatures,- WebObjectInfo,- WebPromptSite
 - All Known Subinterfaces:
- WebConstantPrompt,- WebDimtyPrompt,- WebElementsPrompt,- WebExpressionPrompt,- WebObjectsPrompt,- WebTimePrompt
 
 public interface WebPrompt extends WebObjectInfo, Persistable 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.- Since:
- MicroStrategy Web 7.3.1 or earlier
 
- 
- 
Field Summary- 
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableStateBARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidanswerPrompt()Submits prompt answers to the I-Server.voidbuildShortAnswerXML(WebXMLBuilder builder)java.lang.StringgetAnswerXML()Returns the XML representation of prompt answer.java.lang.StringgetAnswerXML(boolean encode)Returns the XML representation of prompt answer.java.lang.StringgetAnswerXML(boolean shortFormat, boolean encode, boolean includeClosed)Returns an XML string representing the prompt answer.intgetBrowsableDataSourceFlags()Returns the XDA flagsEnumDSSXMLExternalSourceFlagsof the data source for browsing.WebDisplayHelpergetDisplayHelper()Returns a display helper object that can be used to build prompt display XML.WebDisplayHelpergetDisplayHelper(boolean populateDisplayUnits)Returns a display helper object that can be used to build prompt display XML.WebPropertiesgetDisplayProperties()Returns prompt display properties or null.intgetDSSPromptType()java.lang.StringgetKey()Returns a key to uniquely identify aWebPrompt.java.lang.StringgetMax()Returns value of prompt miximum property or null.java.lang.StringgetMeaning()Returns prompt meaning or nullbooleangetMerge()????java.lang.StringgetMessageId()java.lang.StringgetMin()Returns value of prompt minimum property or null.intgetPIN()Returns prompt's PIN assigned by the I-Server that uniquely identifies this prompt inside prompts collection.WebPromptLocationgetPrimaryLocation()intgetPromptType()Returns prompt typeintgetReuse()Returns prompt reuse mode.java.lang.StringgetShortAnswerXML()Returns the XML representation of prompt answer in the format used by the Narrowcast server.java.lang.StringgetShortAnswerXML(boolean encode)Returns the XML representation of prompt answer in the format used by the Narrowcast server.java.lang.StringgetShortPa()java.lang.StringgetShortPa(boolean includeClosed)java.lang.StringgetTitle()Returns prompt title or null.WebUserAnswersgetUserAnswers()Returns a collection of user prompt answers.int[]getXDATypes()Returns all XDA types associated with this prompt.booleanhasAnswer()A prompt contains a collections of answers (previous/default/current).booleanhasDefaultAnswer()A prompt contains a collections of answers (previous/default/current).booleanhasOriginalAnswer()Returns true if original prompt XML contained current answer, false otherwise.booleanhasPreviousAnswer()A prompt contains a collections of answers (previous/default/current).booleanisAnswerEmpty()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).booleanisCanceled()Returns true if the prompt is canceled, false otherwisebooleanisClosed()Returns true if the prompt is closed, false otherwise.booleanisRequired()Returns true if this prompt is required, false otherwisebooleanisUsed()Returns true if the prompt is used, false otherwisevoidpopulateAnswer(java.lang.String answerXML)Populate the current answer from the XML.voidresetAnswer()Resets the current answer to be either the previous answer or the default answer.voidresetToDefault()Resets the current answer to the default answer if there is onevoidsetCanceled()Sets prompt closed flag.voidsetClosed(boolean closed)Sets prompt closed flag.voidsetMax(java.lang.String max)Sets the maximum property of the prompt to the new value.voidsetMeaning(java.lang.String meaning)Sets the meaning of the prompt definition.voidsetMin(java.lang.String min)Sets the minimum property of the prompt to the new value.voidsetRequired(boolean isRequired)Sets the required flag on the prompt.voidsetReuse(int reuse)Sets the prompt reuse mode for a prompt definition.voidsetTitle(java.lang.String title)Sets the title of the prompt definition.voidvalidate()Validates whether the prompt passes the maximum and minimum limits (normally are limits on count of answers), and required validation requirements.- 
Methods inherited from interface com.microstrategy.utils.KeyedObject_getObKey
 - 
Methods inherited from interface com.microstrategy.utils.serialization.PersistablerestoreState, restoreState, saveState, saveState, saveState, saveState
 - 
Methods inherited from interface com.microstrategy.web.objects.WebDisplayUnitaddDetails, applyVisitor, canHighlight, getChildUnits, getDisplayName, getDisplayUnitType, hasDetails, highlightUnit, highlightUnit, isHighlighted, isObjectInfo, isSelected, setDisplayName, setSelected
 - 
Methods inherited from interface com.microstrategy.web.objects.WebFeaturesisFeatureAvailable, isFeatureAvailable
 - 
Methods inherited from interface com.microstrategy.web.objects.WebObjectInfobuildShortObjectAttributes, buildShortXML, getAbbreviation, getAccessGranted, getAncestors, getCardStatus, getCertifiedInfo, getComments, getContainerDid, getContainerType, getCreationTime, getCreationTimeStamp, getDataSources, getDescription, getExtendedType, getFactory, getFlags, getIconPath, getID, getModificationTime, getModificationTimeStamp, getName, getNonSchedulable, getOtherNameTransCount, getOwner, getParent, getPreSaveAsFlags, getProjectId, getProjectName, getPropertyFlags, getPropertySetFilter, getPropertySets, getRecommendationInfo, getSecurity, getState, getSubType, getType, getVersionID, getViewMediaSettings, getVisualizationViewMode, getXML, getXML, hasOwner, isAncestorNamedFolder, isDirty, isEmbedded, isHidden, isNew, isPopulated, populate, populate, setAbbreviation, setComments, setDataSources, setDescription, setExtendedType, setFlags, setHidden, setIconPath, setName, setNonSchedulable, setPreSaveAsFlags, setPropertyFlags
 - 
Methods inherited from interface com.microstrategy.web.objects.WebPromptSitegetPromptInstances
 
- 
 
- 
- 
- 
Method Detail- 
getPromptTypeint getPromptType() Returns prompt type- Returns:
- prompt type
- See Also:
- EnumWebPromptType
 
 - 
getPINint getPIN() Returns prompt's PIN assigned by the I-Server that uniquely identifies this prompt inside prompts collection.- Returns:
- prompt's PIN assigned by the I-Server.
 
 - 
getTitlejava.lang.String getTitle() Returns prompt title or null.- Returns:
- prompt title or null
 
 - 
setTitlevoid setTitle(java.lang.String title) Sets the title of the prompt definition.- Parameters:
- title- The new title for the prompt definition.
- Since:
- MicroStrategy Web 9.0.0
 
 - 
getMeaningjava.lang.String getMeaning() Returns prompt meaning or null- Returns:
- prompt meaning or null
 
 - 
setMeaningvoid setMeaning(java.lang.String meaning) Sets the meaning of the prompt definition.- Parameters:
- meaning- The new value for the meaning property.
- Since:
- MicroStrategy Web 9.0.0
 
 - 
isUsedboolean isUsed() Returns true if the prompt is used, false otherwise- Returns:
- true if the prompt is used, false otherwise
 
 - 
isClosedboolean isClosed() 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 the prompt is closed, false otherwise
- See Also:
- answerPrompt()
 
 - 
setClosedvoid setClosed(boolean closed) Sets prompt closed flag. If this flag set to true the prompt answer will not be sent to I-Server.- Parameters:
- closed- the closed flag value
- See Also:
- answerPrompt()
 
 - 
isCanceledboolean isCanceled() Returns true if the prompt is canceled, false otherwise- Returns:
- true if the prompt is canceled, false otherwise
- See Also:
- answerPrompt()
 
 - 
setCanceledvoid setCanceled() 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- See Also:
- answerPrompt()
 
 - 
isRequiredboolean isRequired() Returns true if this prompt is required, false otherwise- Returns:
- true if the prompt is required, false otherwise
 
 - 
setRequiredvoid setRequired(boolean isRequired) Sets the required flag on the prompt. This is only a meaningful thing to do for a prompt definition, not a prompt question.- Parameters:
- isRequired- The new value for the isRequired flag.
- Since:
- MicroStrategy Web 9.0.0
 
 - 
getReuseint getReuse() Returns prompt reuse mode. This will be a value fromEnumDSSXMLPromptReuse.- Returns:
- prompt reuse mode, from EnumDSSXMLPromptReuse
 
 - 
setReusevoid setReuse(int reuse) Sets the prompt reuse mode for a prompt definition. This should be a value fromEnumDSSXMLPromptReuse.- Parameters:
- reuse- The new value to use for the reuse mode of the prompt, from- EnumDSSXMLPromptReuse.
- Since:
- MicroStrategy Web 9.0.0
 
 - 
getMergeboolean getMerge() ????
 - 
getMinjava.lang.String getMin() Returns value of prompt minimum property or null. This value is used to validate prompt answers.- Returns:
- value of prompt minimum property or null.
 
 - 
setMinvoid setMin(java.lang.String min) 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.- Parameters:
- min- The new minimum value, or null to remove the minimum restriction.
- Since:
- MicroStrategy Web 9.0.0
 
 - 
getMaxjava.lang.String getMax() Returns value of prompt miximum property or null. This value is used to validate prompt answers.- Returns:
- value of prompt miximum property or null.
 
 - 
setMaxvoid setMax(java.lang.String max) 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.- Parameters:
- max- The new maximum value, or null to remove the maximum restriction.
- Since:
- MicroStrategy Web 9.0.0
 
 - 
getDisplayPropertiesWebProperties getDisplayProperties() 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:
- value of prompt display properties or null.
 
 - 
hasOriginalAnswerboolean hasOriginalAnswer() Returns true if original prompt XML contained current answer, false otherwise.- Returns:
- true if original prompt XML contained current answer, false otherwise.
 
 - 
hasAnswerboolean hasAnswer() 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.- Returns:
- true if if the prompt has current answer and it is not null. Note: If the answer has an empty collection of answers, this method would return true.
- See Also:
- hasPreviousAnswer(),- hasDefaultAnswer()
 
 - 
hasDefaultAnswerboolean hasDefaultAnswer() 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 the prompt has default answer, false otherwise.
- See Also:
- hasAnswer(),- hasPreviousAnswer()
 
 - 
hasPreviousAnswerboolean hasPreviousAnswer() 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.- Returns:
- true if the prompt has previous answer, false otherwise.
- See Also:
- hasAnswer()
 
 - 
validatevoid validate() throws WebObjectsExceptionValidates 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 callinganswerPrompt(). 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.- Throws:
- WebAPIHelperException- Signals that the prompt answer failed validation requirements.
- WebObjectsException
 
 - 
getAnswerXMLjava.lang.String getAnswerXML() 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.
 
 - 
getAnswerXMLjava.lang.String getAnswerXML(boolean encode) Returns the XML representation of prompt answer. If theencodeparameter is true the reurned string will be HTML encodded.- Parameters:
- encode- a flag indicating that the XML must be HTM encoded
- Returns:
- the XML representation of prompt answer.
 
 - 
getShortAnswerXMLjava.lang.String getShortAnswerXML() 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:
- the XML representation of prompt answer in the format used by the Narrowcast server.
 
 - 
getShortAnswerXMLjava.lang.String getShortAnswerXML(boolean encode) Returns the XML representation of prompt answer in the format used by the Narrowcast server. If theencodeparameter is true the reurned string will be HTML encodded.- Parameters:
- 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.
 
 - 
populateAnswervoid populateAnswer(java.lang.String answerXML) throws WebObjectsExceptionPopulate the current answer from the XML. This method takes both standard and short answer formats. If theanswerXMLparameter is null and the prompt has the current answer it will be removed.- Parameters:
- answerXML- the answer XML.
- Throws:
- WebObjectsException
 
 - 
getDisplayHelperWebDisplayHelper getDisplayHelper() throws WebObjectsException Returns a display helper object that can be used to build prompt display XML.- Returns:
- a display helper object that can be used to build prompt display XML.
- Throws:
- WebObjectsException
 
 - 
answerPromptvoid answerPrompt() throws WebObjectsExceptionSubmits 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. - Throws:
- WebObjectsException- if there were some problems submitting answers to the I-Server.
 
 - 
resetAnswervoid resetAnswer() throws WebObjectsExceptionResets 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.- Throws:
- WebObjectsException
- Since:
- MicroStrategy Web 7.5.1
 
 - 
resetToDefaultvoid resetToDefault() throws WebObjectsExceptionResets the current answer to the default answer if there is one- Throws:
- WebObjectsException
 
 - 
getDisplayHelperWebDisplayHelper getDisplayHelper(boolean populateDisplayUnits) throws WebObjectsException Returns a display helper object that can be used to build prompt display XML.- Parameters:
- populateDisplayUnits- suggests that the suggested answers must be populated
- Returns:
- a display helper object that can be used to build prompt display XML.
- Throws:
- WebObjectsException
 
 - 
getXDATypesint[] getXDATypes() 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.- Returns:
- An int array of XDA types, from EnumDSSXMLXDAType, or null if this is not an XDA prompt.
- Since:
- MicroStrategy Web 8.0.0
 
 - 
getBrowsableDataSourceFlagsint getBrowsableDataSourceFlags() Returns the XDA flagsEnumDSSXMLExternalSourceFlagsof the data source for browsing. GUI can use this flag to determine the functionalities supported by this data source (for example, element search).- Returns:
- the XDA flags EnumDSSXMLExternalSourceFlagsof the data source for browsing for this prompt. Default value isEnumDSSXMLExternalSourceFlags.DssXmlExternalSourceNone.
 
 - 
getKeyjava.lang.String getKey() Returns a key to uniquely identify aWebPrompt. The key never changes in the duration of running a report or document, while thepincould change if there are embedded prompt emerging out.- Returns:
- a key to uniquely identify a WebPrompt.
- Since:
- MicroStrategy Web 8.0.1
 
 - 
getAnswerXMLjava.lang.String getAnswerXML(boolean shortFormat, boolean encode, boolean includeClosed)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.- Parameters:
- 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:
- an XML string representing the prompt answers.
- Since:
- MicroStrategy Web 8.0.2
 
 - 
getUserAnswersWebUserAnswers getUserAnswers() 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:
- a collection of user prompt answers.
- Since:
- MicroStrategy Web 9.0.0
 
 - 
isAnswerEmptyboolean 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).- Returns:
- true.
 
 - 
getPrimaryLocationWebPromptLocation getPrimaryLocation() 
 - 
getDSSPromptTypeint getDSSPromptType() 
 - 
buildShortAnswerXMLvoid buildShortAnswerXML(WebXMLBuilder builder) 
 - 
getShortPajava.lang.String getShortPa() 
 - 
getShortPajava.lang.String getShortPa(boolean includeClosed) 
 - 
getMessageIdjava.lang.String getMessageId() 
 
- 
 
-