public interface

PromptsBean

implements WebBean
com.microstrategy.web.beans.PromptsBean

Class Overview

This interface acts as a controller to orchestrate the collection and assembly of prompt questions. There are two different modes of operation:

  • Traditional Report-centric Mode: An application selects a report to execute. If it contains prompts that need to be answered, the Prompts Bean is responsible for managing those questions.
  • Prompts-centric Mode: An application creates a Prompts Bean object and supplies some number of prompt sources.
An instance of the PromptsBean can be retrieved from the ReportBean, DocumentBean, RWBean, SubscriptionBean, ScheduleBean

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.utils.serialization.EnumWebPersistableState
Public Methods
abstract PromptsSource addPromptsSource(int promptSourceType)
Creates and adds a new PromptsSource object to this bean.
abstract int getCount(int typeOfPrompt)
Returns the count of prompts of a specific type from all the sources.
abstract int getCurrentPromptPosition()
Returns the position of the current prompt object the caller is working on.
abstract int getNextPromptPosition(int type)
Returns the position of the prompt object of the specified type, next to the current prompt.
abstract int getNextPromptPosition(int type, int startPos)
Returns the position of the prompt object of the specified type, next to the startPos.
abstract int getNextPromptPosition()
Returns the position of the next prompt object of the same type as the current prompt, starting search from the current prompt.
abstract int getPreviousPromptPosition(int type)
Returns the position of the prompt object of the specified type, previous to the current prompt.
abstract int getPreviousPromptPosition()
Returns the position of the previous prompt object of the same type as the current prompt, starting search from the current prompt.
abstract int getPreviousPromptPosition(int type, int startPos)
Returns the position of the prompt object of the specified type, previous to the startPos.
abstract PromptBean getPromptBean(int position)
Returns the PromptBean at the specific position.
abstract PromptBean getPromptBean()
Returns the PromptBean at the current position.
abstract Iterator<PromptBean> getPromptBeans(int typeOfPrompt)
Returns a read-only java.util.Iterator over all the contained PromptBean, each of which has the specified type.
abstract PromptObject getPromptObject(int position)
Returns the PromptObject at a specific position.
abstract PromptObject getPromptObject()
Returns the PromptObject at the current position.
abstract Iterator getPromptObjects(int typeOfPrompt)
Returns a read-only java.util.Iterator over all the contained PromptObject, each of which has the specified type.
abstract WebPrompts getPrompts()
Returns prompts
abstract Iterator getPromptsSources()
Returns an java.util.Iterator over all the PromptsSource contained within this bean.
abstract void setCurrentPromptPosition(int position)
Sets the prompt object at a new position as the current working prompt object.
[Expand]
Inherited Methods
From interface com.microstrategy.utils.serialization.Persistable
From interface com.microstrategy.web.beans.RequestPersistable
From interface com.microstrategy.web.beans.Transformable
From interface com.microstrategy.web.beans.WebBean
From interface com.microstrategy.web.beans.WebComponent

Public Methods

public abstract PromptsSource addPromptsSource (int promptSourceType)

Creates and adds a new PromptsSource object to this bean.

Parameters
promptSourceType a flag from EnumPromptsSourceTypes indicating the source type.
Returns
  • an instantiated PromptsSource.
Throws
UnsupportedOperationException thrown if the prompts source collection is read-only.

public abstract int getCount (int typeOfPrompt)

Returns the count of prompts of a specific type from all the sources. The type could be a combination of two or more types.

Parameters
typeOfPrompt a bitwise flag from EnumPromptsBeanTypes.
Returns
  • the total count of prompts of the specified type from this PromptsBean.
Throws
WebBeanException thrown if the count is unable to obtain.

public abstract int getCurrentPromptPosition ()

Returns the position of the current prompt object the caller is working on.

Returns
  • The position of the current prompt.

public abstract int getNextPromptPosition (int type)

Returns the position of the prompt object of the specified type, next to the current prompt. Returns -1 if it is not found.

Parameters
type a flag from EnumPromptsBeanTypes.
Returns
  • the position of the next prompt object of the specified type.
