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
public class AvailabilitySourcingLocationFilter extends AbstractBaseSourcingLocationFilter
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.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.warehousing.sourcing.filter.impl.AbstractBaseSourcingLocationFilter
filterResultOperator
-
-
Constructor Summary
Constructors Constructor Description AvailabilitySourcingLocationFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<WarehouseModel>applyFilter(AbstractOrderModel order, java.util.Set<WarehouseModel> warehouses)Method used to apply the filter on the order and return a set of sourcing locations.protected DefaultWarehouseStockServicegetWarehouseStockService()protected 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
-
-
-
-
Method Detail
-
applyFilter
public java.util.Collection<WarehouseModel> applyFilter(AbstractOrderModel order, java.util.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
protected DefaultWarehouseStockService getWarehouseStockService()
-
setWarehouseStockService
public void setWarehouseStockService(DefaultWarehouseStockService warehouseStockService)
-
-