...
- Follow the steps from 1 to 3 in creating a data service using various data sources. When you get to the Add New Data Source screen, select Custom Data Source as the data source type. The custom datasource specific options will appear as shown below.
- Select the type of custom datasource to create: "Custom Tabular Data Source" or "Custom Query Data Source".
- In the Custom Data Source Class field, specify the interface that implements the custom data source. See the following examples:
- Click Add New Property to enter the properties and values which constitutes for the datasource. See the following examples:
Properties names and values for a custom tabular datasource implementation:
Code Block <property name="inmemory_datasource_schema">{Vehicles:[ID,Model,Classification,Year]}</property> <property name="inmemory_datasource_records"> {Vehicles:[["S10_1678","Harley Davidson Ultimate Chopper","Motorcycles","1969"], ["S10_1949","Alpine Renault 1300","Classic Cars","1952"], ["S10_2016","Moto Guzzi 1100i","Motorcycles","1996"], ["S10_4698","Harley-Davidson Eagle Drag Bike","Motorcycles","2003"], ["S10_4757","Alfa Romeo GTA","Classic Cars","1972"], ["S10_4962","LanciaA Delta 16V","Classic Cars","1962"], ["S12_1099","Ford Mustang","Classic Cars","1968"], ["S12_1108","Ferrari Enzo","Classic Cars","2001"]]} </property>
Properties and values for a custom query datasource implementation:
Code Block <property name="p1">val1</property> <property name="p2">val2</property>
init
methods of all custom datasources, user-supplied properties are parsed to initialize the datasource accordingly. Also, a property named__DATASOURCE_ID__
, which contains a UUID to uniquely identify the current datasource, is passed. Custom datasource authors use this to identify the datasources accordingly. For example, scenarios like datasource instances communicating within a server cluster for data synchronisation.
...