Throws
WebBeanException thrown if error occurs when loading prompts

public abstract int getNextPromptPosition (int type, int startPos)

Returns the position of the prompt object of the specified type, next to the startPos. Returns -1 if it is not found.

Parameters
type a flag from EnumPromptsBeanTypes.
startPos the starting position to search.
Returns
  • the position of the next prompt object of the specified type.
Throws
IndexOutOfBoundsException thrown if startPos is out of range.
WebBeanException thrown if error occurs when loading prompts

public abstract int getNextPromptPosition ()

Returns the position of the next prompt object of the same type as the current prompt, starting search from the current prompt. Returns -1 if it is not found.

Returns
  • the position of the next prompt object of the specified type.
Throws
WebBeanException thrown if error occurs when loading prompts

public abstract int getPreviousPromptPosition (int type)

Returns the position of the prompt object of the specified type, previous to the current prompt. Returns -1 if it is not found.

Parameters
type a flag from EnumPromptsBeanTypes.
Returns
  • the position of the previous prompt object of the specified type.
Throws
WebBeanException thrown if error occurs when loading prompts

public abstract int getPreviousPromptPosition ()

Returns the position of the previous prompt object of the same type as the current prompt, starting search from the current prompt. Returns -1 if it is not found.

Returns
  • the position of the previous prompt object of the specified type.
Throws
WebBeanException thrown if error occurs when loading prompts

public abstract int getPreviousPromptPosition (int type, int startPos)

Returns the position of the prompt object of the specified type, previous to the startPos. Returns -1 if it is not found.

Parameters
type a flag from EnumPromptsBeanTypes.
startPos the starting position to search.
Returns
  • the position of the previous prompt object of the specified type.
Throws
IndexOutOfBoundsException thrown if startPos is out of range.
WebBeanException thrown if error occurs when loading prompts

public abstract PromptBean getPromptBean (int position)

Returns the PromptBean at the specific position.

Parameters
position the position of a PromptObject.
Returns
  • the PromptBean at the specified position.
Throws
WebBeanException thrown if error occurs when loading prompts

public abstract PromptBean getPromptBean ()

Returns the PromptBean at the current position.

Returns
  • the current PromptBean.
Throws
WebBeanException thrown if error occurs when loading prompts

public abstract Iterator<PromptBean> getPromptBeans (int typeOfPrompt)

Returns a read-only java.util.Iterator over all the contained PromptBean, each of which has the specified type.

Parameters
typeOfPrompt a flag from EnumPromptsBeanTypes.
Returns
  • an java.util.Iterator over all the PromptBean with the specified type.
Throws
WebBeanException thrown if error occurs when loading prompts

public abstract PromptObject getPromptObject (int position)

Returns the PromptObject at a specific position.

Parameters
position the position of a PromptObject.
Returns
  • the PromptObject at the specified position.
Throws
WebBeanException thrown if error occurs when loading prompts

public abstract PromptObject getPromptObject ()

Returns the PromptObject at the current position.

Returns
  • the current PromptObject.
Throws
WebBeanException thrown if error occurs when loading prompts

public abstract Iterator getPromptObjects (int typeOfPrompt)

Returns a read-only java.util.Iterator over all the contained PromptObject, each of which has the specified type.

Parameters
typeOfPrompt a flag from EnumPromptsBeanTypes.
Returns
  • an java.util.Iterator over all the PromptObject with the specified type.
Throws
WebBeanException thrown if error occurs when loading prompts

public abstract WebPrompts getPrompts ()

Returns prompts

public abstract Iterator getPromptsSources ()

Returns an java.util.Iterator over all the PromptsSource contained within this bean.

Returns
  • an iterator over all the PromptsSource.

public abstract void setCurrentPromptPosition (int position)

Sets the prompt object at a new position as the current working prompt object.

Parameters
position a new position in this PromptsBean.
Throws
IndexOutOfBoundsException thrown if the position is out of range.
WebBeanException thrown if error occurs when loading prompts