Interface ConditionService
- All Known Implementing Classes:
DefaultConditionService
public interface ConditionService
The merchandising Condition Service interface to call the api for getting the conditions.
-
Method Summary
Modifier and TypeMethodDescriptioncreateAndFetchCondition(ConditionData conditionData) This method will create a new condition and return the updated condition databooleancreateCondition(ConditionData conditionData) This method will create condition in prosgetCondition(String conditionId) This method returns the condition by calling pros service.This method returns the list of available conditions in pros.booleanremoveCondition(ConditionData condition) This method will remove the condition from both the system and pros.booleanupdateCondition(ConditionData conditionData, String conditionId) This method will update condition in pros
-
Method Details
-
getCondition
ConditionData getCondition(String conditionId) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException This method returns the condition by calling pros service.- Parameters:
conditionId- the conditionId- Returns:
- the ConditionData
- 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
-
getConditions
ConditionsResponseData getConditions(Integer pageNumber, String sortDir, Map<String, Object> searchFilterMap) This method returns the list of available conditions in pros.- Parameters:
pageNumber- the page Number to handle the paginationsortDir- the direction of the sort: ascendent or descendentsearchFilterMap- the search filter attribute map- Returns:
- the
ConditionsResponseData
-
removeCondition
This method will remove the condition from both the system and pros.- Parameters:
condition- the condition to be removed- Returns:
- true if the removal is successful
-
createCondition
boolean createCondition(ConditionData conditionData) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException This method will create condition in pros- Parameters:
conditionData- the conditionData- Returns:
- the boolean, return true if condition is created in pros else return false
- 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
-
updateCondition
boolean updateCondition(ConditionData 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- Parameters:
conditionData- the conditionDataconditionId- 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 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
-
createAndFetchCondition
This method will create a new condition and return the updated condition data- Parameters:
conditionData- create condition data input body- Returns:
- create condition data response body
-