Class DefaultAncillaryProductService
java.lang.Object
de.hybris.platform.unifieduibackofficeservices.service.impl.DefaultAncillaryProductService
- All Implemented Interfaces:
AncillaryProductService
This Service integrated with the pros api to call services related api's
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancreateAncillaryInPros(AncillaryProduct ancillaryProduct) This method will call pros service to create ancillary productbooleancreateAncillaryProducts(AncillaryProduct ancillaryProduct) This method will create ancillary product in prosprotected Stringthis method returns the account name to get call the pros service as configuredgetAncillaryProduct(String serviceId) This method returns the Ancillary Product by calling pros service.getAncillaryProducts(int pageNumber, Map<String, Object> searchFilterMap) This method returns the Ancillary Products by calling pros service.getATPCOServices(String carrierCode, Integer pageNumber, Integer pageSize) This method returns the ATPCO services from the Merchandising Data service.protected org.springframework.web.client.RestTemplateprotected StringThis method return the basket service end point as configured.protected de.hybris.platform.catalog.CatalogVersionServiceprotected de.hybris.platform.servicelayer.config.ConfigurationServicegetNonATPCOAncillaryProducts(int pageNumber) This method returns the NonATPCO Ancillary Products by calling pros service.protected StringReturns the product catalog id as configured.protected StringThis method return the pros server end point as configured.protected StringThis method return the service end point as configured.getServiceKeys(Category category) This method returns the sub codes for a given category.getServiceKeys(String serviceType, List<String> carriers) This method returns the service keys by calling pros service.protected List<ServiceKey>getServiceKeysFromPros(String serviceType, String carrier) This method will call serviceprotected Stringprotected Map<String,UnifiedUICreateUpdateRemoveServiceStrategy> Gets unified ui non atpco services strategy map.booleanremoveAncillaryProduct(AncillaryProduct ancillaryProduct) This method removes the ancillary product from the pros and will change sap ancillary product status from approved to unapprovedprotected booleanremoveAncillaryProductInPros(AncillaryProduct ancillaryProduct) This method removes ancillary product from the prosvoidsetBackofficeRestTemplate(org.springframework.web.client.RestTemplate backofficeRestTemplate) voidsetCatalogVersionService(de.hybris.platform.catalog.CatalogVersionService catalogVersionService) voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) voidsetUnifiedUINonATPCOServicesStrategyMap(Map<String, UnifiedUICreateUpdateRemoveServiceStrategy> unifiedUINonATPCOServicesStrategyMap) Sets unified ui non atpco services strategy map.booleanupdateAncillaryProduct(AncillaryProduct ancillaryProduct, String serviceId) This method will update ancillary product in prosprotected booleanupdateAncillaryProductInPros(AncillaryProduct ancillaryProduct, String serviceId) This method will update ancillary product in pros
-
Field Details
-
GET_SERVICE_ENDPOINT
- See Also:
-
GET_SERVICE_BASKETS_ENDPOINT
- See Also:
-
GET_SERVICE_SUB_CODES_ENDPOINT
- See Also:
-
-
Constructor Details
-
DefaultAncillaryProductService
public DefaultAncillaryProductService()
-
-
Method Details
-
getATPCOServices
Description copied from interface:AncillaryProductServiceThis method returns the ATPCO services from the Merchandising Data service.- Specified by:
getATPCOServicesin interfaceAncillaryProductService- Parameters:
carrierCode- the carrier to filter the request basing on thempageNumber- the number of page to send for the pagination configurationpageSize- the number of the entries in a single page- Returns:
- the list of ATPCO services
-
getAncillaryProducts
This method returns the Ancillary Products by calling pros service.- Specified by:
getAncillaryProductsin interfaceAncillaryProductService- Parameters:
pageNumber- the page numbersearchFilterMap- the map of filters to apply to the request- Returns:
- the list of Ancillary Products
-
getNonATPCOAncillaryProducts
This method returns the NonATPCO Ancillary Products by calling pros service.- Specified by:
getNonATPCOAncillaryProductsin interfaceAncillaryProductService- Parameters:
pageNumber- the page number- Returns:
- the list of Ancillary Products
-
getAncillaryProduct
This method returns the Ancillary Product by calling pros service.- Specified by:
getAncillaryProductin interfaceAncillaryProductService- Parameters:
serviceId- the serviceId- Returns:
- the list of Ancillary Products
-
createAncillaryProducts
public boolean createAncillaryProducts(AncillaryProduct ancillaryProduct) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException This method will create ancillary product in pros- Specified by:
createAncillaryProductsin interfaceAncillaryProductService- Parameters:
ancillaryProduct- the ancillaryProduct- Returns:
- the boolean, return true if ancillary product 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
-
createAncillaryInPros
This method will call pros service to create ancillary product- Parameters:
ancillaryProduct- the ancillaryProduct- Returns:
- the boolean, return true if ancillary product is created in pros else return false
-
updateAncillaryProduct
public boolean updateAncillaryProduct(AncillaryProduct ancillaryProduct, String serviceId) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.HttpClientErrorException, org.springframework.web.client.ResourceAccessException This method will update ancillary product in pros- Specified by:
updateAncillaryProductin interfaceAncillaryProductService- Parameters:
ancillaryProduct- the ancillaryProductserviceId- the serviceId- Returns:
- the boolean, return true if ancillary product 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
-
updateAncillaryProductInPros
This method will update ancillary product in pros- Parameters:
ancillaryProduct- the ancillaryProductserviceId- the serviceId- Returns:
- the boolean, return true if ancillary product is updated in pros else return false
-
removeAncillaryProduct
This method removes the ancillary product from the pros and will change sap ancillary product status from approved to unapproved- Specified by:
removeAncillaryProductin interfaceAncillaryProductService- Parameters:
ancillaryProduct- the ancillaryProduct- Returns:
- the boolean, return true if ancillary product is removed in pros else return false
-
removeAncillaryProductInPros
This method removes ancillary product from the pros- Parameters:
ancillaryProduct- the ancillaryProduct- Returns:
- the boolean, return true if ancillary product is removed in pros else return false
-
getServiceKeys
This method returns the service keys by calling pros service.- Specified by:
getServiceKeysin interfaceAncillaryProductService- Parameters:
serviceType- the service typecarriers- the carriers- Returns:
- the list of ServiceKey
-
getServiceKeysFromPros
This method will call service- Parameters:
serviceType-carrier-- Returns:
-
getServiceKeys
This method returns the sub codes for a given category.- Specified by:
getServiceKeysin interfaceAncillaryProductService- Parameters:
category- The category for the sub codes- Returns:
- list of service sub codes
-
getProductCatalogId
Returns the product catalog id as configured.- Returns:
- catalog Id
-
getProsEndpoint
This method return the pros server end point as configured.- Returns:
- the pros end point
-
getServiceEndpoint
This method return the service end point as configured.- Returns:
- the service end point
-
getBasketServiceEndpoint
This method return the basket service end point as configured.- Returns:
- the basket service end point
-
getServiceSubCodesEndpoint
-
getAccountName
this method returns the account name to get call the pros service as configured- Returns:
- the account name
-
getConfigurationService
protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()- Returns:
- the configurationService
-
setConfigurationService
public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) - Parameters:
configurationService- the configurationService to set
-
getBackofficeRestTemplate
protected org.springframework.web.client.RestTemplate getBackofficeRestTemplate()- Returns:
- the backofficeRestTemplate
-
setBackofficeRestTemplate
public void setBackofficeRestTemplate(org.springframework.web.client.RestTemplate backofficeRestTemplate) - Parameters:
backofficeRestTemplate- the backofficeRestTemplate to set
-
getUnifiedUINonATPCOServicesStrategyMap
protected Map<String,UnifiedUICreateUpdateRemoveServiceStrategy> getUnifiedUINonATPCOServicesStrategyMap()Gets unified ui non atpco services strategy map.- Returns:
- the unified ui non atpco services strategy map
-
setUnifiedUINonATPCOServicesStrategyMap
public void setUnifiedUINonATPCOServicesStrategyMap(Map<String, UnifiedUICreateUpdateRemoveServiceStrategy> unifiedUINonATPCOServicesStrategyMap) Sets unified ui non atpco services strategy map.- Parameters:
unifiedUINonATPCOServicesStrategyMap- the unified ui non atpco services strategy map
-
getCatalogVersionService
protected de.hybris.platform.catalog.CatalogVersionService getCatalogVersionService()- Returns:
- the catalogVersionService
-
setCatalogVersionService
public void setCatalogVersionService(de.hybris.platform.catalog.CatalogVersionService catalogVersionService) - Parameters:
catalogVersionService- the catalogVersionService to set
-