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.
  • Constructor Details

    • AvailabilitySourcingLocationFilter

      public AvailabilitySourcingLocationFilter()
  • Method Details

    • applyFilter

      public Collection<WarehouseModel> applyFilter(AbstractOrderModel order, Set<WarehouseModel> warehouses)
      Description copied from class: AbstractBaseSourcingLocationFilter
      Method used to apply the filter on the order and return a set of sourcing locations.
      Specified by:
      applyFilter in class AbstractBaseSourcingLocationFilter
      Parameters:
      order - - Order to be sourced (input value); cannot be null
      warehouses - - 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 level
      warehouse - - 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)