This page will show you how to create a new CIS 6 project.
- Creating a new project
- Example: creating a pricing and trading project
- Importing a CIS 6 project into the Eclipse IDE
You create a blade project using the CIS Toolkit's
The create command takes the following options:
- -n <value>, --name <value>
- [Required] The name of the new blade. The blade name will be used as the name of the blade's main class, and so the name must be in upper camel-case (first letter capitalised), in accordance with Java conventions for class naming.
- -k <value>, --kit <value>
- [Required] The file path to the root folder of the unzipped Caplin Integration Suite kit. This is needed so that the correct APIs and other resources can be included in the new blade.
- -i <value>, --include <value>
[Required] The Caplin Integration APIs that you want to include in this blade. This must be one or more of the following, separated by spaces: pricing, trading, permissioning, notifications, charting, and blotter.
Some of the blade's other requirements will be determined by the APIs you pick.
- -d <value>, --directory <value>
- The file path to the location where the blade-project is to be created. If the folder you specify doesn't yet exist, it will be created; if you don't specify one, the blade will be created in the current working directory.
- -p <value>, --package <value>
The namespace of the base package that is to contain the source code for this blade.
- -s <value>
Subject prefix or asset class, depending on which APIs have been selected.
You only need to use the
-soption if you've selected the
tradingAPIs. The rules for each are slightly different.
If you've included
trading, you have to specify a subject prefix. This must contain only alphanumeric characters, with a slash before and after; e.g.
If you've included
trading, you have to provide an asset class, which is basically the same only without the slashes.
If you've included both
trading, then provide just the asset class (i.e. without the slashes). The same string will be used for the subject prefix, but the slashes will be added automatically. For example, the asset class
FXwould become the subject prefix
Connects the pricing adapter to a Liberator component.
If you've included the
pricingAPI, it will connect to a Transformer component by default. Use this option if you want it to connect to a Liberator instead.
The command below creates a new project for an adapter that provides pricing and trading functionality. The following command would be entered from a command prompt in the root directory of the Caplin Integration Suite kit:
java -jar tools/cis-blade-toolkit-6.0.1-255011368.jar create \ --name SampleBlade \ --kit . \ --include pricing trading \ --directory ~/src/blades \ --package com.mybank \ -s FX
The options used in this example break down as follows:
- --name SampleBlade
- Specify the name of the project, and the blade that will be exported from it, as 'SampleBlade'.
- --kit .
- Specify the location of the CIS root directory as the current directory (.)
- --include pricing trading
- Specify that the integration libraries 'pricing' and 'trading' should be included in the project.
- --directory ~/src/blades
- Specify the location for the new project as the src/blades directory under the user's home directory.
- --package com.mybank
- Specify the package for generated code as
com.mybank. This will translate into com/mybank in the src/java section of the blade project's directory structure.
- -s FX
- Specify the asset class for trading as
FX. The subject prefix for pricing will be automatically set to
-Loption has been set, so the adapter will connect to Liberator via Transformer (the default setting).
The scaffolding created from the above command looks like this:
~/src/blades/SampleBlade ├── bin ├── Blade │ ├── blade_config │ │ └── fields.conf │ ├── DataSource │ │ ├── bin │ │ │ ├── logcat │ │ │ └── start-jar.sh │ │ ├── etc │ │ │ ├── datasource.conf │ │ │ ├── trademodels.xml │ │ │ └── trading-provider.properties │ │ ├── lib │ │ │ ├── datasource-java-6.2.9-657-b01314d.jar │ │ │ └── trading-datasource-6.2.2-911-f0a7b45.jar │ │ └── var │ ├── Liberator │ │ └── etc │ │ └── rttpd.conf │ └── Transformer │ └── etc │ └── transformer.conf ├── global_config │ ├── bootstrap.conf │ ├── environment.conf │ ├── environment-defaults.conf │ ├── fields.conf │ ├── hosts-defns.conf │ └── README.txt ├── README-Wizard.txt └── src ├── main │ └── java │ └── com │ └── mybank │ ├── SampleBlade.java │ ├── SampleBladePricingProvider.java │ ├── SampleBladeTradeChannelListener.java │ ├── SampleBladeTradeListener.java │ └── SampleBladeTradingProvider.java └── test └── java └── com └── mybank
To import a new CIS 6 project into the Eclipse IDE, follow the steps below:
- Open the Eclipse IDE
- Click File > New > Java Project. The New Java Project dialog appears.
- In the Project name box, type the name of the project. This must be the same name you used for the -n argument to the CIS Toolkit's create command.
- Deselect Use default location.
- In the Location field, enter the location of the project you created using the CIS Toolkit.
- Click Next. The Java Settings page appears.
- In the Source tab, right-click the src/test/java folder, and click Use as source folder
- Click Finish
For example, importing the project created in the previous section into Eclipse creates the Eclipse project below: