Class DefaultSourcingResultHandler
- java.lang.Object
-
- com.sap.sapoaacarintegration.services.sourcing.impl.DefaultSourcingResultHandler
-
- All Implemented Interfaces:
SourcingResultHandler
public class DefaultSourcingResultHandler extends java.lang.Object implements SourcingResultHandler
Default sourcing result handler
-
-
Constructor Summary
Constructors Constructor Description DefaultSourcingResultHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected de.hybris.platform.store.services.BaseStoreServicegetBaseStoreService()protected de.hybris.platform.servicelayer.model.ModelServicegetModelService()protected de.hybris.platform.servicelayer.internal.dao.GenericDao<PointOfServiceModel>getPointOfServiceGenericDao()protected PointOfServiceModelgetPosForEntry(java.lang.String source)protected ScheduleLineModelgetScheduleLine(AbstractOrderEntryModel entry, AvailabilityItemResponse availabilityItem)protected java.util.List<ScheduleLineModel>getScheduleLinesForEntry(AbstractOrderEntryModel entry, SourcingResultCartItemResponse item)protected ServiceUtilsgetServiceUtils()protected booleanhasData(SourcingResponse sourcing)Checks if the sourcing response has sufficient data.booleanhasSourcingResult(SourcingResponse sourcing)Check if the sourcing has returned resultvoidpersistSourcingResultInCart(SourcingResponse sourcing, AbstractOrderModel cart, RestServiceConfiguration restServiceConfig)Adds sourcing result to cart and checks if the sourcing was successfulvoidsetBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService)voidsetModelService(de.hybris.platform.servicelayer.model.ModelService modelService)voidsetPointOfServiceGenericDao(de.hybris.platform.servicelayer.internal.dao.GenericDao<PointOfServiceModel> pointOfServiceGenericDao)voidsetServiceUtils(ServiceUtils serviceUtils)protected voidvalidateResponse(SourcingResponse sourcing)Validates the sourcing response.
-
-
-
Method Detail
-
persistSourcingResultInCart
public void persistSourcingResultInCart(SourcingResponse sourcing, AbstractOrderModel cart, RestServiceConfiguration restServiceConfig)
Description copied from interface:SourcingResultHandlerAdds sourcing result to cart and checks if the sourcing was successful- Specified by:
persistSourcingResultInCartin interfaceSourcingResultHandler- Parameters:
sourcing- sourcing resultcart- hybris shopping cartrestServiceConfig- REST service configuration
-
validateResponse
protected void validateResponse(SourcingResponse sourcing)
Validates the sourcing response.- Parameters:
sourcing-
-
hasData
protected boolean hasData(SourcingResponse sourcing)
Checks if the sourcing response has sufficient data.- Parameters:
sourcing-- Returns:
- boolean
-
hasSourcingResult
public boolean hasSourcingResult(SourcingResponse sourcing)
Check if the sourcing has returned result- Parameters:
sourcing-- Returns:
- boolean
-
getScheduleLinesForEntry
protected java.util.List<ScheduleLineModel> getScheduleLinesForEntry(AbstractOrderEntryModel entry, SourcingResultCartItemResponse item)
-
getScheduleLine
protected ScheduleLineModel getScheduleLine(AbstractOrderEntryModel entry, AvailabilityItemResponse availabilityItem)
-
getPosForEntry
protected PointOfServiceModel getPosForEntry(java.lang.String source)
-
getModelService
protected de.hybris.platform.servicelayer.model.ModelService getModelService()
- Returns:
- the modelService
-
setModelService
public void setModelService(de.hybris.platform.servicelayer.model.ModelService modelService)
- Parameters:
modelService- the modelService to set
-
getBaseStoreService
protected de.hybris.platform.store.services.BaseStoreService getBaseStoreService()
- Returns:
- the baseStoreService
-
setBaseStoreService
public void setBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService)
- Parameters:
baseStoreService- the baseStoreService to set
-
getPointOfServiceGenericDao
protected de.hybris.platform.servicelayer.internal.dao.GenericDao<PointOfServiceModel> getPointOfServiceGenericDao()
- Returns:
- the pointOfServiceGenericDao
-
setPointOfServiceGenericDao
public void setPointOfServiceGenericDao(de.hybris.platform.servicelayer.internal.dao.GenericDao<PointOfServiceModel> pointOfServiceGenericDao)
- Parameters:
pointOfServiceGenericDao- the pointOfServiceGenericDao to set
-
getServiceUtils
protected ServiceUtils getServiceUtils()
- Returns:
- the serviceUtils
-
setServiceUtils
public void setServiceUtils(ServiceUtils serviceUtils)
- Parameters:
serviceUtils- the serviceUtils to set
-
-