Package proseccoCoding.TLN.model
Class TrustedListData
java.lang.Object
proseccoCoding.TLN.model.TrustedListData
This class wraps all the objects that represents EU trusted entities (country, provider, service).
In fact an object of this class contains a set of countries that contains providers that contains services.
At the time of construction this object is automatically populated using @{link APIHandler.retrieveCountries} method
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCountries
(ArrayList<String> countryCodes) Returns a list of country objects filled with data which code is contained in the given parameter listgetCountry
(String countryCode) return the Country object representing the country which code is specified as parameterReturns a list containing names and codes of each country.
-
Field Details
-
countries
Hashmap containing all the countries objects
-
-
Constructor Details
-
TrustedListData
public TrustedListData()Constructor for TrustedListData. Initializes the countries
-
-
Method Details
-
getCountry
return the Country object representing the country which code is specified as parameter- Parameters:
the
- code of the country to return, upper or lower case- Returns:
- the Country object associated with the parameter code, or null if the code hasn't been found
- Throws:
IllegalArgumentException
- if the parameter is null
-
getCountries
Returns a list of country objects filled with data which code is contained in the given parameter list- Parameters:
countryCodes
- an ArrayList of Strings that contains the country codes- Returns:
- an ArrayList of country objects filled with data which code is contained in the given parameter list
- Throws:
IllegalArgumentException
- if the parameter is null or empty
-
printCountries
Returns a list containing names and codes of each country.- Returns:
- an ArrayList of Pair<String, String> composed by country code as first value and country name as second value. Each pair represents a country.
-