com.businessobjects.rebean.wi
Interface Prompt


public interface Prompt

The Prompt interface provides access to the properties and functionalities of the prompt mechanism.

Depending on the properties of the prompt, values can be entered from a list of values, or manually, or both. Some prompts can have more than one value, and some prompts can be nested.

Prompts must be answered (filled) every time the query is executed with DataProvider.runQuery; when the document is refreshed with DocumentInstance.refresh.

See Also:
PromptType, Prompts, Lov, Values

Method Summary
 void enterValues(java.lang.String[] values)
          Enters values for the prompt.
 void enterValues(ValueFromLov[] values)
          Enters a ValueFromLov for the Prompt.
 java.lang.String[] getCurrentValues()
          Gets the current values entered for the prompt.
 ValueFromLov[] getCurrentValuesFromLov()
          Gets the current ValueFromLov entered for the Prompt.
 DataProvider[] getDataProviders()
          Returns an array containing the data provider(s) attached to this prompt.
 java.lang.String[] getDefaultValues()
          Gets the default values for the prompt.
 ValueFromLov[] getDefaultValuesFromLov()
          Gets the default ValueFromLov for the Prompt.
 java.lang.String getID()
          Returns an identifier independent from the Preferred Viewing Locale.
 java.lang.String getInputFormat()
          Returns the input format for the prompt.
 Lov getLOV()
          Gets the list of values associated with the prompt.
 java.lang.String getName()
          Gets the name of the prompt.
 ObjectType getObjectType()
          Gets the type of values the prompt takes.
 java.lang.String[] getPreviousValues()
          Gets the previous values for the prompt.
 ValueFromLov[] getPreviousValuesFromLov()
          Gets the previous ValueFromLov for the Prompt.
 PromptType getType()
          Gets the prompt type.
 boolean hasLOV()
          Checks if this prompt has an associated list of values.
 boolean isConstrained()
          Checks if the user must answer a prompt with a value from a list of values.
 boolean isOptional()
          Checks if entering a value for this Prompt is optional or not.
 boolean isRowIndexed()
          Returns true if the Lov associated to the Prompt is indexed.
 void removeValues(java.lang.String[] values)
          Removes values that have been entered for the prompt.
 void removeValuesFromLov(ValueFromLov[] value)
          Removes ValueFromLov objects that have been entered for the Prompt.
 boolean requireAnswer()
          Checks if the prompt requires an answer.
 

Method Detail

requireAnswer

boolean requireAnswer()
Checks if the prompt requires an answer. Use this method to test if you have already entered a value for this prompt.

Returns false, if the prompt is optional.

Returns:
true, if a user answer is required; false otherwise

isConstrained

boolean isConstrained()
Checks if the user must answer a prompt with a value from a list of values. This property is set when the prompt is defined.

Returns:
true if the user must answer a prompt using a list of values; false otherwise

getObjectType

ObjectType getObjectType()
Gets the type of values the prompt takes.

Returns:
an ObjectType object representing the type of values the prompt can take
See Also:
ObjectType

hasLOV

boolean hasLOV()
Checks if this prompt has an associated list of values.

Returns:
true if the prompt has a list of value; false otherwise
See Also:
Prompt.getLOV(), Lov

getName

java.lang.String getName()
Gets the name of the prompt.

The name of the prompt is the string entered as the question for the user, for example, "Enter the year".

Returns:
the name of the prompt

getType

PromptType getType()
Gets the prompt type.

Returns:
a PromptType object representing the type of the prompt
See Also:
PromptType

getInputFormat

java.lang.String getInputFormat()
Returns the input format for the prompt.

Unless this is a date prompt, this method always returns "" if ReportEngine.getCanEditDocument() returns false. That is to say, the ReportEngine instance used to open this DataProvider was opened to run Desktop Intelligence documents.

Returns:
the input format

getDefaultValues

java.lang.String[] getDefaultValues()
Gets the default values for the prompt. You can use this method to pre-select or highlight particular values for the prompt.

Returns:
An array containing the default values for the prompt Values.isDefault(int).

getPreviousValues

java.lang.String[] getPreviousValues()
Gets the previous values for the prompt.

Returns:
an array containing the previous values for the prompt

getCurrentValues

java.lang.String[] getCurrentValues()
Gets the current values entered for the prompt.

Returns:
an array containing the current values for the prompt

enterValues

void enterValues(java.lang.String[] values)
Enters values for the prompt. If the prompt is constrained you must use values from the list of values to create the values parameter.

Parameters:
values - an array containing the values to be entered for the prompt
See Also:
Lov

removeValues

void removeValues(java.lang.String[] values)
Removes values that have been entered for the prompt.

Parameters:
values - an array containing the values to be removed from the prompt

getLOV

Lov getLOV()
Gets the list of values associated with the prompt.

Returns:
the list of values associated with the prompt
See Also:
Prompt.hasLOV(), Lov

getDataProviders

DataProvider[] getDataProviders()
Returns an array containing the data provider(s) attached to this prompt. This method will return an empty array if ReportEngine.getCanEditDocument() returns false. That is to say, the ReportEngine instance was opened to run Desktop Intelligence documents.

Since:
6.5.0
See Also:
DataProvider

enterValues

void enterValues(ValueFromLov[] values)
Enters a ValueFromLov for the Prompt.

If the Prompt is constrained, use values from the list of values to create the values parameter.

Parameters:
values - an array containing the values to be entered for the prompt
Since:
11.5
See Also:
Lov

getCurrentValuesFromLov

ValueFromLov[] getCurrentValuesFromLov()
Gets the current ValueFromLov entered for the Prompt.

Returns:
An array containing the current ValueFromLov for the Prompt.
Since:
11.5

getDefaultValuesFromLov

ValueFromLov[] getDefaultValuesFromLov()
Gets the default ValueFromLov for the Prompt.

Use this method to pre-select or highlight particular values in the Prompt.

Returns:
An array containing default ValueFromLov for the Prompt. Values.isDefault(int).
Since:
11.5

getPreviousValuesFromLov

ValueFromLov[] getPreviousValuesFromLov()
Gets the previous ValueFromLov for the Prompt.

Returns:
An array containing the previous ValueFromLov for the Prompt.
Since:
11.5

removeValuesFromLov

void removeValuesFromLov(ValueFromLov[] value)
Removes ValueFromLov objects that have been entered for the Prompt.

Parameters:
value - An array containing the ValueFromLov to be removed from a Prompt.
Since:
11.5

isRowIndexed

boolean isRowIndexed()
Returns true if the Lov associated to the Prompt is indexed.

Returns:
true if values are indexed or false if they are not.
Since:
11.5
See Also:
Lov

isOptional

boolean isOptional()
Checks if entering a value for this Prompt is optional or not.

Returns:
true if entering value is optional, otherwise false.
Since:
12.0

getID

java.lang.String getID()
Returns an identifier independent from the Preferred Viewing Locale.

Returns:
the prompt identifier
Since:
12.0