Class DefaultFD2DatasourceProvider
java.lang.Object
de.xima.fc.web.common.fd2.provider.DefaultFD2DatasourceProvider
- All Implemented Interfaces:
IFD2DataSourceProvider
,Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultFD2DatasourceProvider
(Mandant mandant, SessionAttributes sessionAttributes, ValueParameters requestParameters, Projekt project) Deprecated.DefaultFD2DatasourceProvider
(Mandant client, Map<String, Serializable> sessionAttributes, ValueParameters requestParameters, Projekt project) DefaultFD2DatasourceProvider
(IFormRenderContext renderCtx) -
Method Summary
Modifier and TypeMethodDescriptioncom.alibaba.fastjson.JSONObject
Returns a list of all data sources.com.alibaba.fastjson.JSONArray
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)
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
DefaultFD2DatasourceProvider
-
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 Details
-
resolveItemOptions
- Specified by:
resolveItemOptions
in interfaceIFD2DataSourceProvider
-
resolveItemOptions
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.
-
DefaultFD2DatasourceProvider(Mandant, Map, ValueParameters, Projekt)