Class DefaultFD2DatasourceProvider
- java.lang.Object
-
- de.xima.fc.web.common.fd2.provider.DefaultFD2DatasourceProvider
-
- All Implemented Interfaces:
IFD2DataSourceProvider
,Serializable
public class DefaultFD2DatasourceProvider extends Object implements IFD2DataSourceProvider
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description DefaultFD2DatasourceProvider(Mandant mandant, SessionAttributes sessionAttributes, ValueParameters requestParameters, Projekt project)
DefaultFD2DatasourceProvider(Mandant client, Map<String,Serializable> sessionAttributes, ValueParameters requestParameters, Projekt project)
DefaultFD2DatasourceProvider(IFormRenderContext renderCtx)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description com.alibaba.fastjson.JSONObject
createAllDatenquellenJSON()
Returns a list of all data sources.com.alibaba.fastjson.JSONArray
createDatenquellenJSON()
Returns a JSON array of all datasources that can be used a data source for a select element in the designer, ie.void
resolveItemOptions(IXFormRenderConfig config, XItem item)
Deprecated.void
resolveItemOptions(XItemRenderData renderData)
-
-
-
Constructor Detail
-
DefaultFD2DatasourceProvider
public DefaultFD2DatasourceProvider(IFormRenderContext renderCtx)
-
DefaultFD2DatasourceProvider
@Deprecated public DefaultFD2DatasourceProvider(Mandant mandant, SessionAttributes sessionAttributes, ValueParameters requestParameters, Projekt project)
-
DefaultFD2DatasourceProvider
public DefaultFD2DatasourceProvider(Mandant client, Map<String,Serializable> sessionAttributes, ValueParameters requestParameters, Projekt project)
-
-
Method Detail
-
resolveItemOptions
public void resolveItemOptions(XItemRenderData renderData)
- Specified by:
resolveItemOptions
in interfaceIFD2DataSourceProvider
-
resolveItemOptions
@Deprecated public void resolveItemOptions(IXFormRenderConfig config, XItem item)
Deprecated.- Specified by:
resolveItemOptions
in interfaceIFD2DataSourceProvider
-
createAllDatenquellenJSON
public com.alibaba.fastjson.JSONObject createAllDatenquellenJSON()
Description copied from interface:IFD2DataSourceProvider
Returns a list of all data sources. Used eg. for suggestions in the JavaScript editor within the designer. Example for the returned JSON object:{DB: [{name: "datasource", type: "DB", paramCount: 2}, LDAP: [], PLUGIN: [], CSV: [], JSON: [], XML: []]}
- Specified by:
createAllDatenquellenJSON
in interfaceIFD2DataSourceProvider
- Returns:
- All available data queries. A JSON object with the data source type as the key, mapped to a JSON array of
all data sources of that type, each a JSON object with the following property keys:
- name: The name of the datasource.
- type: The type of the datasource. One of the enum constant in
EDatenquellenTyp
, the stringPLUGIN
for anIPluginDataSource
; or the stringLDAP
for an LDAP-query. - paramCount: The number of free parameters in the data source.
-
createDatenquellenJSON
public com.alibaba.fastjson.JSONArray createDatenquellenJSON()
Description copied from interface:IFD2DataSourceProvider
Returns a JSON array of all datasources that can be used a data source for a select element in the designer, ie. all CSV data sources and database queries without any free parameters (not containing question marks?
). Also includes plugin data sources (IPluginDataSource
).- Specified by:
createDatenquellenJSON
in interfaceIFD2DataSourceProvider
- Returns:
- Data sources for select elements in the designer, an array of JSON objects with the following property
keys:
- value: To be used as the value of the select option, such as the name of the data source.
- text: To be used as the display text of the select option, such as the name of the data source.
- group: The type of data source, such as
DB
orCSV
- paramCount: The number of free parameters in the data source.
-
-