Class DefaultBucketService
java.lang.Object
de.hybris.platform.unifieduibackofficeservices.service.impl.DefaultBucketService
- All Implemented Interfaces:
BucketService
This Service integrated with the pros api to call buckets related api's
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcrateBundleType(Bucket bucket) this method will create and returnBundleTypebooleancreateBucket(Bucket bucket) This method creates bucket in pros as well as shopping fare product and bundle type in hybrisprotected booleancreateBucketInPros(Bucket bucket) call pros api to create bucket in prosprotected voidcreateShoppingFareProductModel(Bucket bucket, CatalogVersionModel catalogVersion) this method will createShoppingFareProductModelprotected org.springframework.web.client.RestTemplateThis method returns the bucket by bucket code and bucket username by calling pros service.protected StringThis method return the bucket end point as configured.getBuckets(Map<String, Object> searchFilterMap) This method returns the buckets by calling pros service.protected StringReturns the product catalog version as configured.protected de.hybris.platform.catalog.CatalogVersionServiceprotected de.hybris.platform.category.CategoryServiceprotected de.hybris.platform.servicelayer.config.ConfigurationServiceprotected de.hybris.platform.enumeration.EnumerationServiceprotected de.hybris.platform.servicelayer.model.ModelServiceprotected StringReturns the product catalog id as configured.protected PROSAPIUserServiceGets the prosApiUserServiceprotected de.hybris.platform.servicelayer.keygenerator.KeyGeneratorGets the prosBucketIDGeneratorprotected StringThis method return the pros server end point as configured.Gets the prosShoppingFareProduct service.protected PROSTravelBundleTemplateServiceGets pros travel bundle template service.protected de.hybris.platform.servicelayer.type.TypeServiceGets type servicebooleanremoveBucket(Bucket bucket) This method removes the BundleTemplate,BundleSelection Criteria reference from hybris for the given bucket and delete the corresponding bucket from the prosprotected booleanremoveBucketFromPros(Bucket bucket) This method removes the bucket from Pros for the given bucketprotected voidThis method removes the bundle templates, selection Criteria, bundle type corresponding to fare product associated with bucket and changes status of fare product to UnApprovedvoidsetBackofficeRestTemplate(org.springframework.web.client.RestTemplate backofficeRestTemplate) voidsetCatalogVersionService(de.hybris.platform.catalog.CatalogVersionService catalogVersionService) voidsetCategoryService(de.hybris.platform.category.CategoryService categoryService) voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) voidsetEnumerationService(de.hybris.platform.enumeration.EnumerationService enumerationService) voidsetModelService(de.hybris.platform.servicelayer.model.ModelService modelService) voidsetProsApiUserService(PROSAPIUserService prosApiUserService) Sets the prosApiUserServicevoidsetProsBucketIDGenerator(de.hybris.platform.servicelayer.keygenerator.KeyGenerator prosBucketIDGenerator) Sets the prosBucketIDGeneratorvoidsetProsShoppingFareProductService(DefaultPROSShoppingFareProductService prosShoppingFareProductService) Sets prosShoppingFareProduct service.voidsetProsTravelBundleTemplateService(PROSTravelBundleTemplateService prosTravelBundleTemplateService) Sets pros travel bundle template service.voidsetTypeService(de.hybris.platform.servicelayer.type.TypeService typeService) Sets the type servicebooleanupdateBucket(Bucket bucket) This method updates bucket in pros
-
Field Details
-
GET_BUCKETS_ENDPOINT
- See Also:
-
CATALOG_ID
- See Also:
-
CATALOG_VERSION
- See Also:
-
CATEGORY_DEFAULT
- See Also:
-
PRODUCT_CODE_SEPARATOR
- See Also:
-
-
Constructor Details
-
DefaultBucketService
public DefaultBucketService()
-
-
Method Details
-
getBuckets
This method returns the buckets by calling pros service.- Specified by:
getBucketsin interfaceBucketService- Parameters:
searchFilterMap- the map of filters to apply to the request- Returns:
- list of bucket
-
createBucket
public boolean createBucket(Bucket bucket) throws org.springframework.web.client.HttpServerErrorException, org.springframework.web.client.ResourceAccessException This method creates bucket in pros as well as shopping fare product and bundle type in hybris- Specified by:
createBucketin interfaceBucketService- Parameters:
bucket- the bucket- Returns:
- the boolean, return true if bucket is created in pros as well as in hybris else return false
- Throws:
org.springframework.web.client.HttpServerErrorException- the exception when http response is not 200org.springframework.web.client.ResourceAccessException- the resource is not accessible exception
-
getBucket
This method returns the bucket by bucket code and bucket username by calling pros service.- Specified by:
getBucketin interfaceBucketService- Parameters:
bucket- the bucket- Returns:
- the Bucket
-
updateBucket
This method updates bucket in pros- Specified by:
updateBucketin interfaceBucketService- Parameters:
bucket- the bucket- Returns:
- the boolean, return true if response from pros service is 200 else return false
-
createBucketInPros
call pros api to create bucket in pros- Parameters:
bucket- the bucket- Returns:
- the boolean, return true if response from pros service is 200 else return false
-
createShoppingFareProductModel
this method will createShoppingFareProductModel- Parameters:
bucket- the pros bucketcatalogVersion- the catalog version
-
crateBundleType
this method will create and returnBundleType- Parameters:
bucket- the bucket
-
removeBucket
Description copied from interface:BucketServiceThis method removes the BundleTemplate,BundleSelection Criteria reference from hybris for the given bucket and delete the corresponding bucket from the pros- Specified by:
removeBucketin interfaceBucketService- Returns:
-
removeFareProductRelatedItemsAndUnApproveFareProduct
This method removes the bundle templates, selection Criteria, bundle type corresponding to fare product associated with bucket and changes status of fare product to UnApproved- Parameters:
bucket-
-
removeBucketFromPros
This method removes the bucket from Pros for the given bucket- Parameters:
bucket-
-
getProductCatalogId
Returns the product catalog id as configured.- Returns:
- catalog Id
-
getCatalogVersion
Returns the product catalog version as configured.- Returns:
- catalog Id
-
getProsEndpoint
This method return the pros server end point as configured.- Returns:
- the pros end point
-
getBucketEndpoint
This method return the bucket end point as configured.- Returns:
- the bucket end point
-
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
-
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
-
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
-
getEnumerationService
protected de.hybris.platform.enumeration.EnumerationService getEnumerationService()- Returns:
- the categoryService
-
setEnumerationService
public void setEnumerationService(de.hybris.platform.enumeration.EnumerationService enumerationService) - Parameters:
enumerationService- the enumerationService to set
-
getCategoryService
protected de.hybris.platform.category.CategoryService getCategoryService()- Returns:
- the categoryService
-
setCategoryService
public void setCategoryService(de.hybris.platform.category.CategoryService categoryService) - Parameters:
categoryService- the categoryService 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
-
getProsShoppingFareProductService
Gets the prosShoppingFareProduct service.- Returns:
- the prosShoppingFareProductService
-
setProsShoppingFareProductService
public void setProsShoppingFareProductService(DefaultPROSShoppingFareProductService prosShoppingFareProductService) Sets prosShoppingFareProduct service.- Parameters:
prosShoppingFareProductService- the prosShoppingFareProductService
-
getTypeService
protected de.hybris.platform.servicelayer.type.TypeService getTypeService()Gets type service- Returns:
- type service
-
setTypeService
public void setTypeService(de.hybris.platform.servicelayer.type.TypeService typeService) Sets the type service- Parameters:
typeService- the type service
-
getProsBucketIDGenerator
protected de.hybris.platform.servicelayer.keygenerator.KeyGenerator getProsBucketIDGenerator()Gets the prosBucketIDGenerator- Returns:
- the prosBucketIDGenerator
-
setProsBucketIDGenerator
public void setProsBucketIDGenerator(de.hybris.platform.servicelayer.keygenerator.KeyGenerator prosBucketIDGenerator) Sets the prosBucketIDGenerator- Parameters:
prosBucketIDGenerator-
-
getProsApiUserService
Gets the prosApiUserService- Returns:
- the prosApiUserService
-
setProsApiUserService
Sets the prosApiUserService- Parameters:
prosApiUserService-
-
getProsTravelBundleTemplateService
Gets pros travel bundle template service.- Returns:
- the pros travel bundle template service
-
setProsTravelBundleTemplateService
public void setProsTravelBundleTemplateService(PROSTravelBundleTemplateService prosTravelBundleTemplateService) Sets pros travel bundle template service.- Parameters:
prosTravelBundleTemplateService- the pros travel bundle template service
-