Package org.eclipse.birt.chart.ui.swt.interfaces

# Interface IDataServiceProvider

public interface IDataServiceProvider
Data service provider for chart wizard, to provide all necessary data.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`DATA_BINDING_REFERENCE`
`static final int`
`HAS_CUBE`
Indicates if chart has data cube
`static final int`
`HAS_DATA_SET`
Indicates if chart has data set
`static final int`
`IN_MULTI_VIEWS`
`static final int`
`INHERIT_COLUMNS_GROUPS`
`static final int`
`INHERIT_COLUMNS_ONLY`
`static final int`
`INHERIT_CUBE`
Indicates if chart inherits data cube from container
`static final int`
`INHERIT_DATA_SET`
Indicates if chart inherits data set from container
`static final int`
`IS_CUBE_AND_CATEGORY_NOT_TOP_LEVEL`
Indicates if is cube and category is not top level
`static final int`
`IS_CUBE_AND_SERIES_NOT_TOP_LEVEL`
Indicates if is cube and series is not top level
`static final int`
`MULTI_CUBE_DIMENSIONS`
Indicates if current chart is using cube or sharing with crosstab or in multi-view, and cube's dimension count > 1.
`static final int`
`PART_CHART`
Indicates if current chart is a part of whole chart, such as plot or axis.
`static final int`
`SHARE_CHART_QUERY`
`static final int`
`SHARE_CHART_QUERY_RECURSIVELY`
Indicates if the final shared object is chart.
`static final int`
`SHARE_CROSSTAB_QUERY`
`static final int`
`SHARE_QUERY`
`static final int`
`SHARE_TABLE_QUERY`
`static final int`
`USE_NON_HIERARCHY_CATEGORY_DATA`
Indicates if category data is non hierarchy values.

## Method Summary

Modifier and Type
Method
Description
`Object`
`checkData(String checkType, Object data)`
Check data for the invoker.
`boolean`
`checkState(int state)`
Checks if the state in provide includes this.
`void`
`dispose()`
Disposes associated handles in this method.
`String[]`
`getAllStyleDisplayNames()`
Returns all available style display names.
`String[]`
`getAllStyles()`
Returns all available style names.
`String`
`getCurrentStyle()`
Returns the name of current used style.
`Object[]`
`getDataForColumns(String[] sExpressions, int iMaxRecords, boolean byRow)`
Fetches data from dataset.
`org.eclipse.birt.chart.model.attribute.DataType`
`getDataType(String expression)`
Returns the data type according to the query expression.
`int`
`getState()`
Returns state information of current data service provider.
`void`
`initialize()`
Does some initialization works in this method.
`boolean`
`isLivePreviewEnabled()`
Returns whether live preview is enabled
`org.eclipse.birt.chart.factory.IDataRowExpressionEvaluator`
`prepareRowExpressionEvaluator(org.eclipse.birt.chart.model.Chart cm, List<String> lExpressions, int iMaxRecords, boolean byRow)`
Prepare row expression evaluator for chart to bind data.
`void`
`setStyle(String styleName)`
Sets current used style by specified style name.
`boolean`
`update(String type, Object value)`
Updates some custom data which is related with invoker.

## Field Details

### HAS_DATA_SET

static final int HAS_DATA_SET
Indicates if chart has data set

See Also:
  - Constant Field Values

### HAS_CUBE

static final int HAS_CUBE
Indicates if chart has data cube

See Also:
  - Constant Field Values

### DATA_BINDING_REFERENCE

static final int DATA_BINDING_REFERENCE

See Also:
  - Constant Field Values

### IN_MULTI_VIEWS

static final int IN_MULTI_VIEWS

See Also:
  - Constant Field Values

### SHARE_QUERY

static final int SHARE_QUERY

See Also:
  - Constant Field Values

### PART_CHART

static final int PART_CHART
Indicates if current chart is a part of whole chart, such as plot or axis.

See Also:
  - Constant Field Values

### MULTI_CUBE_DIMENSIONS

static final int MULTI_CUBE_DIMENSIONS
Indicates if current chart is using cube or sharing with crosstab or in multi-view, and cube's dimension count > 1.

See Also:
  - Constant Field Values

### SHARE_TABLE_QUERY

static final int SHARE_TABLE_QUERY

See Also:
  - Constant Field Values

### SHARE_CROSSTAB_QUERY

static final int SHARE_CROSSTAB_QUERY

See Also:
  - Constant Field Values

### INHERIT_COLUMNS_ONLY

