com.elasticpath.sfweb.ajax.service.impl
Class GeographyControllerImpl

java.lang.Object
  extended by com.elasticpath.sfweb.ajax.service.impl.GeographyControllerImpl
All Implemented Interfaces:
GeographyController

public class GeographyControllerImpl
extends java.lang.Object
implements GeographyController

Provides geography related services for ajax.


Constructor Summary
GeographyControllerImpl()
           
 
Method Summary
 Geography getGeography()
          Returns the Geography instance.
 RequestHelper getRequestHelper()
          Returns the request helper.
 java.util.Map getSubCountries(java.lang.String countryCode, javax.servlet.http.HttpServletRequest request)
          Returns a map of all subcountries within a particular country.
 void setGeography(Geography geography)
          Sets the Geography instance.
 void setRequestHelper(RequestHelper requestHelper)
          Sets the request helper.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeographyControllerImpl

public GeographyControllerImpl()
Method Detail

getGeography

public Geography getGeography()
Returns the Geography instance.

Returns:
Geography instance

getRequestHelper

public RequestHelper getRequestHelper()
Returns the request helper.

Returns:
the request helper

getSubCountries

public java.util.Map getSubCountries(java.lang.String countryCode,
                                     javax.servlet.http.HttpServletRequest request)
Returns a map of all subcountries within a particular country. If no locale is matched default values are returned.

Specified by:
getSubCountries in interface GeographyController
Parameters:
countryCode - ISO two letter country code (ex: US)
request - the request object containing the shopping cart
Returns:
map containing keys and localized values of all available subcountries

setGeography

public void setGeography(Geography geography)
Sets the Geography instance.

Parameters:
geography - the Geography instance

setRequestHelper

public void setRequestHelper(RequestHelper requestHelper)
Sets the request helper.

Parameters:
requestHelper - the request helper.