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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected Map<String,
ISOCountry> readCountries
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) readCountry
(String alpha2) readStateProvinceRegions
(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Field Details
-
BASE_URI
- See Also:
-
-
Constructor Details
-
CountryEndpoint
public CountryEndpoint()
-
-
Method Details
-
readAllCountries
-
readCountry
@FrameworkGetMapping("/{alpha2}") public ISOCountry readCountry(@PathVariable("alpha2") String alpha2) -
readStateProvinceRegionsForCountry
-
initializeCountries
protected void initializeCountries() -
readStateProvinceRegions
-
readCountries
protected Map<String,ISOCountry> readCountries(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-