Interface ModificationService

All Known Implementing Classes:
DefaultModificationService

public interface ModificationService
The merchandising Modification Service interface to call the api for get, edit and remove the modification.
  • Method Details

    • getModifications

      ModificationsResponseData getModifications(Integer pageNumber, String sortDir, Map<String,Object> searchFilterMap)
      This method returns the list of available modification in pros.
      Parameters:
      pageNumber - the page Number to handle the pagination
      sortDir - the direction of the sort: ascendent or descendent or null, null for default sorting
      searchFilterMap - the map of filters to apply to the request
      Returns:
      the ModificationsResponseData
    • getModification

      ModificationData getModification(String modificationId) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException
      This method returns the modification by modificationId and calling pros service.
      Parameters:
      modificationId - the modificationId
      Returns:
      the ModificationData
      Throws:
      org.springframework.web.client.HttpServerErrorException - the exception when http response is not 200 e.g. status 5xx
      org.springframework.web.client.HttpClientErrorException - the exception when http response is not 200 e.g. status 4xx
      org.springframework.web.client.ResourceAccessException - the resource is not accessible exception
    • removeModification

      void removeModification(ModificationData modification)
      This method will remove the modification from both the system and pros.
      Parameters:
      modification - the modification to be removed
      Throws:
      org.springframework.web.client.RestClientException - if removal of modification is unsuccessful
    • createModification

      ModificationData createModification(ModificationData modificationData) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException
      This method will create modification in pros
      Parameters:
      modificationData - the modificationData
      Returns:
      the modification data if http status response is 200 else return null
      Throws:
      org.springframework.web.client.HttpServerErrorException - the exception when http response is not 200 e.g. status 5xx
      org.springframework.web.client.HttpClientErrorException - the exception when http response is not 200 e.g. status 4xx
      org.springframework.web.client.ResourceAccessException - the resource is not accessible exception
    • updateModification

      ModificationData updateModification(ModificationData modificationData, String modificationId) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException
      This method will update modification in pros
      Parameters:
      modificationData - the modificationData
      modificationId - the modification id
      Returns:
      the modification data if http status response is 200 else return null
      Throws:
      org.springframework.web.client.HttpServerErrorException - the exception when http response is not 200 e.g. status 5xx
      org.springframework.web.client.HttpClientErrorException - the exception when http response is not 200 e.g. status 4xx
      org.springframework.web.client.ResourceAccessException - the resource is not accessible exception