java.lang.Object
de.hybris.platform.unifieduibackofficeservices.service.impl.DefaultMarketService
All Implemented Interfaces:
MarketService

public class DefaultMarketService extends Object implements MarketService
This service will provide integration with the pros api to call markets related api's and create respective type in hybris
  • Field Details

  • Constructor Details

    • DefaultMarketService

      public DefaultMarketService()
  • Method Details

    • getMarkets

      public List<Market> getMarkets(Map<String,Object> searchFilterMap)
      This method returns the buckets by calling pros service.
      Specified by:
      getMarkets in interface MarketService
      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:
      removeMarket in interface MarketService
      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 200
      org.springframework.web.client.ResourceAccessException - the resource is not accessible exception
    • getProsEndpoint

      protected String getProsEndpoint()
      This method return the pros server end point as configured.
      Returns:
      the pros end point
    • getMarketEndpoint

      protected String 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: MarketService
      This method creates a market in pros
      Specified by:
      createMarket in interface MarketService
      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 200
      org.springframework.web.client.ResourceAccessException - the resource is not accessible exception
    • updateMarket

      public boolean updateMarket(Market market)
      Description copied from interface: MarketService
      This method updates marked in pros
      Specified by:
      updateMarket in interface MarketService
      Parameters:
      market - the market
      Returns:
      the boolean, return true if market is updated in pros else return false
    • getMarket

      public Market getMarket(Market market)
      Description copied from interface: MarketService
      This method returns the market by market code and username by calling pros service.
      Specified by:
      getMarket in interface MarketService
      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