public class DefaultCustomerLocationService extends java.lang.Object implements CustomerLocationService
CustomerLocationService| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SESSION_LOCATIONS_CACHE_KEY |
static java.lang.String |
SESSION_NEAREST_STORES_KEY |
static java.lang.String |
SESSION_USER_LOCATION_KEY |
| Constructor and Description |
|---|
DefaultCustomerLocationService() |
| Modifier and Type | Method and Description |
|---|---|
double |
calculateDistance(GeoPoint origin,
PointOfServiceModel pointOfServiceModel)
Calculates distance between given origin point and given point of service data object
|
protected AddressData |
generateGeoAddressForSearchQuery(BaseStoreModel baseStore,
java.lang.String locationText) |
protected BaseStoreService |
getBaseStoreService() |
protected GeoPoint |
getCachedGPS(java.lang.String locationName) |
protected GeoWebServiceWrapper |
getGeoWebServiceWrapper() |
protected GeoPoint |
getLocationForSearchTerm(java.lang.String searchTerm) |
protected SessionService |
getSessionService() |
UserLocationData |
getUserLocation()
Returns user stored location or null if no location found for current session user.
|
protected void |
saveGPSToCache(GeoPoint gps,
java.lang.String locationName) |
void |
setBaseStoreService(BaseStoreService baseStoreService) |
void |
setGeoWebServiceWrapper(GeoWebServiceWrapper geoWebServiceWrapper) |
void |
setSessionService(SessionService sessionService) |
void |
setUserLocation(UserLocationData userLocationData)
Stores the information of user location.
|
public static final java.lang.String SESSION_USER_LOCATION_KEY
public static final java.lang.String SESSION_LOCATIONS_CACHE_KEY
public static final java.lang.String SESSION_NEAREST_STORES_KEY
protected BaseStoreService getBaseStoreService()
public void setBaseStoreService(BaseStoreService baseStoreService)
protected GeoWebServiceWrapper getGeoWebServiceWrapper()
public void setGeoWebServiceWrapper(GeoWebServiceWrapper geoWebServiceWrapper)
protected SessionService getSessionService()
public void setSessionService(SessionService sessionService)
public UserLocationData getUserLocation()
CustomerLocationServicegetUserLocation in interface CustomerLocationServicepublic void setUserLocation(UserLocationData userLocationData)
CustomerLocationServicesetUserLocation in interface CustomerLocationServicepublic double calculateDistance(GeoPoint origin, PointOfServiceModel pointOfServiceModel)
CustomerLocationServicecalculateDistance in interface CustomerLocationServiceprotected GeoPoint getLocationForSearchTerm(java.lang.String searchTerm)
protected GeoPoint getCachedGPS(java.lang.String locationName)
protected void saveGPSToCache(GeoPoint gps, java.lang.String locationName)
protected AddressData generateGeoAddressForSearchQuery(BaseStoreModel baseStore, java.lang.String locationText)
Copyright © 2018 SAP SE. All Rights Reserved.