Class DefaultCustomerLocationService
java.lang.Object
de.hybris.platform.acceleratorservices.customer.impl.DefaultCustomerLocationService
- All Implemented Interfaces:
CustomerLocationService
Default implementation of
CustomerLocationService-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculateDistance(GeoPoint origin, PointOfServiceModel pointOfServiceModel) Calculates distance between given origin point and given point of service data objectprotected AddressDatagenerateGeoAddressForSearchQuery(BaseStoreModel baseStore, String locationText) protected BaseStoreServiceprotected GeoPointgetCachedGPS(String locationName) protected GeoWebServiceWrapperprotected GeoPointgetLocationForSearchTerm(String searchTerm) protected SessionServiceReturns user stored location or null if no location found for current session user.protected voidsaveGPSToCache(GeoPoint gps, String locationName) voidsetBaseStoreService(BaseStoreService baseStoreService) voidsetGeoWebServiceWrapper(GeoWebServiceWrapper geoWebServiceWrapper) voidsetSessionService(SessionService sessionService) voidsetUserLocation(UserLocationData userLocationData) Stores the information of user location.
-
Field Details
-
SESSION_USER_LOCATION_KEY
- See Also:
-
SESSION_LOCATIONS_CACHE_KEY
- See Also:
-
SESSION_NEAREST_STORES_KEY
- See Also:
-
-
Constructor Details
-
DefaultCustomerLocationService
public DefaultCustomerLocationService()
-
-
Method Details
-
getBaseStoreService
-
setBaseStoreService
-
getGeoWebServiceWrapper
-
setGeoWebServiceWrapper
-
getSessionService
-
setSessionService
-
getUserLocation
Description copied from interface:CustomerLocationServiceReturns user stored location or null if no location found for current session user.- Specified by:
getUserLocationin interfaceCustomerLocationService- Returns:
- stored location
-
setUserLocation
Description copied from interface:CustomerLocationServiceStores the information of user location. If search term is given, but gps is null it tries to determine GPS coordinates for the given search term.- Specified by:
setUserLocationin interfaceCustomerLocationService- Parameters:
userLocationData- user location data to be stored.
-
calculateDistance
Description copied from interface:CustomerLocationServiceCalculates distance between given origin point and given point of service data object- Specified by:
calculateDistancein interfaceCustomerLocationService- Parameters:
origin- origin pointpointOfServiceModel- point of service details- Returns:
- distance between given points
-
getLocationForSearchTerm
-
getCachedGPS
-
saveGPSToCache
-
generateGeoAddressForSearchQuery
protected AddressData generateGeoAddressForSearchQuery(BaseStoreModel baseStore, String locationText)
-