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 offline_db_collation=UTF8BIN case_sensitive_offline_db=Y|N json_datetimeoffset_in_utc=Y|N local_change_expiry=NNN allow_omitting_max_length_facet=Y|N content_id_header_location=mime|operation max_delta_resends=NNN
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 specified, in minutes. The default is 1440 minutes (one
day). 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 |
offline_db_collation |
Any collation supported by UltraLite. |
Specifies the collation for the database. The default is:
UTF8BIN |
case_sensitive_offline_db | Y|N |
Specifies whether the database is case sensitive. The default
is:
case_sensitive_offline_db=Y |
json_datetimeoffset_in_utc | Y|N |
Specifies whether the OData backend specifies or accepts the ticks portion of a JSON formatted Edm.datetimeoffset in UTC or in the timezone specified by the offset portion.
The default
is:
json_datetimeoffset_in_utc=Y |
local_change_expiry | NNN |
In some cases, local data could persist in the local store after it has been flushed to the back end. To prevent this, specify an expiry, in hours, for local data. When this option is omitted from the configuration file, local changes never expire.
|
allow_omitting_max_length_facet | Y|N |
When enabled, this option allows default MaxLength values for Edm.String and Edm.Binary key properties to be assigned by the system when none are provided. Any indexable properties (key or referential constraint) that are missing the MaxLength facet are treated as though they have a MaxLength of 1536 bytes.
The default
is:
allow_omitting_max_length_facet=N Note
This feature is intended to be used for development purposes only as it does not provide fine-tuned control over the values chosen. In a production environment, ensure MaxLength facets for Edm.String and Edm.Binary key properties are included in the OData metadata. |
content_id_header_location |
mime|operation |
For a batch request, specifies which header section of the OData changeset to put the ContentID header in.
The default is:
content_id_header_location=mime |
max_delta_resends |
NNN |
When multiple defining requests are delta-enabled, the delta requests are automatically sent to the backend repeatedly until all delta responses are empty in order to ensure data consistency. Use this option to configure the number of times a delta link is resent during a refresh. The default is 5. |
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. The default is 15 minutes. |
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. The default is 72000 minutes (50 days). 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