Class DefaultMarketService
java.lang.Object
de.hybris.platform.unifieduibackofficeservices.service.impl.DefaultMarketService
- All Implemented Interfaces:
MarketService
This service will provide integration with the pros api to call markets related api's and create respective type in hybris
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancreateMarket(Market market) This method creates a market in prosprotected org.springframework.web.client.RestTemplateprotected de.hybris.platform.servicelayer.config.ConfigurationServiceThis method returns the market by market code and username by calling pros service.protected StringThis method return the market end point as configured.getMarkets(Map<String, Object> searchFilterMap) This method returns the buckets by calling pros service.protected StringThis method return the pros server end point as configured.booleanremoveMarket(Market market) This method removes the market by calling pros service.voidsetBackofficeRestTemplate(org.springframework.web.client.RestTemplate backofficeRestTemplate) voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) booleanupdateMarket(Market market) This method updates marked in pros
-
Field Details
-
GET_MARKET_ENDPOINT
- See Also:
-
-
Constructor Details
-
DefaultMarketService
public DefaultMarketService()
-
-
Method Details
-
getMarkets
This method returns the buckets by calling pros service.- Specified by:
getMarketsin interfaceMarketService- Parameters:
searchFilterMap- the map of filters to apply to the request the list of markets- Returns:
- list of markets
-
removeMarket
public boolean removeMarket(Market market) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.ResourceAccessException This method removes the market by calling pros service.- Specified by:
removeMarketin interfaceMarketService- Parameters:
market- the market- Returns:
- the boolean, return true if market is removed in pros
- Throws:
org.springframework.web.client.HttpServerErrorException- the exception when http response is not 200org.springframework.web.client.ResourceAccessException- the resource is not accessible exception
-
getProsEndpoint
This method return the pros server end point as configured.- Returns:
- the pros end point
-
getMarketEndpoint
This method return the market end point as configured.- Returns:
- the market end point
-
createMarket
public boolean createMarket(Market market) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.ResourceAccessException Description copied from interface:MarketServiceThis method creates a market in pros- Specified by:
createMarketin interfaceMarketService- Parameters:
market- the market- Returns:
- the boolean, return true if market is created in pros else return false
- Throws:
org.springframework.web.client.HttpServerErrorException- the exception when http response is not 200org.springframework.web.client.ResourceAccessException- the resource is not accessible exception
-
updateMarket
Description copied from interface:MarketServiceThis method updates marked in pros- Specified by:
updateMarketin interfaceMarketService- Parameters:
market- the market- Returns:
- the boolean, return true if market is updated in pros else return false
-
getMarket
Description copied from interface:MarketServiceThis method returns the market by market code and username by calling pros service.- Specified by:
getMarketin interfaceMarketService- Parameters:
market- the market- Returns:
- the market
-
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()- Returns:
- the configurationService
-
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) - Parameters:
configurationService- the configurationService to set
-
getBackofficeRestTemplate
protected org.springframework.web.client.RestTemplate getBackofficeRestTemplate()- Returns:
- the backofficeRestTemplate
-
setBackofficeRestTemplate
public void setBackofficeRestTemplate(org.springframework.web.client.RestTemplate backofficeRestTemplate) - Parameters:
backofficeRestTemplate- the backofficeRestTemplate to set
-