Configuration Service

The Configuration Service provides general configuration to the front-end applications.

An implementation of the Configuration Service (Config) is required for the Historic Search feature in Caplin FX Sales.

Requirements

The Configuration Service is available in the FX Integration API 3.49+.

Implementing the Configuration Service

The Configuration Service is implemented using a CachedObjectProvider that provides a Config object:

com.caplin.motif.datasourcecom.caplin.motif.fx.configCachedObjectProviderinitialise()onRequest()onDiscard()ConfigSearchConfig getExecutionSearchConfig()provides

Follow the steps below to implement the Configuration Service:

  1. Add the following object mapping to your adapter’s rttpd.conf file:

    object-map "/PRIVATE/FX/CONFIG" "/PRIVATE/%u/FX/CONFIG"
  2. Add the following include pattern to the add-data-service block in your adapter’s rttpd.conf file

    include-pattern "^/PRIVATE/[^/]+/FX/CONFIG"
  3. Create an implementation of the Config interface. In the getExecutionSearchConfig() method, instantiate and return a SearchConfig object. The SearchConfig.getSearchFields() method returns a List of SearchField objects, each describing a search criteria field.

    com.caplin.motif.fx.configcom.caplin.motif.fx.searchConfigSearchConfig getExecutionSearchConfig()SearchConfigList<SearchField> getSearchFields()MyConfigSearchConfig getExecutionSearchConfig()
  4. Create an implementation of CachedObjectProvider (MyConfigProvider in the diagram below). In the onRequest method, instantiate and publish an instance of MyConfig.

    com.caplin.motif.datasourceCachedObjectProviderinitialise()onRequest()onDiscard()MyConfigProviderinitialise()onRequest()onDiscard()MyConfigSearchConfig getExecutionSearchConfig()provides
  5. In the initialisation code for your integration adapter, instantiate a MyConfigProvider and register it as the configuration provider for a FXTradeAdapter instance:

    fxTradeAdapter.registerConfigProvider(new MyConfigProvider())
    com.caplin.motif.fx.tradingFXTradeAdapterregisterConfigProvider()MyConfigProviderinitialise()onRequest()onDiscard()registers

For a working example of an adapter with a Historic Search implementation, see the Novo Trading Adapter example in the FX Integration API Kit (v3.50 or greater).

Permissions

To permit users to view the config subject, add the following permissions to the global namespace:

Permission
Field Description

Action

VIEW

Product

^/PRIVATE/%u/FX/CONFIG

Namespace

Authorisation

ALLOW


See also: