Class AvailabilitySourcingLocationFilter
java.lang.Object
de.hybris.platform.warehousing.sourcing.filter.impl.AbstractBaseSourcingLocationFilter
de.hybris.platform.warehousing.sourcing.filter.impl.AvailabilitySourcingLocationFilter
- All Implemented Interfaces:
SourcingLocationFilter
This filter returns a set of sourcing locations where at least one of the item in the order has available stock.
It is NOT recommended to use this filter as the initial filter in the chain of filters due to performance reason.
It is NOT recommended to use this filter as the initial filter in the chain of filters due to performance reason.
-
Field Summary
Fields inherited from class de.hybris.platform.warehousing.sourcing.filter.impl.AbstractBaseSourcingLocationFilter
filterResultOperator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyFilter(AbstractOrderModel order, Set<WarehouseModel> warehouses) Method used to apply the filter on the order and return a set of sourcing locations.protected DefaultWarehouseStockServiceprotected booleanisWarehouseHasAvailabilityForAnyProductInOrder(AbstractOrderModel order, WarehouseModel warehouse) Given an order and a warehouse, checks if the warehouse has some availability for at least one of the products in the order.voidsetWarehouseStockService(DefaultWarehouseStockService warehouseStockService) Methods inherited from class de.hybris.platform.warehousing.sourcing.filter.impl.AbstractBaseSourcingLocationFilter
combineFilteredLocations, filterLocations, getFilterResultOperator, setFilterResultOperator
-
Constructor Details
-
AvailabilitySourcingLocationFilter
public AvailabilitySourcingLocationFilter()
-
-
Method Details
-
applyFilter
public Collection<WarehouseModel> applyFilter(AbstractOrderModel order, Set<WarehouseModel> warehouses) Description copied from class:AbstractBaseSourcingLocationFilterMethod used to apply the filter on the order and return a set of sourcing locations.- Specified by:
applyFilterin classAbstractBaseSourcingLocationFilter- Parameters:
order- - Order to be sourced (input value); cannot be nullwarehouses- - Set of sourcing locations (output value); cannot be null
-
isWarehouseHasAvailabilityForAnyProductInOrder
protected boolean isWarehouseHasAvailabilityForAnyProductInOrder(AbstractOrderModel order, WarehouseModel warehouse) Given an order and a warehouse, checks if the warehouse has some availability for at least one of the products in the order.- Parameters:
order- - order for which to check the product stock levelwarehouse- - the warehouse to filter on stock availability- Returns:
- true, if the warehouse has atleast one availability, for any product in the order
-
getWarehouseStockService
-
setWarehouseStockService
-