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 Summary
Modifier and TypeMethodDescriptioncreateModification(ModificationData modificationData) This method will create modification in prosgetModification(String modificationId) This method returns the modification by modificationId and calling pros service.This method returns the list of available modification in pros.voidremoveModification(ModificationData modification) This method will remove the modification from both the system and pros.updateModification(ModificationData modificationData, String modificationId) This method will update modification in pros
-
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 paginationsortDir- the direction of the sort: ascendent or descendent or null, null for default sortingsearchFilterMap- 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 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
-
removeModification
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 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
-
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 modificationDatamodificationId- 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 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
-