Class DefaultShoppingRepricingService
java.lang.Object
de.hybris.platform.shoppingservices.services.impl.DefaultShoppingRepricingService
- All Implemented Interfaces:
ShoppingRepricingService
- Direct Known Subclasses:
DefaultPROSRepricingService
The Shopping implementation of
ShoppingRepricingService interface.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertRepricingResponseToString(ShoppingRepricingResponseMessage shoppingRepricingResponseMessage) Convert the Repricing response message to string.convertStringToRepricingResponseMessage(String shoppingRepricingResponseMessage) Converts the repricing response message string to reprincing response messageprotected voidcreateRequestData(RestRequestInfo restRequestInfo, ShoppingRepricingRequestMessage shoppingRepricingRequestMessage) Creates the final request objectdoRepricing(ShoppingRepricingRequestMessage shoppingRepricingRequestMessage) Sends a repricing request messageprotected de.hybris.platform.servicelayer.config.ConfigurationServiceprotected de.hybris.platform.servicelayer.model.ModelServiceGets model service.protected RestSenderGets rest sender.protected com.fasterxml.jackson.databind.ObjectMapperprotected TravelCartServiceGets travel cart service.voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) voidsetModelService(de.hybris.platform.servicelayer.model.ModelService modelService) Sets model service.protected voidsetRepricingResponseInCart(ShoppingRepricingResponseMessage shoppingRepricingResponseMessage) Sets the repricing response in cart.voidsetRestSender(RestSender restSender) Sets rest sender.voidsetShoppingObjectMapper(com.fasterxml.jackson.databind.ObjectMapper shoppingObjectMapper) voidsetTravelCartService(TravelCartService travelCartService) Sets travel cart service.
-
Constructor Details
-
DefaultShoppingRepricingService
public DefaultShoppingRepricingService()
-
-
Method Details
-
doRepricing
public ShoppingRepricingResponseMessage doRepricing(ShoppingRepricingRequestMessage shoppingRepricingRequestMessage) throws RepricingException Description copied from interface:ShoppingRepricingServiceSends a repricing request message- Specified by:
doRepricingin interfaceShoppingRepricingService- Parameters:
shoppingRepricingRequestMessage- the shopping repricing request message- Returns:
- the
ShoppingRepricingResponseMessage - Throws:
RepricingException- thrown either when an error response is retrieved from the repricing service or when an error occurs during the json convertion of the request message.
-
convertRepricingResponseToString
public String convertRepricingResponseToString(ShoppingRepricingResponseMessage shoppingRepricingResponseMessage) throws RepricingException Description copied from interface:ShoppingRepricingServiceConvert the Repricing response message to string.- Specified by:
convertRepricingResponseToStringin interfaceShoppingRepricingService- Parameters:
shoppingRepricingResponseMessage- the shoppingRepricingResponseMessage- Returns:
- the message converted into string
- Throws:
RepricingException- to be thrown when an error occurs during the conversion of the repricing response message to string.
-
setRepricingResponseInCart
protected void setRepricingResponseInCart(ShoppingRepricingResponseMessage shoppingRepricingResponseMessage) throws RepricingException Sets the repricing response in cart.- Parameters:
shoppingRepricingResponseMessage- the shoppingRepricingResponseMessage- Throws:
RepricingException
-
createRequestData
protected void createRequestData(RestRequestInfo restRequestInfo, ShoppingRepricingRequestMessage shoppingRepricingRequestMessage) throws RepricingException Creates the final request object- Parameters:
restRequestInfo- the rest request info objectshoppingRepricingRequestMessage- the shoppingRepricingRequestMessage- Throws:
RepricingException
-
convertStringToRepricingResponseMessage
public ShoppingRepricingResponseMessage convertStringToRepricingResponseMessage(String shoppingRepricingResponseMessage) Description copied from interface:ShoppingRepricingServiceConverts the repricing response message string to reprincing response message- Specified by:
convertStringToRepricingResponseMessagein interfaceShoppingRepricingService- Parameters:
shoppingRepricingResponseMessage- the string shoppingRepricingResponseMessage- Returns:
- the
ShoppingRepricingResponseMessage
-
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()- Returns:
- ConfigurationService object
-
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) - Parameters:
configurationService- the configuration service object to be used by this class
-
getShoppingObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getShoppingObjectMapper()- Returns:
- ObjectMapper object
-
setShoppingObjectMapper
public void setShoppingObjectMapper(com.fasterxml.jackson.databind.ObjectMapper shoppingObjectMapper) - Parameters:
shoppingObjectMapper- the shopping object mapper to be used by this class
-
getTravelCartService
Gets travel cart service.- Returns:
- the travel cart service
-
setTravelCartService
Sets travel cart service.- Parameters:
travelCartService- the travel cart service
-
getModelService
protected de.hybris.platform.servicelayer.model.ModelService getModelService()Gets model service.- Returns:
- the model service
-
setModelService
public void setModelService(de.hybris.platform.servicelayer.model.ModelService modelService) Sets model service.- Parameters:
modelService- the model service
-
getRestSender
Gets rest sender.- Returns:
- the rest sender
-
setRestSender
Sets rest sender.- Parameters:
restSender- the rest sender
-