public interface I_CmsDataView
This provides everything the widget needs to query an external data source, display the query results (items) in tabular form, and provide the data to be stored when the user selects one or multiple items.
| Modifier and Type | Method and Description |
|---|---|
java.util.List<CmsDataViewColumn> |
getColumns()
Retrieves the list of columns to be displayed in the external data view widget.
|
java.util.List<CmsDataViewFilter> |
getFilters()
Gets the initial list of filters.
|
I_CmsDataViewItem |
getItemById(java.lang.String id)
Retrieves the data item with the given id.
|
int |
getPageSize()
Gets the page size, used for paging results.
|
CmsDataViewResult |
getResults(CmsDataViewQuery query,
int offset,
int count)
Gets the result for the given query, with the given offset and limited to the given number of results.
|
void |
initialize(CmsObject cms,
java.lang.String configData,
java.util.Locale locale)
Initializes this data view instance.
|
java.util.List<CmsDataViewFilter> |
updateFilters(java.util.List<CmsDataViewFilter> prevFilters)
Returns an updated list of filters based on the current filters and their values.
|
java.util.List<CmsDataViewColumn> getColumns()
This method should always return the same columns.
java.util.List<CmsDataViewFilter> getFilters()
This is only used for the initial display of the data table; if the user changes the filters, the method updateFilters() is called instead.
I_CmsDataViewItem getItemById(java.lang.String id)
If no data item with that id exists, this method should return null.
id - the id for which to retrieve the itemint getPageSize()
CmsDataViewResult getResults(CmsDataViewQuery query, int offset, int count)
The returned result includes a list of result items, and a total hit count for the given query (i.e. the number of results that would be returned for offset 0 and unlimited result count). The hit count should be as accurate as possible.
query - the queryoffset - position of the first result to return (starts with 0)count - maximum number of results to returnvoid initialize(CmsObject cms, java.lang.String configData, java.util.Locale locale)
cms - the CMS context to use for VFS operationsconfigData - a string containing configuration datalocale - the locale to use for the user interfacejava.util.List<CmsDataViewFilter> updateFilters(java.util.List<CmsDataViewFilter> prevFilters)
This is called when the user changes any of the current filters in the data select widget. The list passed as a parameter should not be modified, instead a new filter list should be returned. If you do not need a dynamically changing set of filters, just return the argument 'prevFilters' in your implementation.
prevFilters - the current set of filters