Class DefaultATPResultHandler
java.lang.Object
com.sap.sapoaacarintegration.services.atp.impl.DefaultATPResultHandler
- All Implemented Interfaces:
ATPResultHandler
Default atp result handler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExtracts the aggregated availability from the ATP response objectExtracts the aggregated availability from the ATP product response objectprotected List<ATPAvailability>Get all availability entries from the response item.protected ATPAvailabilitygetAvailability(AvailabilityItemResponse availability) Get single availability entry from the response item.protected List<ATPProductAvailability>getProductAvailabilities(ATPResultItems atpResultItems) Get all product availability entries from the response item.protected ATPProductAvailabilitygetProductAvailability(ATPResultItem atpResultItem) Get single product availability entry from the response item.protected ServiceUtilsprotected booleanhasData(ATPBatchResponse atpBatch) Checks if the ATPBatchResponse has data to processprotected booleanhasData(ATPResponse atp) Checks if the ATPResponse has data to processvoidsetServiceUtils(ServiceUtils serviceUtils) protected voidvalidateResponse(ATPBatchResponse atpBatch) Checks if the ATPBatchResponse is valid.protected voidChecks if the ATPResponse is valid.
-
Constructor Details
-
DefaultATPResultHandler
public DefaultATPResultHandler()
-
-
Method Details
-
extractATPAvailabilityFromATPResponse
Description copied from interface:ATPResultHandlerExtracts the aggregated availability from the ATP response object- Specified by:
extractATPAvailabilityFromATPResponsein interfaceATPResultHandler- Returns:
- list of aggregated availability info for given product
-
extractATPProductAvailabilityFromATPBatchResponse
public List<ATPProductAvailability> extractATPProductAvailabilityFromATPBatchResponse(ATPBatchResponse atpBatch) Description copied from interface:ATPResultHandlerExtracts the aggregated availability from the ATP product response object- Specified by:
extractATPProductAvailabilityFromATPBatchResponsein interfaceATPResultHandler- Returns:
- list of aggregated availability info for a list of products
-
getAvailabilities
Get all availability entries from the response item.- Parameters:
item-- Returns:
- list of all availabilities
-
getAvailability
Get single availability entry from the response item.- Parameters:
availability-- Returns:
- availability
-
getProductAvailabilities
Get all product availability entries from the response item.- Parameters:
atpResultItems-- Returns:
- list of all product availabilities
-
getProductAvailability
Get single product availability entry from the response item.- Parameters:
atpResultItem-- Returns:
- productAvailability
-
validateResponse
Checks if the ATPResponse is valid.- Parameters:
atp-- Throws:
ATPException
-
validateResponse
Checks if the ATPBatchResponse is valid.- Parameters:
atpBatch-- Throws:
ATPException
-
hasData
Checks if the ATPBatchResponse has data to process- Parameters:
atpBatch-- Returns:
- true if the response has data
-
hasData
Checks if the ATPResponse has data to process- Parameters:
atp-- Returns:
- true if the response has data
-
setServiceUtils
- Parameters:
serviceUtils-
-
getServiceUtils
- Returns:
- the serviceUtils
-