public class CallableDataSource extends Object
CallableDataSource
is responsible for preparing and performing an Datasource
, based on a
DatasourceRef
. This DatasourceRef
is provided either by a PageDefinition
's
SectionelementDef
or by an Action
.Constructor and Description |
---|
CallableDataSource(Site site,
Application application,
ApplicationRequest applicationRequest,
ParameterSupport parameterSupport,
DatasourceRef datasourceRef)
Creates a new
CallableDataSource and also determines the return value for doInclude() , based on
Permissions and Condition s. |
Modifier and Type | Method and Description |
---|---|
boolean |
doInclude()
Checks whether or not to include this
CallableDataSource on the referencing PageReference or
Action . |
Datasource |
getDatasource() |
Data |
perform(String pageId)
|
Data |
perform(String pageId,
boolean setBeanNull,
boolean addValidation)
Performs the
CallableDataSource .Note that the caller needs to check if the Datasource should be included by itself (by calling
doInclude() ), as this method doesn't check that condition. |
String |
toString() |
public CallableDataSource(Site site, Application application, ApplicationRequest applicationRequest, ParameterSupport parameterSupport, DatasourceRef datasourceRef) throws ProcessingException
CallableDataSource
and also determines the return value for doInclude()
, based on
Permissions
and Condition
s.site
- the current Site
application
- the current Application
applicationRequest
- the current ApplicationRequest
parameterSupport
- the ParameterSupport
holding the parameters for the Datasource
datasourceRef
- the DatasourceRef
as given in the SectionelementDef
of a PageDefinition
or by
an Action
.ProcessingException
- if an error occurs while assembling the CallableDataSource
public Datasource getDatasource()
public Data perform(String pageId) throws ProcessingException
ProcessingException
perform(String, boolean, boolean)
public Data perform(String pageId, boolean setBeanNull, boolean addValidation) throws ProcessingException
CallableDataSource
.Datasource
should be included by itself (by calling
doInclude()
), as this method doesn't check that condition.pageId
- the ID of the current pagesetBeanNull
- whether or not to set the Bean
of the Datasource
to null
after performingaddValidation
- whether or not to add validation metadataData
retrieved from the Datasource
by calling
DataProvider.getData(Site, Application, org.appng.api.Environment, Options, org.appng.api.Request, org.appng.api.FieldProcessor)
ProcessingException
- if an error occurs while retrieving the Data
public boolean doInclude()
CallableDataSource
on the referencing PageReference
or
Action
.true
if this CallableDataSource
should be included, false
otherwiseCopyright © 2011–2020 aiticon GmbH. All rights reserved.