Package org.eclipse.birt.report.engine.api

# Interface IGetParameterDefinitionTask

All Superinterfaces:
  `IEngineTask`

public interface IGetParameterDefinitionTask extends IEngineTask
an engine task that retrieves parameter definitions from a report. The task retrieves parameter definitions, default values and dynamic selection lists.

## Field Summary

### Fields inherited from interface org.eclipse.birt.report.engine.api.IEngineTask

`CANCEL_ON_ERROR, CONTINUE_ON_ERROR, STATUS_CANCELLED, STATUS_FAILED, STATUS_NOT_STARTED, STATUS_RUNNING, STATUS_SUCCEEDED, TASK_DATAEXTRACTION, TASK_DATASETPREVIEW, TASK_GETPARAMETERDEFINITION, TASK_RENDER, TASK_RUN, TASK_RUNANDRENDER, TASK_UNKNOWN`

## Method Summary

Modifier and Type
Method
Description
`void`
`evaluateDefaults()`
Deprecated.
use getDefaultParameterValues() directly.
`void`
`evaluateQuery(String parameterGroupName)`
Deprecated.
This api has no use.
`Object`
`getDefaultValue(String name)`
get the default value of parameter.
`Object`
`getDefaultValue(IParameterDefnBase param)`
get default value by parameter name
`HashMap`
`getDefaultValues()`
get all default values
`org.eclipse.birt.report.model.api.ParameterHandle`
`getParameter(String name)`
Deprecated.
`IParameterDefnBase`
`getParameterDefn(String name)`
returns the parameter definition given the parameter name name
`Collection`
`getParameterDefns(boolean includeParameterGroups)`
return report parameter definitions
`org.eclipse.birt.report.model.api.SlotHandle`
`getParameters()`
Deprecated.
`Collection`
`getSelectionList(String name)`
get the collections of a selection choices.
`Collection`
`getSelectionListForCascadingGroup(String parameterGroupName, Object[] groupKeyValues)`
The second step to work with the cascading parameters.
`Collection`
`getSelectionTreeForCascadingGroup(String parameterGroupName)`
Gets selection tree for a cascading parameter group.
`default boolean`
`isNormalFlowModeEnabled()`
Is the normal flow mode enabled or not? If enabled, filters can be applied on data sets.
`default void`
`setNormalFlowModeEnabled(boolean normalFlowModeEnabled)`
Enable or disable the normal flow mode.
`void`
`setValue(String name, Object value)`
Set one parameter value.

### Methods inherited from interface org.eclipse.birt.report.engine.api.IEngineTask

`addScriptableJavaObject, cancel, cancel, close, getAppContext, getCancelFlag, getEngine, getErrors, getID, getLocale, getLogger, getParameterDisplayText, getParameterValue, getParameterValues, getReportRunnable, getStatus, getTaskType, getULocale, setAppContext, setDataSource, setDataSource, setErrorHandlingOption, setLocale, setLocale, setLogger, setParameter, setParameter, setParameterDisplayText, setParameterDisplayText, setParameterValue, setParameterValue, setParameterValues, setProgressMonitor, setStatusHandler, setTimeZone, setUserACL, validateParameters`

## Method Details

### getParameterDefns

Collection getParameterDefns(boolean includeParameterGroups)
return report parameter definitions

Parameters:
  `includeParameterGroups` - whether returns one level of parameters with parameter groups or return a flatten collection of all parameters
Returns:
  if includeParameterGroups = true, an ordered collection of report parameters. Each item in the colleciton is of type IParameterDefnBase if includeParameterGroups = false, a collection of parameters. Each item in the collection is of type IParameterDefn.

### getParameterDefn

IParameterDefnBase getParameterDefn(String name)
returns the parameter definition given the parameter name name

Parameters:
  `name` - the parameter name
Returns:
  the definition

### evaluateDefaults

