|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.domain.impl.AbstractEpDomainImpl com.elasticpath.domain.impl.AbstractTransientImpl com.elasticpath.domain.misc.impl.GeographyImpl
public class GeographyImpl
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. Assumptions: - The country and subcountry properties do not change at runtime.
Field Summary |
---|
Fields inherited from class com.elasticpath.domain.impl.AbstractTransientImpl |
---|
serialVersionUID |
Fields inherited from interface com.elasticpath.domain.misc.Geography |
---|
COUNTRY_PROPS, DEFAULT_COUNTRY, SUBCOUNTRY_PROPS_KEY_PREFIX |
Constructor Summary | |
---|---|
GeographyImpl()
|
Method Summary | |
---|---|
java.util.Map |
getAllSubCountries()
Returns the default map of subcountries codes and their labels. |
java.util.Map |
getAllSubCountries(java.util.Locale locale)
Returns a localized map of subcountry codes and their localized 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 a map of countries where the keys are country codes and the values are labels for the corresponding country. |
java.util.Map |
getCountries(java.util.Locale locale)
Returns a map of countries where the keys are country codes and the values are localized labels for the corresponding locale & country. |
java.util.Map |
getCountry2SubCountries()
Return a map of countryCode to subcountries codes/labels mapping. |
java.util.Map |
getCountry2SubCountries(java.util.Locale locale)
Return a 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 (file) map that is used as a source of Country data. |
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl |
---|
getElasticPath, setElasticPath |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.elasticpath.domain.EpDomain |
---|
getElasticPath, setElasticPath |
Constructor Detail |
---|
public GeographyImpl()
Method Detail |
---|
public java.util.Map getAllSubCountries()
getAllSubCountries
in interface Geography
public java.util.Map getAllSubCountries(java.util.Locale locale)
getAllSubCountries
in interface Geography
locale
- the current locale
public java.util.Map getAvailableSubCountries()
setAvailableRegions
method.
getAvailableSubCountries
in interface Geography
Map
of subcountry codes to subcountry display namespublic java.util.Map getCountries()
getCountries
in interface Geography
public java.util.Map getCountries(java.util.Locale locale)
getCountries
in interface Geography
locale
- the current locale to load
public java.util.Map getCountry2SubCountries()
getCountry2SubCountries
in interface Geography
public java.util.Map getCountry2SubCountries(java.util.Locale locale)
getCountry2SubCountries
in interface Geography
locale
- the current locale
public java.util.Map getCountry2SubCountriesMap()
getCountry2SubCountriesMap
in interface Geography
public java.util.Map getSubCountries(java.lang.String countryCode)
getSubCountries
in interface Geography
countryCode
- ISO country code
public java.util.Map getSubCountries(java.lang.String countryCode, java.util.Locale locale)
getSubCountries
in interface Geography
countryCode
- ISO country codelocale
- the current locale
public void setAvailableRegions(java.util.List regions)
ShippingRegion
s that define the set of available countries and subcountries.
setAvailableRegions
in interface Geography
regions
- a List of ShippingRegion
spublic void setPropertiesMap(java.util.Map propertiesMap)
setPropertiesMap
in interface Geography
propertiesMap
- the map containing properties data about countries.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |