Group: ProseccoCoding Members:
- Alberto Guerrini
- Mattia Toffolon
- Francesco Stella
- Filippo D'Emilio
- Complete Javadoc documentation can be found here.
- System Design document can be found here.
- Complete Testing report document can be found here.
- JUnit test report can be found here.
Here it is described in few steps how to run this application and how to properly use it.
- Your environment must have a Java VM installed, if it haven't it you can download it from here.
- Your system must have an internet connection (:memo: Note: be aware that the response time of this application depends on the connection data-rate)
- You must have this repository on your local sistem. There are two ways to achieve that:
- Clone it on your system moving in your preferred local folder and entering in your terminal
$ git clone https://github.com/mattia-toffolon/Trusted-List-Navigation.git
(you must have git installed). - Or download it as zip from the green button on the top right of this page, unzip and open the unzipped folder (no additional software required).
- Clone it on your system moving in your preferred local folder and entering in your terminal
Note that the .jar file is cross-platform compiled, so it would run in all common platforms (Windows, Linux, MacOS).
- Firstly you have to move in the base directory (where is located the
.jar
file) and open a terminal on it. - Then you have to type
$ java -jar Trusted-List-Navigation.jar
to launch the Java application.
📝 Note: In case of not working internet connection or EU trusted data's server fault can be displayed an error before the application launch. In this case you should try again from point 2. - Finally, if no error occurs the application should display home view.
1. View EU country list
- In the home view you can find the button See the list of the EU Countries and press it.
- The application should display the complete list of EU countries and a button to return to the homepage.
2. View service types list
- As for countries, in the home view you can find the button See the list of the Trust-Service types and press it.
- The application should display the complete list of EU service types and a button to return to the homepage.
-
In the home view you can find the button Start a new query and press it.
-
The application should display the first selection page: Country selection:
Here you can select all your preferred countries or all countries using Select all checkbox and press Next to go on trough the query.
(:warning: Warning: you must select at least one country). -
The application should display the first selection page: Provider selection:
Here you can select all your preferred providers or all providers using Select all checkbox and press Next to go on trough the query.
If you want to change the previous selection you can press the Back button.
(:warning: Warning: you must select at least one provider). -
The application should display the second selection page: Service type selection:
Here you can select all your preferred service types or all types using Select all checkbox and press Next to go on trough the query.
If you want to change the previous selection you can press the Back button.
(:warning: Warning: you must select at least one service type). -
The application should display the third selection page: Service status selection:
Here you can select all your preferred service status or all status using Select all checkbox and press Start to display the results.
If you want to change the previous selection you can press the Back button.
(:warning: Warning: you must select at least one service status). -
Finally the application should display the result page:
Here are listed all the services that meet all the selections that you made.
Now you can go back to one of the selection page with the Back button or end the query and display the homepage pressing the Home button. -
⚠️ Warning: In some cases, like when you try to go to the next selection page without having no checkboxes selected, an error message like this is displayed:
To continue the query parameter selection you must close this alert window, otherwise it is not possible to interact with the main window.
-
❌ Error: In case of connection errors, the user comes across an alert window like this one below
To use correctly the application the User is required to close this window, check his internet connection and restart the application. If the error continues to come up, the API services may be unvailable and so the user has to try again later.
This application interacts with the EU Trusted List API to retrieve EU Trust Services data and provide useful search and display functions to analize EU Trusted Services data.
The API interaction is done over http protocols at application launch time. One call is made to retrieve countries codes and names (using /tl-browser/api/v1/search/countries_list service), and the other is made to retrieve all the providers and services for each european country (using
/tl-browser/api/v1/search/tsp_list service).
The calls to the API services return data that can be saved in json format. This data is stored as JSONObject and parsed into Country, Provider, Service, ServiceType objects only if it's needed. In this way only two http calls are made so that their time overhead is reduced at the minimum.
Moreover only needed countries are parsed in specific objects so that the time and space complexity is reduced at the lowest level. It is important to note that a country with its complete data is parsed into specific objects only one time because after that it's kept in case of future usage.
In specific, a country complete data (in json format) is parsed in a Country object that contains a collection of Provider objects and every provider contains its Service objects as values in a multimap using as keys their ServiceType. By doing that we can obtain a minimal time complexity to retrieve services by type.
Every Service object contains attributes for country, provider, type and status.
The query management has been implemented so that when the user starts a new search a Query object is created. This query contains all the selected Country objects (with all their data), and for each selection the user makes, it computes and stores a subset of informations from the initial set of countries trusted data that matches the user selection. At the end of all the selections, the list of services that meets the user requests can be calculated and shown to the user.
The countries and service types names visualization instead, has been implementated so that no objects are need to be created. What is needed is only a call to a specific method that parses the JSONObjects, that were previously retrieved, and returns an ArrayList containg the requested data saved as String objects.
- org.openjfx libraries to build the graphical user interface
- org.json library to handle json data retrieved from the API services
- com.google.guava libraries used only for the MultiMap implementation for storing services in provider class
- org.junit library used for unit class testing
- For the dependencies management, running configuration and software lifecycle management this project uses maven.
- For the unique cross-platform .jar building it has been used maven shade plugin.