Mobile API Reference  MicroStrategy 2019
MSIPrompt Class Reference

#import <MSIPrompt.h>

Inheritance diagram for MSIPrompt:
MSIObjectInfo <MSTRHandler> <MIIDynamicTableDataItem> ElementsPrompt ExpressionPrompt MSIConstantPrompt ObjectsPrompt UnsupportedPrompt

Instance Methods

(BOOL- validateAnswer
 
(void) - rebuildFormatter
 
(NSInteger) - validateMinMax:
 
(MSTRFormatter *) - formatter
 
(void) - addLocationAttributes:
 
(void) - buildAnswerXml:
 
(MSTRError *) - beforeBuildAnswerXml
 
(void) - buildTypeSpecificAnswerXml:
 
(id< MSTRHandler >) - getAnswerHandler
 
(void) - setErrorWithMessage:
 
- Instance Methods inherited from MSIObjectInfo
(id) - initWithType:
 
(id) - initWithType:subType:
 
(NSComparisonResult) - compareElementName:
 
(NSComparisonResult) - compareElementID:
 
(void) - handleXml:attributes:support:
 
(id< MSTRHandler >) - getXmlHandler
 
(void) - handleXmlAttributes:attributes:
 
(void) - loadFromXML:attributes:
 
(NSString *) - getXml
 
(void) - buildXml:
 
(void) - buildXml:tagName:
 
(void) - buildTypeSpecificXml:
 
(id) - initWithContents:anID:aDesc:aType:aSubtype:anAbbrev:isShortcut:iconPath:
 
(id) - initWithContents:namedID:aDesc:aType:aSubtype:anAbbrev:isShortcut:iconPath:
 
- Instance Methods inherited from <MSTRHandler>
(void) - doStartElement:namespaceURI:attributes:level:support:
 
(void) - doEndElement:namespaceURI:level:support:
 
- Instance Methods inherited from <MIIDynamicTableDataItem>
(MIDisplayStyle- getStyle
 
(NSString *) - getTitle
 
(NSString *) - getDetailedText
 
(NSString *) - getImageName
 
(void) - setDynamicTableDataItemDelegate:
 
(id< MIIDynamicTableDataItemDelegate >) - getDynamicTableDataItemDelegate
 
(MetricExpression *) - getMetricExpression
 
(double) - getMetricValueMin
 
(double) - getMetricValueMax
 
(double) - getMetricValueCount
 
(BOOL- isMetricValueSupported
 
(BOOL- isSelectorModeInclude
 
(NSArray *) - getDisplayStylesGroup
 
(void) - setDisplayStylesGroup:
 
(void) - setOrderWithIndex:
 
(Commander *) - getCommander
 
(BOOL- isExecuteImmediately
 
(void) - execute
 
(void) - prehandleMetricSelection:
 
(void) - handleMetricSelection:
 
(void) - prehandleSetPropertyWithName:propertySetName:propertyValue:
 
(void) - handleSetPropertyWithName:propertySetName:propertyValue:
 
(void) - prehandleToggleIncludeMetric:
 
(void) - handleToggleIncludeMetric:
 
(void) - prehandleDelete
 
(void) - handleDelete
 

Protected Attributes

PromptTypes promptType
 
NSString * title
 
NSString * min
 
NSString * max
 
NSString * meaning
 
BOOL required
 
NSMutableDictionary * properties
 
BOOL handlingAnswer
 
MSTRFormatter * formatter
 
BOOL hasAnswer
 
MSIPromptAnswermAnswer
 
BOOL mIsHidden
 
BOOL mIsClosed
 

Properties

MSIReportDisplayInfodocument
 
MSIPromptAnsweranswer
 
BOOL hidden
 
BOOL closed
 
- Properties inherited from MSIObjectInfo
NSString * objectID
 
NSInteger namedID
 
NSString * name
 
NSString * displayName
 
ObjectTypes type
 
NSString * sta
 
ObjectSubTypes subType
 
NSInteger accessGranted
 
NSInteger viewMedia
 
NSInteger availableViewMedia
 
NSString * desc
 
NSString * abbreviation
 
NSString * iconPath
 
NSString * owner
 
BOOL isShortcut
 
NSString * externalPath
 
NSInteger externalObjectType
 
NSDate * creationDate
 
NSDate * modificationDate
 
int binaryStatus
 
MSIObjectInfoparentFolder
 
NSString * containerId
 
NSString * containerType
 

Additional Inherited Members

- Class Methods inherited from MSIObjectInfo
(MSIObjectInfo *) + newObject:
 
(ObjectSubTypes+ subTypeFromType:
 

Detailed Description

A Prompt is used when a document needs to ask the user for answers. The two types currently supported are Element and Value (a.k.a. Constant). Object, Expression and Dimty are not yet supported.

Subclasses are responsible for the answers. Feb 2012: We will be migrating answer responsibility into the PromptAnswer class and its new subclasses.

See also
PromptHelper and
PromptUtils for more info on using Prompts.

Method Documentation

◆ addLocationAttributes:()

- (void) addLocationAttributes: (XMLBuilder *)  builder

◆ beforeBuildAnswerXml()

- (MSTRError*) beforeBuildAnswerXml

◆ buildAnswerXml:()

- (void) buildAnswerXml: (XMLBuilder *)  builder

◆ buildTypeSpecificAnswerXml:()

- (void) buildTypeSpecificAnswerXml: (XMLBuilder *)  builder

◆ formatter()

- (MSTRFormatter*) formatter

◆ getAnswerHandler()

- (id<MSTRHandler>) getAnswerHandler

getAnswerHandler is called just before a new answer is parsed from XML. Any old answer should be discarded before parsing begins. The discarding is being done within getAnswerHandler.

Returns
the Prompt object that will handle the parsing of the answer.

◆ rebuildFormatter()

- (void) rebuildFormatter

◆ setErrorWithMessage:()

- (void) setErrorWithMessage: (NSString *)  msg

◆ validateAnswer()

- (BOOL) validateAnswer

Checks that the prompt has an answer, if one is required.

Returns
YES if the prompt is not missing a required answer.

◆ validateMinMax:()

- (NSInteger) validateMinMax: (NSInteger)  count

Member Data Documentation

◆ formatter

- (MSTRFormatter*) formatter
protected

◆ handlingAnswer

- (BOOL) handlingAnswer
protected

◆ hasAnswer

- (BOOL) hasAnswer
readnonatomicassignprotected

◆ mAnswer

- (MSIPromptAnswer*) mAnswer
protected

◆ max

- (NSString *) max
readwritenonatomiccopyprotected

◆ meaning

- (NSString *) meaning
readwritenonatomiccopyprotected

◆ min

- (NSString *) min
readwritenonatomiccopyprotected

◆ mIsClosed

- (BOOL) mIsClosed
protected

◆ mIsHidden

- (BOOL) mIsHidden
protected

◆ promptType

- (PromptTypes) promptType
readwriteprotected

The type of prompt will be one of the PromptTypes enum values in Prompts.h. E.g. EnumPromptTypeElements.

See also
PromptTypes and
Prompts

◆ properties

- (NSMutableDictionary *) properties
readwritenonatomicstrongprotected

◆ required

- (BOOL) required
readwriteprotected

◆ title

- (NSString *) title
readwritenonatomiccopyprotected

Property Documentation

◆ answer

- (MSIPromptAnswer*) answer
readwritenonatomicstrong

◆ closed

- (BOOL) closed
readwritenonatomicassign

◆ document

- (MSIReportDisplayInfo*) document
readwritenonatomicweak

◆ hidden

- (BOOL) hidden
readwritenonatomicassign