Class DefaultGeolocationDirectionsUrlBuilder
- java.lang.Object
-
- de.hybris.platform.storelocator.route.impl.DefaultGeolocationDirectionsUrlBuilder
-
- All Implemented Interfaces:
GeolocationDirectionsUrlBuilder
public class DefaultGeolocationDirectionsUrlBuilder extends java.lang.Object implements GeolocationDirectionsUrlBuilder
Builds GET directions URL according to google maps API.
-
-
Constructor Summary
Constructors Constructor Description DefaultGeolocationDirectionsUrlBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringaddressData2String(AddressData addressData)protected java.lang.StringformatCoordinates(GPS coordinates)protected java.lang.StringgetMode()protected java.lang.StringgetResponseType()java.lang.StringgetWebServiceUrl(java.lang.String baseUrl, AddressData startAddress, AddressData destinationAddress, java.util.Map params)Builds url for web service serving directions from start address to destination address.java.lang.StringgetWebServiceUrl(java.lang.String baseUrl, GPS start, GPS destination, java.util.Map params)Builds url for web service serving directions from start coordinates to destination coordinates.protected booleanisSensor()voidsetMode(java.lang.String mode)voidsetResponseType(java.lang.String responseType)voidsetSensor(boolean sensor)
-
-
-
Method Detail
-
getWebServiceUrl
public java.lang.String getWebServiceUrl(java.lang.String baseUrl, GPS start, GPS destination, java.util.Map params)Description copied from interface:GeolocationDirectionsUrlBuilderBuilds url for web service serving directions from start coordinates to destination coordinates.- Specified by:
getWebServiceUrlin interfaceGeolocationDirectionsUrlBuilder- Parameters:
baseUrl- - base address of the web serviceparams- additional parameters.
-
getWebServiceUrl
public java.lang.String getWebServiceUrl(java.lang.String baseUrl, AddressData startAddress, AddressData destinationAddress, java.util.Map params)Description copied from interface:GeolocationDirectionsUrlBuilderBuilds url for web service serving directions from start address to destination address.- Specified by:
getWebServiceUrlin interfaceGeolocationDirectionsUrlBuilder- Parameters:
baseUrl- - base address of the web serviceparams- additional parameters.
-
getMode
protected java.lang.String getMode()
-
isSensor
protected boolean isSensor()
-
getResponseType
protected java.lang.String getResponseType()
-
formatCoordinates
protected java.lang.String formatCoordinates(GPS coordinates)
-
setSensor
public void setSensor(boolean sensor)
-
setMode
public void setMode(java.lang.String mode)
-
setResponseType
public void setResponseType(java.lang.String responseType)
-
addressData2String
protected java.lang.String addressData2String(AddressData addressData) throws java.io.UnsupportedEncodingException
- Throws:
java.io.UnsupportedEncodingException
-
-