|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Geography
Represents a set of countries and provides geography-related functionality such as finding the subcountries of a particular country. A subcountry is a region of a country such as a province, state, or territory. This class could be renamed "Geography".
Field Summary | |
---|---|
static java.lang.String |
COUNTRY_PROPS
Key for properties relating to countries (File name without the .properties extension). |
static java.lang.String |
DEFAULT_COUNTRY
Key to indicated that no country has been selected yet. |
static java.lang.String |
SUBCOUNTRY_PROPS_KEY_PREFIX
Prefix for constructing a key to retrieve a map of a country's subcounries. |
Method Summary | |
---|---|
java.util.Map |
getAllSubCountries()
Returns the default map of all subcountries codes and their labels. |
java.util.Map |
getAllSubCountries(java.util.Locale locale)
Returns a localized map of all subcountries codes and their labels. |
java.util.Map |
getAvailableSubCountries()
Return the available subcountries based on the specified list of available regions set using the setAvailableRegions method. |
java.util.Map |
getCountries()
Returns the default map of countries where key = the country code and the value is the label for the country. |
java.util.Map |
getCountries(java.util.Locale locale)
Returns a localize map of countries where key = the country code and the value is the label for the country. |
java.util.Map |
getCountry2SubCountries()
Return the default map of countryCode to subcountries codes/labels mapping. |
java.util.Map |
getCountry2SubCountries(java.util.Locale locale)
Return a localized map of countryCode to subcountries codes/labels mapping. |
java.util.Map |
getCountry2SubCountriesMap()
Return the default map of countryCode to subcountries codes/labels mapping. |
java.util.Map |
getSubCountries(java.lang.String countryCode)
Return the default map of subcountries codes and their labels for the country with the given ISO country code. |
java.util.Map |
getSubCountries(java.lang.String countryCode,
java.util.Locale locale)
Return a localized map of subcountries codes and their labels for the country with the given ISO country code. |
void |
setAvailableRegions(java.util.List regions)
Set the ShippingRegion s that define the set of available countries and subcountries. |
void |
setPropertiesMap(java.util.Map propertiesMap)
Set the properties files that are used as a source of Country and SubCountry data. |
Methods inherited from interface com.elasticpath.domain.EpDomain |
---|
getElasticPath, setElasticPath |
Field Detail |
---|
static final java.lang.String COUNTRY_PROPS
static final java.lang.String DEFAULT_COUNTRY
static final java.lang.String SUBCOUNTRY_PROPS_KEY_PREFIX
Method Detail |
---|
java.util.Map getAllSubCountries()
java.util.Map getAllSubCountries(java.util.Locale locale)
locale
- the current locale
java.util.Map getAvailableSubCountries()
setAvailableRegions
method.
Map
of subcountry codes to subcountry display namesjava.util.Map getCountries()
java.util.Map getCountries(java.util.Locale locale)
locale
- the current locale
java.util.Map getCountry2SubCountries()
java.util.Map getCountry2SubCountries(java.util.Locale locale)
locale
- the current locale
java.util.Map getCountry2SubCountriesMap()
java.util.Map getSubCountries(java.lang.String countryCode)
countryCode
- -
ISO country code
java.util.Map getSubCountries(java.lang.String countryCode, java.util.Locale locale)
locale
- the current localecountryCode
- -
ISO country code
void setAvailableRegions(java.util.List regions)
ShippingRegion
s that define the set of available countries and subcountries.
regions
- a List of ShippingRegion
svoid setPropertiesMap(java.util.Map propertiesMap)
propertiesMap
- the map containing properties data about countries.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |