Class DefaultModificationService

java.lang.Object
de.hybris.platform.unifieduibackofficeservices.service.impl.DefaultModificationService
All Implemented Interfaces:
ModificationService

public class DefaultModificationService extends Object implements ModificationService
This Service integrated with the pros api to call modification related api's
  • Field Details

  • Constructor Details

    • DefaultModificationService

      public DefaultModificationService()
  • Method Details

    • getModifications

      public ModificationsResponseData getModifications(Integer pageNumber, String sortDir, Map<String,Object> searchFilterMap)
      This method returns the list of available modification in pros.
      Specified by:
      getModifications in interface ModificationService
      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

      public 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.
      Specified by:
      getModification in interface ModificationService
      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

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

      public 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
      Specified by:
      createModification in interface ModificationService
      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

      public 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
      Specified by:
      updateModification in interface ModificationService
      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
    • getProsEndpoint

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

      protected String getModificationEndpoint()
      This method return the modification end point as configured.
      Returns:
      the condition end point
    • getAccountName

      protected String getAccountName()
      this method returns the account name to get call the pros service as configured
      Returns:
      the account name
    • 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