
Use the application configuration file to configure OData endpoints and defining requests that determine the data that populates the application database when it is created. Use the cockpit to import the application configuration file.
An application configuration file consists of one or more OData endpoints, each of which can be optionally followed by one or more defining requests.
Each application configuration file represents a single application.All settings have default values, so an application configuration file is only required for non-default behavior.
Endpoints are defined as follows:
[endpoint] name=YourConnectionName prepopulate_offline_db=Y|N|SHARED-ONLY prepopulate_offline_db_interval=NNN indexed_type=<namespace>.<entity type name1>: Property1A [ASC|DESC][, Property1B [ASC|DESC], …] indexed_type=<namespace>.<entity type name2>: Property2A [ASC|DESC][, Property2B [ASC|DESC], …] request_format=application/json;q=1,application/atom+xml;q=0.5 delta_request_format=application/atom+xml
| Parameter | Value | Notes |
|---|---|---|
| name | Name | (Required) The name of the endpoint, defined as a Connection Name in the cockpit. |
| prepopulate_offline_db | Y|N|SHARED-ONLY | Specifies the type of data that is included in the initial database.
|
| prepopulate_offline_db_interval | NNN | If a refresh requires a new database, the shared data is refreshed based on the
interval, in minutes, specified. This option applies only when prepopulate_offline_db is set to Y or SHARED-ONLY and there is at least one defining request with is_shared_data=Y. |
| indexed_type | <namespace>.<entity type name>: PropertyName [ASC|DESC][, AnotherPropertyName [ASC|DESC], …] | Each indexed_type defined causes the client database to have an index for that type.
Defining indexes can improve client query performance. However,
defining too many indexes can slow the performance of refreshes and
updates. Specify multiple indexed_type entries by listing one entry per line. Specify either the primitive property name, or a complex type path expression that ends with a primitive property. |
| request_format | atom|json|any valid value | Specifies the format to use when communicating with the OData
producer. This property applies only when the offline OData service
is making initial requests or non-delta request to the OData producer.
The default
is:
application/json;q=1,application/atom+xml;q=0.5 |
| delta_request_format | atom|json|any valid value | Specifies the format to use when communicating with the OData
producer. This property applies only when the offline OData service
is making delta requests to the OData producer.
The default
is:
application/atom+xml |
Create defining requests as follows:
[defining_request] name=DefiningRequestName is_shared_data=N|Y refresh_interval=NNN track_deltas=AUTO|ALWAYS|NEVER delta_token_lifetime=NNN
Currently, only defining requests where the resource path identifies an entity set or entity type instance are supported.
| Parameter | Value | Notes |
|---|---|---|
| name | DefiningRequestName | (Required) The name of the defining request. A defining request is an OData read
request that targets the OData endpoint associated with the offline
store, and retrieves a subset of the OData endpoint data. Defining requests are defined in the ODataOfflineStoreOptions object of the OData Offline API. The application populates the “definingRequests” parameter. |
| is_shared_data | N|Y | Specifies whether the data is shared among different clients or users.
|
| refresh_interval | NNN | The interval time, in minutes, between refreshes of the shared data. |
| track_deltas | AUTO|ALWAYS|NEVER | Specifies how to track OData deltas.
|
| delta_token_lifetime | NNN | The time, in minutes, until the OData delta token expires. While a token is valid, only changed data is refreshed on the client database. When the delta token expires, the entire client database is replaced. |
[endpoint] Name=OrderExample prepopulate_offline_db=SHARED-ONLY prepopulate_offline_db_interval=1440 indexed_type=SAPODataExample.CustomerType: Surname, GivenName indexed_type=SAPODataExample.CustomerType: Address/Province, Address/City [defining_request] name=Customers is_shared_data=N [defining_request] name=Orders is_shared_data=N [defining_request] name=OrderItems is_shared_data=N [defining_request] name=Products is_shared_data=Y refresh_interval=1440