Package com.microstrategy.web.beans
Interface PromptDefinitionBean
-
- All Superinterfaces:
EditableBean
,EditableObjectBean
,EnumWebPersistableState
,ObjectBean
,Persistable
,RequestPersistable
,Transformable
,WebBean
,WebComponent
public interface PromptDefinitionBean extends EditableObjectBean
The PromptDefinitionBean is a bean which represents a prompt definition object in metadata. This interface contains methods that will allow the user to load, manipulate, and save prompt objects in metadata, and eventually, as embedded objects.- Since:
- MicroStrategy Web 9.0.0
-
-
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 PromptBean
getAvailableListPromptBean()
Returns aPromptBean
that can be used to display and modify the available list of a prompt.int
getConstantPromptDataType()
Returns the datatype for a constant prompt.PromptBean
getDefaultAnswerPromptBean()
Returns aPromptBean
that can be used to display and modify the default answer of prompt.int
getExpressionPromptExpressionType()
Returns the expression type for the expression prompt.int
getPromptType()
Returns the current prompt type, fromEnumWebPromptType
.WebPrompt
getWebPrompt()
Returns the WebPrompt object that is associated with the PromptDefinitionBean.void
setConstantPromptDataType(int dataType)
Sets the datatype for a constant prompt.void
setExpressionPromptExpressionType(int dataType)
Sets the expression type for a expression prompt.void
setPromptType(int promptType)
Sets the type of prompt that the bean refers to.-
Methods inherited from interface com.microstrategy.web.beans.EditableBean
delete, duplicate, InitAsNew, refresh, save
-
Methods inherited from interface com.microstrategy.web.beans.EditableObjectBean
getFolderId, isNew, saveAs, setFolderId, setIsNew
-
Methods inherited from interface com.microstrategy.web.beans.ObjectBean
getBlockBegin, getBlockCount, getDisplayName, getFlags, getLevel, getObjectID, getObjectInfo, getObjectName, getObjectType, getParentFolderBean, getParentFolderBean, getParentID, setBlockBegin, setBlockCount, setFlags, setLevel, setObjectID, setObjectInfo, setObjectName, setObjectType
-
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
-
getWebPrompt
WebPrompt getWebPrompt() throws WebBeanException
Returns the WebPrompt object that is associated with the PromptDefinitionBean.- Returns:
- a
WebPrompt
object corresponding to the definition of the prompt. - Throws:
WebBeanException
-
getPromptType
int getPromptType()
Returns the current prompt type, fromEnumWebPromptType
.- Returns:
- The current prompt type of the WebPrompt object, a value from
EnumWebPromptType
.
-
setPromptType
void setPromptType(int promptType)
Sets the type of prompt that the bean refers to. If the prompt type changes, generally whatever state has been built up so far will be discarded, similar to calling setObjectID. After calling this method, you should generally call collectData to update the bean.- Parameters:
promptType
- The type of prompt that this bean will represent, fromEnumWebPromptType
.
-
setConstantPromptDataType
void setConstantPromptDataType(int dataType)
Sets the datatype for a constant prompt.- Parameters:
dataType
- A value fromEnumDSSXMLDataType
, representing the datatype of the prompt.
-
getConstantPromptDataType
int getConstantPromptDataType()
Returns the datatype for a constant prompt.- Returns:
- The currently set datatype for the constant prompt, from
EnumDSSXMLDataType
.
-
setExpressionPromptExpressionType
void setExpressionPromptExpressionType(int dataType)
Sets the expression type for a expression prompt.- Parameters:
dataType
- A value fromEnumDSSXMLExpressionType
, representing the expressiontype of the prompt. The currently supported values areEnumDSSXMLExpressionType.DssXmlFilterAttributeIDQual
- Attribute Qualification PromptEnumDSSXMLExpressionType.DssXmlFilterSingleMetricQual
- Metric Qualification PromptEnumDSSXMLExpressionType.DssXmlFilterAllAttributeQual
- Hierarchy Qualification Prompt
-
getExpressionPromptExpressionType
int getExpressionPromptExpressionType()
Returns the expression type for the expression prompt.- Returns:
- The currently set expression type for the expression prompt, from
EnumDSSXMLExpressionType
.
-
getDefaultAnswerPromptBean
PromptBean getDefaultAnswerPromptBean() throws WebBeanException
Returns aPromptBean
that can be used to display and modify the default answer of prompt. This PromptBean will expose the default answer on its getAnswer method, so that the bean can be used by any code which normally deals with regular answers to provide default answers as well.- Returns:
- A
PromptBean
tied to the default answer. - Throws:
WebBeanException
-
getAvailableListPromptBean
PromptBean getAvailableListPromptBean() throws WebBeanException
Returns aPromptBean
that can be used to display and modify the available list of a prompt. Note that this will only work for certain types of prompts - in particular, elements prompt is currently the only type supported, since the other types are fairly different in their semantics from the standard answer case. This PromptBean will expose the available list as the "answer" of the bean, and will modify the available list exposed by the bean appropriately in order to ensure that code which renders the regular answer can also render the available list with minimal changes.- Returns:
- A
PromptBean
tied to the available list. - Throws:
WebBeanException
-
-