Class AbstractBaseSourcingLocationFilter

java.lang.Object
de.hybris.platform.warehousing.sourcing.filter.impl.AbstractBaseSourcingLocationFilter
All Implemented Interfaces:
SourcingLocationFilter
Direct Known Subclasses:
AvailabilitySourcingLocationFilter, DeliveryCountrySourcingLocationFilter, PickupSourcingLocationFilter, RestockLocationFilter

public abstract class AbstractBaseSourcingLocationFilter extends Object implements SourcingLocationFilter
Base sourcing filter class providing basic chain filtering functionalities. To implement a filter logic, extend this class and implement the abstract applyFilter() method.
  • Field Details

  • Constructor Details

    • AbstractBaseSourcingLocationFilter

      public AbstractBaseSourcingLocationFilter()
  • Method Details

    • applyFilter

      public abstract Collection<WarehouseModel> applyFilter(AbstractOrderModel order, Set<WarehouseModel> locations)
      Method used to apply the filter on the order and return a set of sourcing locations.
      Parameters:
      order - - Order to be sourced (input value); cannot be null
      locations - - Set of sourcing locations (output value); cannot be null
    • filterLocations

      public void filterLocations(AbstractOrderModel order, Set<WarehouseModel> locations)
      Description copied from interface: SourcingLocationFilter
      Apply the filter on the order and returns a set of locations to be used for sourcing.
      Specified by:
      filterLocations in interface SourcingLocationFilter
      Parameters:
      order - - Order to be sourced (input value); cannot be null
      locations - - Set of sourcing locations (output value); cannot be null
    • combineFilteredLocations

      protected void combineFilteredLocations(Collection<WarehouseModel> filteredResults, Set<WarehouseModel> locations)
      Combine a collection of filtered results and the sourcing locations according to the SourcingFilterResultOperator value defined.
      The AND operator returns a set of locations containing only items present in both input parameters (disjunction set).
      The OR and NONE operator returns a set of locations containing all items present in both input parameters (conjunction set). The NOT operator returns a set of locations excluding locations in Filtered results
      Parameters:
      filteredResults - - Filtered results to be combined to the locations parameter (input value); cannot be null
      locations - - Current set of sourcing locations (output value); cannot be null
    • getFilterResultOperator

      protected SourcingFilterResultOperator getFilterResultOperator()
    • setFilterResultOperator

      public void setFilterResultOperator(SourcingFilterResultOperator operator)
      Description copied from interface: SourcingLocationFilter
      Utility method used to decide whether the filtered result set should be a union (OR) or an intersection (AND).
      Specified by:
      setFilterResultOperator in interface SourcingLocationFilter
      Parameters:
      operator - - AND or OR operator to apply on the result sets; cannot be null