@Deprecated void evaluateDefaults() throws EngineException
Deprecated.
use getDefaultParameterValues() directly.
evaluates the default value expressions for defined parameters. this function may cause the runtime environment to be set up, and default parameter expressions being evaluated. If getDefaultValue is called on a IScalarParameterDefn right after getParameterDefns without calling this function, the default value is null.

Throws:
  `EngineException` - throws exception when there is an error evaluating default value expressions

### setValue

void setValue(String name, Object value)
Set one parameter value. If parameter does not exist in report design, do nothing.

Parameters:
  `name` - the parameter
  `value` - the value of the parameter

### getDefaultValues

HashMap getDefaultValues()
get all default values

Returns:
  the default value map

### getDefaultValue

Object getDefaultValue(IParameterDefnBase param)
get default value by parameter name

Parameters:
  `param` - reference to a parameter
Returns:
  default value for a parameter

### getDefaultValue

Object getDefaultValue(String name)
get the default value of parameter.

Parameters:
  `name` - parameter name
Returns:
  the default value defined in the design. null if not defined.

### getParameter

@Deprecated org.eclipse.birt.report.model.api.ParameterHandle getParameter(String name)
Deprecated.
get parameter definitions.

Parameters:
  `name` - parameter name
Returns:
  the parameter definitions

### getParameters

@Deprecated org.eclipse.birt.report.model.api.SlotHandle getParameters()
Deprecated.
get all the parameters invalid input: '&' parameter groups defined in the report design.

Returns:
  SlotHandle get from MODEL.

### getSelectionList

Collection getSelectionList(String name)
get the collections of a selection choices. if the name is dynamic selection choice, the engine query the data base, return the choice.

Parameters:
  `name` - parameter name
Returns:
  collection of IParameterSelectionChoice

### evaluateQuery

@Deprecated void evaluateQuery(String parameterGroupName)
Deprecated.
This api has no use.

Parameters:
  `parameterGroupName` - - the cascading parameter group name

### getSelectionListForCascadingGroup

Collection getSelectionListForCascadingGroup(String parameterGroupName, Object[] groupKeyValues)
The second step to work with the cascading parameters. Get the selection choices for a parameter in the cascading group. The parameter to work on is the parameter on the next level in the parameter cascading hierarchy. For the "parameter to work on", please see the following example. Assume we have a cascading parameter group as Country - State - City. If user specified an empty array in groupKeyValues (meaning user doesn't have any parameter value), the parameter to work on will be the first level which is Country in this case. If user specified groupKeyValues as Object[]{"USA"} (meaning user has set the value of the top level), the parameter to work on will be the second level which is State in "USA" in this case. If user specified groupKeyValues as Object[]{"USA", "CA"} (meaning user has set the values of the top and the second level), the parameter to work on will be the third level which is City in "USA, CA" in this case.

Parameters:
  `parameterGroupName` - - the cascading parameter group name
  `groupKeyValues` - - the array of known parameter values (see the example above)
Returns:
  the selection list of the parameter to work on

### getSelectionTreeForCascadingGroup

Collection getSelectionTreeForCascadingGroup(String parameterGroupName)
Gets selection tree for a cascading parameter group. Root of the tree is a collection of choices which type is ICascadingParameterSelectionChoice.

Parameters:
  `parameterGroupName` - name of the cascading parameter group.
Returns:
  root choices.

### setNormalFlowModeEnabled

default void setNormalFlowModeEnabled(boolean normalFlowModeEnabled)
Enable or disable the normal flow mode. The normal flow mode can be used to apply filters on data sets in data engine execution.

Parameters:
  `normalFlowModeEnabled` - Set to true to enable the normal flow mode.
Since:
  4.19

### isNormalFlowModeEnabled

default boolean isNormalFlowModeEnabled()
Is the normal flow mode enabled or not? If enabled, filters can be applied on data sets.

Returns:
  true if the normal flow mode is enabled otherwise false
Since:
  4.19