Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 1.79 KB

File metadata and controls

54 lines (39 loc) · 1.79 KB

Adaptation Setup Guide

CWS can be adapted and tailored for a mission. This can be done by modifying certain resources and source code of CWS-CORE.

Create new functionalities by adding:

  • External Database Config
  • Custom Java code
  • Custom Rest Service API
  • Custom Initiators
  • etc...

Adaptation Database

Adaptation Database feature lets you connect to a external database separate from that of the main cws_dev database.

(1) You must first include the following SQL Template files to the install/sql/ directory:

  • install/sql/adaptation.sql.template (Core Database: cws_dev)
  • install/sql/adaptation_core.sql.template (Core Database: cws_dev)
  • install/sql/adaptation_external.sql.template (Adaptation Database: cws_external_db)

(2) Create your schema/tables within the added Adaptation SQL Template files.

  • Example (adaptation_external.sql.template):
CREATE TABLE IF NOT EXISTS `cws_external_table` (
    ...
    ...
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

(3) Write Custom Java Code.

By referencing your adaptation tables, you can connect and communicate with your external database.

Write Java custom code that extends from DbService and use the jdbcTemplate or jdbcAdaptationTemplate JDBC source to query the core and external databases.

jdbcAdaptationTemplate  (adaptation external database)
jdbcTemplate            (core database)

Adaptation Workers Modal

Custom your Deployment page Workers view with add-ons and filters.

The UI for the Worker listview is customizable with through the javascript addAdaptationWorkersInfo function.

File: cws-ui/src/main/webapp/js/adaptation-workers-modal.js

Write your custom code here:

function addAdaptationWorkersInfo(dataProcKey, listWorkers) {
	return; 
}