Commit 8d3b8ced authored by Elisa Herrmann's avatar Elisa Herrmann
Browse files

initial upload. SDK releases

parent 576eaa68
/SDK/java/target/
/.DS_Store
/SDK/java/nb-configuration.xml
/SDK/.DS_Store
.DS_Store
\ No newline at end of file
# Description
(This repository is part of the AEOLIX platform and contains only the files related to the MyAEOLIX Management tool)
The AEOLIX project provides an IT platform which main goals are enhance the information sharing process between
logistic stakeholders. The AEOLIX platform provides manages, not only the communication infrastructure between
each of the actors, and which is solved by using the AEON platform, but also provides governance on data sources
and data interoperability.
MyAEOLIX is the application that puts all these concepts together. It provides Members and Users Management for each of the
organizations that are part of the ecosystem. Every user, application or resource are protected behind an Identity Manager
that ensures a security environment to all the participants.
Each Member is able to create its own user network. The tool also provides mechanisms to create and share data sources,
and also granting access to other Members of the AEOLIX Ecosystem to subscribe to the proper data source.
At the same time, MyAEOLIX provides a toolkit of IT Logistic Services that are available for those logistic stakeholders
that are willing to use them.
Finally, it provides an application management to register third party applications to connect services or using the
information sharing capabilities.
The current Repository contains the files with the SDK operations to start using the pub/sub capabilities of the AEOLIX platform.
# Benefits
* Users Management under Membership. Management of business roles to facilitate data governance in third party applications.
* Enable information sharing process in an easy way by creating data source and choosing who will be the subscribers to each of them.
* Access to IT Logistic Services to improve business flows.
* Integration with third party applications.
* Easy use of the publish/subscribe mechanisms through the AEOLIX SDK.
# Technical description
The MyAEOLIX SDK will be released under three main technologies:
* Node.JS
* Java
* Javascript
# In Use
Currently MyAEOLIX is under development.
# License
Due the interoperability needs of these architectures, MyAEOLIX has been fully
designed considering Free Libre Open Source Software technologies.
The project has been designed and implemented by the Transport Sector in the Research & Innovation department in ATOS Spain.
# SDK for JAVA
(This repository is part of the AEOLIX platform and contains only the Software Development Toolkit)
## Pre-requisites
First of all you need to get AEOLIX SDK from `GitLab <https://gitlab.atosresearch.eu/ari/AEOLIX-SDK.git>`.
# Instance the SDK
```
AEOLIXSDK instance = new AeolixSDK()
```
# Login
The loging to the AEOLIX platform is made throught the keycloak IDM.
## Login throught Keycloak with username and password
```
AeolixSDK aeolixSDK = new AeolixSDK();
JSONObject login = aeolixSDK.login(data);
```
### Arguments:
* data: login object
```
{
"username":"username",
"password":"pwd",
"type":"user"
}
```
## Login throught Keycloak with token
```
AeolixSDK aeolixSDK = new AeolixSDK();
JSONObject login = aeolixSDK.setToken(newToken);
```
### Arguments:
* Token: string
# Publish
This functionality allows to publish a message.
```[JavaScript]
AeolixSDK aeolixSDK = new AeolixSDK();
JSONObject response = aeolixSDK.publish("MyDatasourceID",data);
```
### Arguments:
* data: String containing the data to be published (escaped JSON or XML).
# Subscribe
This functionality allows to subscribe to an specific datasource and receive all the published information.
```
JSONObject subscription = instance.subscribe("DatasourceID",myCallBack);
```
### Arguments:
* DatasourceID: Datasource granted for subscribtion.
* myCallBack: callback function to receive AEOLIX deliverd messages and control messages.
Each time that a message arrives, the callback will be executed to receive the data message or the control message: see errors [here](#errors).
# PauseSubscription
This operation will allow to stop receiving data from a subscription.
```
pauseSubscription()
```
Specific control messages received through callback control: see errors [here](#errors).
# ContinueSubscription
This operation will allow to re-start receiving data from a subscription that was paused.
```
continueSubscription()
```
Specific control messages received through callback control:see errors [here](#errors).
# Errors
Specific control messages received:
|Code |Message |
|:----:|:--------------------------------:|
|1 |Bad URL |
|3 |Communication Infrastructure Down |
|50 |Communication Infrastructure up |
|201 |Subscription in use |
|202 |You are not subscribed |
|203 |Subscription incorrect |
|250 |You have been subscribed |
|251 |Your subscription has been deleted|
|252 |You have been unsubscribed |
# License
AeolixSDK is licensed under GPL version 3 or later
Copyright (C) 2018 ATOS SPAIN
\ No newline at end of file
This diff is collapsed.
#JAVA SDK changeLog
## Initial release
### Added
- Login method
- Publish method
- Subscribe method
## [0.1.2] - 2018-09-19
### Added
- Refresh token method
### Changed
- Error messages visibility
### Removed
- Unneeded error messages
\ No newline at end of file
# SDK for JAVA
(This repository is part of the AEOLIX platform and contains only the Software Development Toolkit)
## Pre-requisites
First of all you need to get AEOLIX SDK from `GitLab <https://gitlab.atosresearch.eu/ari/AEOLIX-SDK.git>`.
# Instance the SDK
```
AEOLIXSDK instance = new AeolixSDK()
```
# Login
The loging to the AEOLIX platform is made throught the keycloak IDM.
## Login throught Keycloak with username and password
```
AeolixSDK aeolixSDK = new AeolixSDK();
JSONObject login = aeolixSDK.login(data);
```
### Arguments:
* data: login object
```
{
"username":"username",
"password":"pwd",
"type":"user"
}
```
## Login throught Keycloak with token
```
AeolixSDK aeolixSDK = new AeolixSDK();
JSONObject login = aeolixSDK.setToken(newToken);
```
### Arguments:
* Token: string
# Publish
This functionality allows to publish a message.
```[JavaScript]
AeolixSDK aeolixSDK = new AeolixSDK();
JSONObject response = aeolixSDK.publish("MyDatasourceID",data);
```
### Arguments:
* data: String containing the data to be published (escaped JSON or XML).
# Subscribe
This functionality allows to subscribe to an specific datasource and receive all the published information.
```
JSONObject subscription = instance.subscribe("DatasourceID",myCallBack);
```
### Arguments:
* DatasourceID: Datasource granted for subscribtion.
* myCallBack: callback function to receive AEOLIX deliverd messages and control messages.
Each time that a message arrives, the callback will be executed to receive the data message or the control message: see errors [here](#errors).
# PauseSubscription
This operation will allow to stop receiving data from a subscription.
```
pauseSubscription()
```
Specific control messages received through callback control: see errors [here](#errors).
# ContinueSubscription
This operation will allow to re-start receiving data from a subscription that was paused.
```
continueSubscription()
```
Specific control messages received through callback control:see errors [here](#errors).
# Errors
Specific control messages received:
|Code |Message |
|:----:|:--------------------------------:|
|1 |Bad URL |
|3 |Communication Infrastructure Down |
|50 |Communication Infrastructure up |
|201 |Subscription in use |
|202 |You are not subscribed |
|203 |Subscription incorrect |
|250 |You have been subscribed |
|251 |Your subscription has been deleted|
|252 |You have been unsubscribed |
# License
AeolixSDK is licensed under GPL version 3 or later
#JAVA SDK changeLog
## Initial release
### Added
- Login method
- Publish method
- Subscribe method
## [0.1.2] - 2018-09-19
### Added
- Refresh token method
### Changed
- Error messages visibility
### Removed
- Unneeded error messages
## [0.2.0] - 2018-10-01
### Added
- Encryption and decryption functionality
### Changed
- Socket variable scope
# SDK for JAVA
(This repository is part of the AEOLIX platform and contains only the Software Development Toolkit)
## Pre-requisites
First of all you need to get AEOLIX SDK from `GitLab <https://gitlab.atosresearch.eu/ari/AEOLIX-SDK.git>`.
# Instance the SDK
```
AEOLIXSDK instance = new AeolixSDK()
```
# Login
The loging to the AEOLIX platform is made throught the keycloak IDM.
## Login throught Keycloak with username and password
```
AeolixSDK aeolixSDK = new AeolixSDK();
JSONObject login = aeolixSDK.login(data);
```
### Arguments:
* data: login object
```
{
"username":"username",
"password":"pwd",
"type":"user"
}
```
## Login throught Keycloak with token
```
AeolixSDK aeolixSDK = new AeolixSDK();
JSONObject login = aeolixSDK.setToken(newToken);
```
### Arguments:
* Token: string
# Publish
This functionality allows to publish a message.
```[JavaScript]
AeolixSDK aeolixSDK = new AeolixSDK();
JSONObject response = aeolixSDK.publish("MyDatasourceID",data);
```
### Arguments:
* data: String containing the data to be published (escaped JSON or XML).
# Subscribe
This functionality allows to subscribe to an specific datasource and receive all the published information.
```
JSONObject subscription = instance.subscribe("DatasourceID",myCallBack);
```
### Arguments:
* DatasourceID: Datasource granted for subscribtion.
* myCallBack: callback function to receive AEOLIX deliverd messages and control messages.
Each time that a message arrives, the callback will be executed to receive the data message or the control message: see errors [here](#errors).
# PauseSubscription
This operation will allow to stop receiving data from a subscription.
```
pauseSubscription()
```
Specific control messages received through callback control: see errors [here](#errors).
# ContinueSubscription
This operation will allow to re-start receiving data from a subscription that was paused.
```
continueSubscription()
```
Specific control messages received through callback control:see errors [here](#errors).
# Errors
Specific control messages received:
|Code |Message |
|:----:|:--------------------------------:|
|1 |Bad URL |
|3 |Communication Infrastructure Down |
|50 |Communication Infrastructure up |
|201 |Subscription in use |
|202 |You are not subscribed |
|203 |Subscription incorrect |
|250 |You have been subscribed |
|251 |Your subscription has been deleted|
|252 |You have been unsubscribed |
# License
AeolixSDK is licensed under GPL version 3 or later
#JAVA SDK changeLog
## Initial release
### Added
- Login method
- Publish method
- Subscribe method
## [0.1.2] - 2018-09-19
### Added
- Refresh token method
### Changed
- Error messages visibility
### Removed
- Unneeded error messages
## [0.2.0] - 2018-10-01
### Added
- Encryption and decryption functionality
### Changed
- Socket variable scope
## [0.2.1] - 2018-10-09
### Added
- Unsubscribe functionality
# SDK for JAVA
(This repository is part of the AEOLIX platform and contains only the Software Development Toolkit)
## Pre-requisites
First of all you need to get AEOLIX SDK from `GitLab <https://gitlab.atosresearch.eu/ari/AEOLIX-SDK.git>`.
# Instance the SDK
```
AEOLIXSDK instance = new AeolixSDK()
```
# Login
The loging to the AEOLIX platform is made throught the keycloak IDM.
## Login throught Keycloak with username and password
```
AeolixSDK aeolixSDK = new AeolixSDK();
JSONObject login = aeolixSDK.login(data);
```
### Arguments:
* data: login object
```
{
"username":"username",
"password":"pwd",
"type":"user"
}
```
## Login throught Keycloak with token
```
AeolixSDK aeolixSDK = new AeolixSDK();
JSONObject login = aeolixSDK.setToken(newToken);
```
### Arguments:
* Token: string
# Publish
This functionality allows to publish a message.
```[JavaScript]
AeolixSDK aeolixSDK = new AeolixSDK();
JSONObject response = aeolixSDK.publish("MyDatasourceID",data);
```
### Arguments:
* data: String containing the data to be published (escaped JSON or XML).
# Subscribe
This functionality allows to subscribe to an specific datasource and receive all the published information.
```
JSONObject subscription = instance.subscribe("DatasourceID",myCallBack);
```
### Arguments:
* DatasourceID: Datasource granted for subscribtion.
* myCallBack: callback function to receive AEOLIX deliverd messages and control messages.
Each time that a message arrives, the callback will be executed to receive the data message or the control message: see errors [here](#errors).
Specific control messages received through callback control:see errors [here](#errors).
# Unsubscribe
This functionality allows to unsubscribe to an specific subscription.
```.
JSONObject unsubscription = instance.unsubscribe("subscriptionID");
```
### Arguments:
* subscriptionID: subscribtionID returned by the subscription.
# Errors
Specific control messages received:
|Code |Message |
|:----:|:--------------------------------:|
|1 |Bad URL |
|3 |Communication Infrastructure Down |
|50 |Communication Infrastructure up |
|201 |Subscription in use |
|202 |You are not subscribed |
|203 |Subscription incorrect |
|250 |You have been subscribed |
|251 |Your subscription has been deleted|
|252 |You have been unsubscribed |
# License
AeolixSDK is licensed under GPL version 3 or later
#JAVA SDK changeLog
## Initial release
### Added
- Login method
- Publish method
- Subscribe method
## [0.1.2] - 2018-09-19