java.lang.Object
de.hybris.platform.commerceservices.storefinder.helpers.impl.DefaultDistanceHelper
All Implemented Interfaces:
DistanceHelper

public class DefaultDistanceHelper extends Object implements DistanceHelper
  • Field Details

    • IMPERIAL_DISTANCE_RATIO

      public static final double IMPERIAL_DISTANCE_RATIO
      See Also:
  • Constructor Details

    • DefaultDistanceHelper

      public DefaultDistanceHelper()
  • Method Details

    • getDistanceUnit

      protected String getDistanceUnit(DistanceUnit distanceUnit)
    • getDistance

      protected Double getDistance(DistanceUnit distanceUnit, double distanceInKm)
    • getDistanceStringForStore

      public String getDistanceStringForStore(BaseStoreModel baseStoreModel, double distanceInKm)
      Description copied from interface: DistanceHelper
      Gets 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:
      getDistanceStringForStore in interface DistanceHelper
      Parameters:
      baseStoreModel - the base store model that provide distance unit
      distanceInKm - the distance in km
      Returns:
      the calculated distance string
    • getDistanceStringForLocation

      public String getDistanceStringForLocation(String locationName, double distanceInKm)
      Description copied from interface: DistanceHelper
      Gets 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:
      getDistanceStringForLocation in interface DistanceHelper
      Parameters:
      locationName - the location name
      distanceInKm - the distance in km
      Returns:
      the calculated distance string
    • getPointOfServiceService

      protected PointOfServiceService getPointOfServiceService()
    • setPointOfServiceService

      public void setPointOfServiceService(PointOfServiceService pointOfServiceService)
    • getEnumerationService

      protected EnumerationService getEnumerationService()
    • setEnumerationService

      public void setEnumerationService(EnumerationService enumerationService)