Package org.appng.api
Interface DataProvider
-
public interface DataProvider
AnDataProvider
usually retrieves some data from the persistence layer and returns it as aDataContainer
. The implementing class needs to be defined in the application'sbeans.xml
. This bean is then being referenced within anAction
or aSectionelementDef
using aDatasourceRef
.- Author:
- Matthias Müller
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DataContainer
getData(Site site, Application application, Environment environment, Options options, Request request, FieldProcessor fieldProcessor)
Retrieves some data from the application, wrapped in aDataContainer
.
-
-
-
Method Detail
-
getData
DataContainer getData(Site site, Application application, Environment environment, Options options, Request request, FieldProcessor fieldProcessor)
Retrieves some data from the application, wrapped in aDataContainer
.Either
DataContainer.setItem(Object)
or one ofDataContainer.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 theDatasource
'sDataConfig
.- Parameters:
site
- the currentSite
application
- the currentApplication
environment
- the currentEnvironment
options
- theOptions
for thisDataProvider
request
- the currentRequest
fieldProcessor
- theFieldProcessor
containing all readableFieldDef
initions for this DataProvider- Returns:
- a
DataContainer
holding theData
for the definingDatasource
-
-