Class DefaultModificationConditionService

java.lang.Object
de.hybris.platform.unifieduibackofficeservices.service.impl.DefaultModificationConditionService
All Implemented Interfaces:
ModificationConditionService

public class DefaultModificationConditionService extends Object implements ModificationConditionService
This Service integrated with the pros api to call services related api's
  • Field Details

  • Constructor Details

    • DefaultModificationConditionService

      public DefaultModificationConditionService()
  • Method Details

    • getModificationCondition

      public ModificationConditionData getModificationCondition(String conditionId) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException
      This method returns the modification condition by calling pros service.
      Specified by:
      getModificationCondition in interface ModificationConditionService
      Parameters:
      conditionId - the conditionId
      Returns:
      the ModificationConditionData
      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
    • removeModificationCondition

      public boolean removeModificationCondition(String conditionId)
      This method will remove the condition from both the system and pros.
      Specified by:
      removeModificationCondition in interface ModificationConditionService
      Parameters:
      conditionId - the condition to be removed
      Returns:
      true if the removal is successful
    • createModificationCondition

      public ModificationConditionData createModificationCondition(ModificationConditionData conditionData) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException
      This method will create condition in pros
      Specified by:
      createModificationCondition in interface ModificationConditionService
      Parameters:
      conditionData - the conditionData
      Returns:
      the modification condition data, if response is not 200 then 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
    • updateModificationCondition

      public boolean updateModificationCondition(ModificationConditionData conditionData, String conditionId) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException
      This method will update condition in pros
      Specified by:
      updateModificationCondition in interface ModificationConditionService
      Parameters:
      conditionData - the conditionData
      conditionId - the condition id
      Returns:
      the boolean, return true if condition is updated in pros else return false
      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
    • getConditionEndpoint

      protected String getConditionEndpoint()
      This method return the condition 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