Class CountryEndpoint


  • @FrameworkRestController
    @FrameworkMapping("/countries")
    @DataRouteByExample(ISOCountry.class)
    public class CountryEndpoint
    extends Object
    Temporary endpoint to retrieve a list of ISO countries for use in admin. This is planned to be its own service so we have a single source for this data, because right now it's peppered throughout the framework where addresses are used.

    Choosing this route to minimize the work when migrating to the actual implementation.

    • Constructor Detail

      • CountryEndpoint

        public CountryEndpoint()
    • Method Detail

      • readCountry

        @FrameworkGetMapping("/{alpha2}")
        public ISOCountry readCountry​(@PathVariable("alpha2")
                                      String alpha2)
      • readStateProvinceRegionsForCountry

        @FrameworkGetMapping("/{alpha2}/stateProvinceRegion")
        public List<String> readStateProvinceRegionsForCountry​(@PathVariable("alpha2")
                                                               String alpha2)
      • initializeCountries

        protected void initializeCountries()
      • readStateProvinceRegions

        protected Map<String,​List<String>> readStateProvinceRegions​(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      • readCountries

        protected Map<String,​ISOCountry> readCountries​(com.fasterxml.jackson.databind.ObjectMapper objectMapper)