Package com.microstrategy.web.beans
Interface PromptObject
-
- All Superinterfaces:
EnumWebPersistableState
,Persistable
,RequestPersistable
,Transformable
,WebBean
,WebComponent
- All Known Subinterfaces:
ConstantPromptBean
,DimtyPromptBean
,ElementPromptBean
,ExpressionPromptBean
,ObjectPromptBean
,PromptBean
public interface PromptObject extends WebBean
This interface represents information about a single prompt. It manages its position property and a WebPrompt object.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
-
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableState
BARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebDisplayHelper
getDisplayHelper()
Returns the cachedWebDisplayHelper
object from the current PromptObject.HighlightedObjects
getHighlightedObjects()
Returns a collection of highlighted objects.java.lang.String
getOriginalSearchRoot()
Returns original search root or empty string.int
getPromptPosition()
Returns the position of this PromptObject in the collection of prompt objects in aPromptsBean
.PromptsBean
getPromptsBean()
Returns thePromptsBean
which contains this prompt object.PromptsSource
getPromptsSource()
Returns thePromptsSource
object from which this prompt object is originated.java.lang.String
getUserSearchPattern()
Returns the user search pattern on a PromptObject.WebBeanError
getValidationInfo()
Returns the prompt answer validation error information for this particular prompt only.WebPrompt
getWebPrompt()
Returns the embeddedWebPrompt
object.boolean
hasAnswerChanged()
Returnstrue
if the prompt answer has been changed since it is loaded from the Intelligence Server.void
setAnswerChanged(boolean changed)
Sets a boolean value indicating that the prompt answer has been changed for the underlying prompt.void
setUserSearchPattern(java.lang.String pattern)
Sets the user search pattern on a PromptObject.void
setValidationInfo(WebBeanError wbe)
Sets a prompt answer validation error on this prompt object.-
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState, saveState, saveState, saveState, saveState
-
Methods inherited from interface com.microstrategy.web.beans.RequestPersistable
restoreStateFromRequest, restoreStateFromRequest
-
Methods inherited from interface com.microstrategy.web.beans.Transformable
addTransform, addTransformByClass, addTransformByStyle, addTransformByStyle, clearTransforms, getBeanContext, getMessageString, getMyTransformInstances, getTransformInstance, getTransformInstance, getTransformInstances, getType, hasTransform, hasTransform, invalidateTransformCache, setBeanContext, transform, transform
-
Methods inherited from interface com.microstrategy.web.beans.WebBean
getDocument, getErrorInfo, getSessionInfo, isStale, setSessionInfo, setStale
-
Methods inherited from interface com.microstrategy.web.beans.WebComponent
addChild, addChildStateInfo, addChildStateInfo, collectData, collectMinimalData, generateOutput, getBeanContext, getChild, getChild, getChildByClass, getChildByType, getChildCount, getChildrenByClass, getDefaultStateLevel, getFeaturesManager, getMaximumStateLevel, getName, getOutputFormat, getParent, getPath, getPersistMode, getRenderingFilter, getRoot, getTargetBean, getTargetBeanPath, getWebEvent, getWebEvent, getWebEventHandler, getXMLStatus, handleRequest, hasChanged, hasJustOpened, initBean, invalidateChildrenState, isBeanContextEmpty, isFeatureAvailable, prepareForReuse, removeChild, removeChild, searchChild, setBeanContext, setBeanContext, setChanged, setChanged, setDefaultStateLevel, setFeaturesManager, setName, setOutputFormat, setParent, setPersistMode, setRenderingFilter, setTargetBean, setTargetBeanPath, setWebEventHandler
-
-
-
-
Method Detail
-
getPromptPosition
int getPromptPosition()
Returns the position of this PromptObject in the collection of prompt objects in aPromptsBean
.- Returns:
- the position of this object in a PromptsBean.
-
getWebPrompt
WebPrompt getWebPrompt()
Returns the embeddedWebPrompt
object.- Returns:
- the
WebPrompt
object associated with this object.
-
getPromptsSource
PromptsSource getPromptsSource()
Returns thePromptsSource
object from which this prompt object is originated.- Returns:
- a
PromptsSource
object.
-
getDisplayHelper
WebDisplayHelper getDisplayHelper() throws WebObjectsException
Returns the cachedWebDisplayHelper
object from the current PromptObject. If the cached one is null, then return a new one from the underlyingWebPrompt
.The cached
WebDisplayHelper
is typically set by the prompt event handler.- Returns:
- the
WebDisplayHelper
object - Throws:
WebObjectsException
- thrown if theWebDisplayHelper
is unable to retrieved.
-
getPromptsBean
PromptsBean getPromptsBean()
Returns thePromptsBean
which contains this prompt object.- Returns:
- the
PromptsBean
.
-
getValidationInfo
WebBeanError getValidationInfo()
Returns the prompt answer validation error information for this particular prompt only.- Returns:
- the prompt answer validation error. null if there is no error.
-
setValidationInfo
void setValidationInfo(WebBeanError wbe)
Sets a prompt answer validation error on this prompt object. Prompt event handler calls this method to pass validation error info to th caller.- Parameters:
wbe
- the prompt answer validation error.
-
getHighlightedObjects
HighlightedObjects getHighlightedObjects()
Returns a collection of highlighted objects.PromptsBean
queries this collection and then tries to highlight each element in the collection in itscollectData
method.- Returns:
- a collection of
HighlightedObject
.
-
getUserSearchPattern
java.lang.String getUserSearchPattern()
Returns the user search pattern on a PromptObject. A search pattern is what a user types in a search box on a Web browser to perform a search. ExceptWebConstantPrompt
, other types ofWebPrompt
all provide the search ability to search for aWebObjectInfo
orWebElement
.- Returns:
- the most recent user search pattern
- Since:
- MicroStrategy Web 7.5.0
-
setUserSearchPattern
void setUserSearchPattern(java.lang.String pattern)
Sets the user search pattern on a PromptObject. A search pattern is what a user types in a search box on a Web browser to perform a search. ExceptWebConstantPrompt
, other types ofWebPrompt
all provide the search ability to search for aWebObjectInfo
orWebElement
.- Parameters:
pattern
- the new user search pattern a user types in- Since:
- MicroStrategy Web 7.5.0
-
getOriginalSearchRoot
java.lang.String getOriginalSearchRoot()
Returns original search root or empty string.- Returns:
- original search root or empty string.
- Since:
- MicroStrategy Web 7.5.1
-
hasAnswerChanged
boolean hasAnswerChanged()
Returnstrue
if the prompt answer has been changed since it is loaded from the Intelligence Server. Answering a prompt should reset this flag tofalse
.PromptsEventHandler
uses this method to decide whether to open a closed prompt.- Returns:
true
if the prompt answer has been changed since it is loaded from the Intelligence Server.- Since:
- MicroStrategy Web 7.5.4
-
setAnswerChanged
void setAnswerChanged(boolean changed)
Sets a boolean value indicating that the prompt answer has been changed for the underlying prompt. After answering a prompt, users should reset this flag tofalse
.PromptsEventHandler
uses this method to decide whether to open a closed prompt.- Parameters:
changed
-true
if the prompt answer has been changed for the underlying prompt.- Since:
- MicroStrategy Web 7.5.4
-
-