Class CountryEndpoint

java.lang.Object
com.broadleafcommerce.customer.web.endpoint.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.

  • Field Details

  • Constructor Details

    • CountryEndpoint

      public CountryEndpoint()
  • Method Details

    • readAllCountries

      @FrameworkGetMapping public Collection<ISOCountry> readAllCountries()
    • 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)