Class TrustedListData

java.lang.Object
proseccoCoding.TLN.model.TrustedListData

public class TrustedListData extends Object
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 Details

    • countries

      private HashMap<String,Country> countries
      Hashmap containing all the countries objects
  • Constructor Details

    • TrustedListData

      public TrustedListData()
      Constructor for TrustedListData. Initializes the countries
  • Method Details

    • getCountry

      public Country getCountry(String countryCode)
      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

      public ArrayList<Country> getCountries(ArrayList<String> countryCodes)
      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

      public ArrayList<javafx.util.Pair<String,String>> 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.