Class DefaultMarketBucketService
java.lang.Object
de.hybris.platform.unifieduibackofficeservices.service.impl.DefaultMarketBucketService
- All Implemented Interfaces:
MarketBucketService
This service will provide integration with the pros api to call market buckets related api's
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancreateMarketBucket(MarketBucket marketBucket) This method creates market bucket in prosprotected org.springframework.web.client.RestTemplateprotected de.hybris.platform.servicelayer.config.ConfigurationServicegetMarketBucket(MarketBucket marketBucket) This method returns the MarketBucket by marketBucketEntityId and username by calling pros service.protected StringThis method return the market bucket end point as configured.getMarketBuckets(Map<String, Object> searchFilterMap) This method returns the market buckets by calling pros service.protected StringThis method return the pros server end point as configured.booleanremoveMarket(MarketBucket marketBucket) This method removes the market bucket by calling pros service.voidsetBackofficeRestTemplate(org.springframework.web.client.RestTemplate backofficeRestTemplate) voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) booleanupdateMarketBucket(MarketBucket marketBucket) This method updates marketBucket in pros
-
Field Details
-
GET_MARKET_BUCKET_ENDPOINT
- See Also:
-
DETAIL_RESPONSE_REQUEST_PARAMETER
- See Also:
-
-
Constructor Details
-
DefaultMarketBucketService
public DefaultMarketBucketService()
-
-
Method Details
-
getMarketBuckets
This method returns the market buckets by calling pros service.- Specified by:
getMarketBucketsin interfaceMarketBucketService- Parameters:
searchFilterMap- the map of filters to apply to the request- Returns:
- list of market bucket
-
removeMarket
public boolean removeMarket(MarketBucket marketBucket) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.ResourceAccessException This method removes the market bucket by calling pros service.- Specified by:
removeMarketin interfaceMarketBucketService- Parameters:
marketBucket- the marketBucket- Returns:
- the boolean, return true if market bucket 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
-
createMarketBucket
public boolean createMarketBucket(MarketBucket marketBucket) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException This method creates market bucket in pros- Specified by:
createMarketBucketin interfaceMarketBucketService- Parameters:
marketBucket- the marketBucket- Returns:
- the boolean, return true if market bucket is created in pros else return false
- Throws:
org.springframework.web.client.HttpServerErrorException- the exception when http response is not 200 e.g. status 5xxorg.springframework.web.client.HttpClientErrorException- the exception when http response is not 200 e.g. status 4xxorg.springframework.web.client.ResourceAccessException- the resource is not accessible exception
-
getMarketBucket
This method returns the MarketBucket by marketBucketEntityId and username by calling pros service.- Specified by:
getMarketBucketin interfaceMarketBucketService- Parameters:
marketBucket- the marketBucket- Returns:
- the MarketBucket
-
updateMarketBucket
public boolean updateMarketBucket(MarketBucket marketBucket) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException This method updates marketBucket in pros- Specified by:
updateMarketBucketin interfaceMarketBucketService- Parameters:
marketBucket- the marketBucket- Returns:
- the boolean, return true if marketBucket is updated in pros
- Throws:
org.springframework.web.client.HttpServerErrorException- the exception when http response is not 200 e.g. status 5xxorg.springframework.web.client.HttpClientErrorException- the exception when http response is not 200 e.g. status 4xxorg.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
-
getMarketBucketEndpoint
This method return the market bucket end point as configured.- Returns:
- the market end point
-
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
-