Interface IGetParameterDefinitionTask
- All Superinterfaces:
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 TypeMethodDescriptionvoid
Deprecated.use getDefaultParameterValues() directly.void
evaluateQuery
(String parameterGroupName) Deprecated.This api has no use.getDefaultValue
(String name) get the default value of parameter.get default value by parameter nameget all default valuesorg.eclipse.birt.report.model.api.ParameterHandle
getParameter
(String name) Deprecated.getParameterDefn
(String name) returns the parameter definition given the parameter name namegetParameterDefns
(boolean includeParameterGroups) return report parameter definitionsorg.eclipse.birt.report.model.api.SlotHandle
Deprecated.getSelectionList
(String name) get the collections of a selection choices.getSelectionListForCascadingGroup
(String parameterGroupName, Object[] groupKeyValues) The second step to work with the cascading parameters.getSelectionTreeForCascadingGroup
(String parameterGroupName) Gets selection tree for a cascading parameter group.void
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
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
returns the parameter definition given the parameter name name- Parameters:
name
- the parameter name- Returns:
- the definition
-
evaluateDefaults
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
Set one parameter value. If parameter does not exist in report design, do nothing.- Parameters:
name
- the parametervalue
- the value of the parameter
-
getDefaultValues
HashMap getDefaultValues()get all default values- Returns:
- the default value map
-
getDefaultValue
get default value by parameter name- Parameters:
param
- reference to a parameter- Returns:
- default value for a parameter
-
getDefaultValue
get the default value of parameter.- Parameters:
name
- parameter name- Returns:
- the default value defined in the design. null if not defined.
-
getParameter
Deprecated.get parameter definitions.- Parameters:
name
- parameter name- Returns:
-
getParameters
Deprecated.get all the parameters & parameter groups defined in the report design.- Returns:
- SlotHandle get from MODEL.
-
getSelectionList
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.This api has no use.- Parameters:
parameterGroupName
- - the cascading parameter group name
-
getSelectionListForCascadingGroup
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 namegroupKeyValues
- - the array of known parameter values (see the example above)- Returns:
- the selection list of the parameter to work on
-
getSelectionTreeForCascadingGroup
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.
-