-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved adaptation setup guide README to cws-adaptation/README.md
- Loading branch information
1 parent
7834d70
commit 05a5faa
Showing
2 changed files
with
55 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
## 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; | ||
} | ||
``` |