This page describes the structure of a platform blade-project when it's been created within the Caplin Integration Suite, but before it's been exported for use in the Caplin Deployment Framework.
The majority of the files and folders within a CIS project are common to all blade projects; a minority are dependent on the settings you specified when you created the project.
The illustration below shows what a typical blade looks like, when viewed in the Eclipse Package Explorer tab.
The name of this blade project is TPBlade. It has a Base Package of example.novobank.java.code, uses both the Pricing Integration and Trading Integration APIs, and has connections to both Transformer and Liberator. The structure and content of the project directory reflects this.
Starting at the top and working down, there's the JRE System Library and another node called Referenced Libraries, which contains a reference to the DataSource API. While the JRE System Library may well exist elsewhere, the jar file containing the DataSource API usually resides in the /Blade/DataSource/lib/ directory.
Java source files
The view of the directories containing the Java source files is simplified considerably in the Eclipse Package Explorer. All blade-projects will have the directory path [BladeName]/src/main/java/. If no base package was defined, the Java files will be in that location, although Eclipse will display them within an extra node called "(default package)". If you have defined a base package, Eclipse will display the namespace you entered as a single node, while this will be broken down into multiple directories in the file structure itself.
The base package namespace here is example.novobank.java.code.
The Java files would therefore be in the directory: TPBlade/src/main/java/example/novobank/java/code/.
The Java files themselves depend on which options you chose when you created the blade. There will be one file called [BladeName].java (TPBlade.java in this case), and another file for each selected provider, called [BladeName][Providertype]Provider.java. As our example has both Pricing and Trading APIs, we have TPBladePricingProvider.java and TPBladeTradingProvider.java here.
The /Blade/ directory contains various pieces of configuration data, the first of which is the fields.conf file, which defines the fields that will be contained in records handled by this blade. It's located in the [BladeName]/Blade/blade_config/ folder.
The [BladeName]/Blade/DataSource/etc/ directory contains several files, some related to the DataSource API itself, and some that are specific to trading functionality, which are only present if the Trading Integration API has been selected.
- datasource - contains a script to start the DataSource Jar.
- datasource.conf - contains the DataSource configuration details for this blade.
- trademodels.xml - an XML file that - as the name suggests - contains any trade models that are to be applied by this blade. This file is only present if the Trading Integration API has been selected.
- trading-provider.properties - this too is only present if the Trading Integration API has been selected. It contains configuration details needed by the Trading Provider, such as the location of the trade model and the audit log, and the subject patterns to identify and extract relevant data from incoming requests.
The Liberator configuration details for a platform blade are contained in the rttpd.conf file, which is located in the [BladeName]/Blade/Liberator/etc/ directory. The Liberator directory is only present if the blade needs to connect to a Liberator, so pricing blades will often not have one, as they usually connect to a Transformer instead.
Transformer configuration details can be found in the transformer.conf file, which lives in the [BladeName]/Blade/Transformer/etc/ directory (unless of course your blade doesn't connect to a Transformer, in which case it will be conspicuous by its absence).
The [BladeName]/global_config/ directory contains various configuration files that in the live environment would be external to the blade itself, and would reside in the global_config directory of the Caplin Deployment Framework. The versions in the blade-project's global_config directory are there so that you can run the blade locally while you're developing it. These include:
bootstrap.conf - contains general "bootstrapping" configuration, including references to the environment and hosts configuration files.
Note: bootstrap.conf contains a reference to the file hosts.conf, which does not initially exist within the blade project. It's created after the blade is deployed, using the command
./dfw hostsin the Caplin Deployment Framework.
- environment-defaults.conf - sets environmental defaults such as address, port and monitoring definitions for other Caplin Platform components.
- environment.conf - sets deployment-specific environmental definitions, and defines primary and failover nodes.
- fields.conf - contains definitions for global fields.
- hosts-defns.conf - defines both primary and failover settings for Transformer, Liberator and DataSource hosts. By default, all of these are set to localhost, but you can point them towards remote servers if necessary.