|
1 | 1 | # sepia-sdk-java |
2 | | -A set of classes to develop services for SEPIA in Java |
| 2 | +A set of tools and classes to develop services for SEPIA in Java. |
3 | 3 |
|
4 | | -### Credentials |
| 4 | +## Credentials |
5 | 5 | Create an account on the SEPIA server you want to develop for. |
6 | 6 | Ask the admin to add the 'developer' role to the account (see [Wiki](https://github.com/SEPIA-Framework/sepia-docs/wiki/Create-and-Edit-Users) for help). |
7 | 7 |
|
8 | | -### Service upload interface |
| 8 | +## Service upload interface |
9 | 9 | The SEPIA-Assist server has an endpoint for service uploads, e.g.: http://localhost:20721/upload-service |
10 | 10 | To use the interface make sure the server has SDK support enabled (via [Control-HUB](https://github.com/SEPIA-Framework/sepia-admin-tools/tree/master/admin-web-tools) or enable_sdk=true in assist.*.properties). |
11 | 11 |
|
12 | | -### Service upload via Control-HUB |
| 12 | +## Service upload via Control-HUB |
13 | 13 | You can use the 'Code-UI' page of the Control-HUB to edit and upload services created with the SDK. See the [SEPIA extensions](https://github.com/SEPIA-Framework/sepia-extensions) repository for more info. |
14 | 14 |
|
15 | | -### Quickstart |
| 15 | +## Quickstart |
16 | 16 | - Import the maven project into the IDE of your choice (tested with Eclipse). |
17 | | -- Make sure you've installed a JAVA JDK on the S.E.P.I.A. server (e.g.: sudo apt-get install -y openjdk-9-jdk-headless). This is required to compile new classes during runtime. |
| 17 | +- Make sure you've installed a JAVA JDK on the S.E.P.I.A. server (e.g.: sudo apt-get install -y openjdk-11-jdk-headless). This is required to compile new classes during runtime. |
18 | 18 | - Create a package for your developer account ID under 'net.b07z.sepia.sdk.services' (e.g. "uid1010" -> net.b07z.sepia.sdk.services.uid1010). |
19 | 19 | - Open 'Settings/sdk.properties' and put in your credentials (ID + password of your SEPIA account with 'developer' role) and the endpoint URL of your SEPIA-Assist server. |
20 | 20 | - Modify and run the various '[.main.Test***.java](https://github.com/SEPIA-Framework/sepia-sdk-java/tree/dev/src/main/java/net/b07z/sepia/sdk/main)' classes to test the upload of one of the demo services. Check the result for errors. |
21 | 21 | - Check-out the examples under '[.services.uid1007.*](https://github.com/SEPIA-Framework/sepia-sdk-java/tree/dev/src/main/java/net/b07z/sepia/sdk/services/uid1007)' to get an idea of how a SDK custom service works (until a real documentation is ready ^^). |
22 | 22 | - Open your SEPIA client, login with the same user ID you used for development and make a real test of your custom service. |
23 | 23 |
|
24 | | -### Good to know |
| 24 | +### How to load Javadoc |
| 25 | + |
| 26 | +Because you can't load the Javadoc from Maven Central yet the Javadocs for the packages `net.b07z.sepia.server.core`, `net.b07z.sepia.websockets` and `net.b07z.sepia.server.assist` are included as JAR files in the `libs` folder. |
| 27 | +You can load them in your favorite IDE via the build-path properties. In Eclipse for example do: |
| 28 | +- Go to your project `sepia-sdk-java` project in your workspace |
| 29 | +- Expand the section "Maven Dependencies" and look for e.g. `sepia-assist-vX.Y.Z.jar` |
| 30 | +- Open the properties (right click on .jar -> properties), then open the section "Javadoc location" |
| 31 | +- Choose "Javadoc in archive" -> "Workspace file" and add `sepia-sdk-java/libs/sepia-assist-vX.Y.Z-javadoc.jar` |
| 32 | +- Click "Apply and close" and repeat the steps for the other SEPIA JAR files |
| 33 | + |
| 34 | +## Good to know |
25 | 35 | Services that have been uploaded are only available for the user that uploaded them unless you upload them with the 'assistant' user (core-account). |
0 commit comments