Class DefaultDistanceHelper
java.lang.Object
de.hybris.platform.commercefacades.storelocator.helpers.impl.DefaultDistanceHelper
- All Implemented Interfaces:
DistanceHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DoublegetDistance(DistanceUnit distanceUnit, double distanceInKm) getDistanceStringForLocation(String locationName, double distanceInKm) Gets the distance string for given distance value and the distance unit that is set in corresponding base store model.getDistanceStringForStore(BaseStoreModel baseStoreModel, double distanceInKm) Gets the distance string for given distance value and the distance unit that is set in the base store model.protected StringgetDistanceUnit(DistanceUnit distanceUnit) protected EnumerationServiceprotected PointOfServiceServicevoidsetEnumerationService(EnumerationService enumerationService) voidsetPointOfServiceService(PointOfServiceService pointOfServiceService)
-
Field Details
-
IMPERIAL_DISTANCE_RATIO
public static final double IMPERIAL_DISTANCE_RATIO- See Also:
-
-
Constructor Details
-
DefaultDistanceHelper
public DefaultDistanceHelper()
-
-
Method Details
-
getDistanceUnit
-
getDistance
-
getDistanceStringForStore
Description copied from interface:DistanceHelperGets the distance string for given distance value and the distance unit that is set in the base store model. In no distance unit is set in the store model default 'km' is assumed.- Specified by:
getDistanceStringForStorein interfaceDistanceHelper- Parameters:
baseStoreModel- the base store model that provide distance unitdistanceInKm- the distance in km- Returns:
- the calculated distance string
-
getDistanceStringForLocation
Description copied from interface:DistanceHelperGets the distance string for given distance value and the distance unit that is set in corresponding base store model. If no distance unit is set in the store model default 'km' is assumed.- Specified by:
getDistanceStringForLocationin interfaceDistanceHelper- Parameters:
locationName- the location namedistanceInKm- the distance in km- Returns:
- the calculated distance string
-
getPointOfServiceService
-
setPointOfServiceService
-
getEnumerationService
-
setEnumerationService
-