static final int INHERIT_COLUMNS_ONLY

See Also:
  - Constant Field Values

### INHERIT_COLUMNS_GROUPS

static final int INHERIT_COLUMNS_GROUPS

See Also:
  - Constant Field Values

### SHARE_CHART_QUERY

static final int SHARE_CHART_QUERY

See Also:
  - Constant Field Values

### INHERIT_DATA_SET

static final int INHERIT_DATA_SET
Indicates if chart inherits data set from container

See Also:
  - Constant Field Values

### INHERIT_CUBE

static final int INHERIT_CUBE
Indicates if chart inherits data cube from container

See Also:
  - Constant Field Values

### SHARE_CHART_QUERY_RECURSIVELY

static final int SHARE_CHART_QUERY_RECURSIVELY
Indicates if the final shared object is chart.

See Also:
  - Constant Field Values

### IS_CUBE_AND_CATEGORY_NOT_TOP_LEVEL

static final int IS_CUBE_AND_CATEGORY_NOT_TOP_LEVEL
Indicates if is cube and category is not top level

See Also:
  - Constant Field Values

### IS_CUBE_AND_SERIES_NOT_TOP_LEVEL

static final int IS_CUBE_AND_SERIES_NOT_TOP_LEVEL
Indicates if is cube and series is not top level

See Also:
  - Constant Field Values

### USE_NON_HIERARCHY_CATEGORY_DATA

static final int USE_NON_HIERARCHY_CATEGORY_DATA
Indicates if category data is non hierarchy values.

See Also:
  - Constant Field Values

## Method Details

### initialize

void initialize() throws org.eclipse.birt.chart.exception.ChartException
Does some initialization works in this method.

Throws:
  `org.eclipse.birt.chart.exception.ChartException`

### dispose

void dispose()
Disposes associated handles in this method.

### getAllStyles

String[] getAllStyles()
Returns all available style names.

### getAllStyleDisplayNames

String[] getAllStyleDisplayNames()
Returns all available style display names. Note the count should be identical with getAllStyles().

Since:
  2.1

### getCurrentStyle

String getCurrentStyle()
Returns the name of current used style.

### setStyle

void setStyle(String styleName)
Sets current used style by specified style name.

### getDataForColumns

Object[] getDataForColumns(String[] sExpressions, int iMaxRecords, boolean byRow) throws org.eclipse.birt.chart.exception.ChartException
Fetches data from dataset.

Parameters:
  `sExpressions` - column expression array in the form of javascript. Null will return all columns of dataset.
  `iMaxRecords` - max row count. -1 returns default count or the preference value.
  `byRow` - true: by row first, false: by column first
Returns:
  Data array. if type is by row, array length is row length; if type is by column, array length is column length
Throws:
  `org.eclipse.birt.chart.exception.ChartException`

### isLivePreviewEnabled

boolean isLivePreviewEnabled()
Returns whether live preview is enabled

Returns:
  whether live preview is enabled

### getDataType

org.eclipse.birt.chart.model.attribute.DataType getDataType(String expression)
Returns the data type according to the query expression.

Parameters:
  `expression` -
Returns:
  2.2

### prepareRowExpressionEvaluator

org.eclipse.birt.chart.factory.IDataRowExpressionEvaluator prepareRowExpressionEvaluator(org.eclipse.birt.chart.model.Chart cm, List<String> lExpressions, int iMaxRecords, boolean byRow) throws org.eclipse.birt.chart.exception.ChartException
Prepare row expression evaluator for chart to bind data.

Parameters:
  `cm` -
  `lExpressions` -
  `iMaxRecords` -
  `byRow` -
Throws:
  `org.eclipse.birt.chart.exception.ChartException`
Since:
  BIRT 2.3

### update

boolean update(String type, Object value)
Updates some custom data which is related with invoker.

Parameters:
  `type` -
  `value` -
Since:
  2.3
See Also:
  - `ChartUIConstants.QUERY_CATEGORY`
  - `ChartUIConstants.QUERY_OPTIONAL`
  - `ChartUIConstants.QUERY_VALUE`

### getState

int getState()
Returns state information of current data service provider.

Returns:
  state
Since:
  2.3

### checkState

boolean checkState(int state)
Checks if the state in provide includes this.

Parameters:
  `state` -
Returns:
  (getState() invalid input: '&' state) == state
Since:
  2.3

### checkData

Object checkData(String checkType, Object data)
Check data for the invoker.

Parameters:
  `checkType` -
  `data` -
Since:
  2.3