com.businessobjects.rebean.wi
Interface Context


public interface Context

The Context interface provides access to the properties and functionalities of the universe context.

See Also:
DocumentInstance.getContextPrompts(), DocumentInstance.getMustFillContexts(), DocumentInstance.setContexts()

Method Summary
 void enterValues(java.lang.String[] values)
          Enter Context values.
 java.lang.String[] getAllValues()
          Get all possible context values.
 java.lang.String[] getCurrentValues()
          Returns the current context values.
 DataProvider[] getDataProviders()
          Returns an array containing the data provider(s) attached to this context.
 java.lang.String getDescription(int index)
          Returns the description of specified value.
 java.lang.String[] getDescriptions()
          Returns an array of strings containing the descriptions of context values.
 java.lang.String[] getPreviousValues()
          Returns the previous context values.
 PromptType getType()
          Returns the context type.
 boolean requireAnswer()
          Checks if this context needs to be answered.
 

Method Detail

getPreviousValues

java.lang.String[] getPreviousValues()
Returns the previous context values.

Returns:
the list of previous context values.

getCurrentValues

java.lang.String[] getCurrentValues()
Returns the current context values.

Note: if Context.enterValues(String[]) isn't called yet, it returns the same values as Context.getPreviousValues(). The current context values is cleared by DataProvider.clearContexts() or DataProviders.clearContexts().

Returns:
the list of current context values.

getAllValues

java.lang.String[] getAllValues()
Get all possible context values. Each Context value has an associated description. The values returned using Context.getAllValues() are synchronized with the descriptions returned using Context.getDescriptions().

Returns:
An array of strings containing all values associated to this Context.
See Also:
Context.getDescriptions()

enterValues

void enterValues(java.lang.String[] values)
Enter Context values. Be sure all contexts have been set before displaying of a document.

Parameters:
values - the selected context values.
See Also:
DocumentInstance.setContexts()

getType

PromptType getType()
Returns the context type.

Returns:
The context type.

getDataProviders

DataProvider[] getDataProviders()
Returns an array containing the data provider(s) attached to this context.

Since:
6.5.0
See Also:
DataProvider

getDescriptions

java.lang.String[] getDescriptions()
Returns an array of strings containing the descriptions of context values. Each Context value has an associated description. The values returned using Context.getAllValues() are synchronized with the descriptions returned using Context.getDescriptions().

Returns:
An array of strings containing all descriptions associated to this Context.
Since:
6.5.0
See Also:
Context.getAllValues()

getDescription

java.lang.String getDescription(int index)
Returns the description of specified value.

Returns:
the description of specified context value.
Throws:
java.lang.IndexOutOfBoundsException - Thrown when index is invalid.
Since:
6.5.0

requireAnswer

boolean requireAnswer()
Checks if this context needs to be answered.

Returns:
if an answer is needed for this context.
Since:
6.5.0