public interface DataProvider
DataProvider
usually retrieves some data from the persistence layer and returns it as a
DataContainer
. The implementing class needs to be defined in the application's beans.xml
. This bean
is then being referenced within an Action
or a SectionelementDef
using a DatasourceRef
.
Modifier and Type | Method and Description |
---|---|
DataContainer |
getData(Site site,
Application application,
Environment environment,
Options options,
Request request,
FieldProcessor fieldProcessor)
Retrieves some data from the application, wrapped in a
DataContainer . |
DataContainer getData(Site site, Application application, Environment environment, Options options, Request request, FieldProcessor fieldProcessor)
DataContainer
.
Either DataContainer.setItem(Object)
or one of
DataContainer.setItems(java.util.Collection)
DataContainer.setPage(java.util.Collection, org.springframework.data.domain.Pageable)
DataContainer.setPage(org.springframework.data.domain.Page)
DataContainer
.
Those item(s) need(s) to be of the type defined in MetaData.getBindClass()
of the Datasource
's
DataConfig
.
site
- the current Site
application
- the current Application
environment
- the current Environment
options
- the Options
for this DataProvider
request
- the current Request
fieldProcessor
- the FieldProcessor
containing all readable FieldDef
initions for this
DataProviderDataContainer
holding the Data
for the defining Datasource
Copyright © 2011–2023 aiticon GmbH. All rights reserved.