Interface CustomerLocationService
-
- All Known Implementing Classes:
DefaultCustomerLocationService
public interface CustomerLocationServiceDefines an API to handle a user's location
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doublecalculateDistance(GeoPoint origin, PointOfServiceModel pointOfServiceModel)Calculates distance between given origin point and given point of service data objectUserLocationDatagetUserLocation()Returns user stored location or null if no location found for current session user.voidsetUserLocation(UserLocationData userLocationData)Stores the information of user location.
-
-
-
Method Detail
-
setUserLocation
void setUserLocation(UserLocationData userLocationData)
Stores 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.- Parameters:
userLocationData-
-
getUserLocation
UserLocationData getUserLocation()
Returns user stored location or null if no location found for current session user.- Returns:
- stored location
-
calculateDistance
double calculateDistance(GeoPoint origin, PointOfServiceModel pointOfServiceModel)
Calculates distance between given origin point and given point of service data object- Parameters:
origin-pointOfServiceModel-- Returns:
- distance between given points
-
-