Files
ch.psi.fda/Readme.md
2015-08-14 13:26:17 +02:00

107 lines
1.9 KiB
Markdown

# Overview
This package holds the core functionality of FDA.
# Usage
use -Djava.util.logging.config.file=logging.properties` to configure logging
## Server
The FDA server is started as follows:
```
./bin/server -h
usage: fda
-h Help
-p <arg> Server port (default: 8080)
-s <arg> Server address (default: localhost)
```
Start new scan:
```
curl -X PUT -d @scan1d.xml -H 'Content-Type:application/xml' http://localhost:8080/fda/scan
```
## Viewer
```
./bin/viewer -h
usage: viewer
-h Help
-p <arg> Server port (default: 10000)
-s <arg> Server address (default: localhost)
```
# Development
When checking out the project from the repository there is the `target/generated-sources/xjc` folder missing.
After checking out the project execute `mvn compile` to create the folder and the required classes.
To build project use `mvn clean install`.
To upload the latest version to the central artifact repository use `mvn clean deploy`.
Create Zip file via `mvn clean compile assembly:assembly`
To use the FDA libary in an other project (like the GUI project) use:
```
<dependency>
<groupId>ch.psi</groupId>
<artifactId>fda</artifactId>
<version>x.x.x</version>
</dependency>
```
## REST
FDA offers a rest service to execute scans. There are 3 distinct service for fda scan, fdaq and cdump.
### FDA Service
Submit scan
```
PUT fda/{trackingId}
Content-Type: application/xml
<configuration>
...
</configuration>
204 - Success
```
Stop/cancel scan
```
DELETE fda/{trackingId}
204 - Success
```
Stop all scans
```
DELETE fda
204 - Success
```
Check if scan is running
```
GET fda/{trackingId}/running
200 - true/false
```
Wait for scan done (blocks until scan is done)
```
GET fda/{trackingId}/done
204 - Success
```
# Notes
## Upgrade FDA 1.x to 2.x
In existing fda.properties file the following property need to be added: `ch.psi.fda.aq.data.dir=../data`