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 java.lang.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 Summary
Fields Modifier and Type Field Description protected SourcingFilterResultOperatorfilterResultOperator
-
Constructor Summary
Constructors Constructor Description AbstractBaseSourcingLocationFilter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.Collection<WarehouseModel>applyFilter(AbstractOrderModel order, java.util.Set<WarehouseModel> locations)Method used to apply the filter on the order and return a set of sourcing locations.protected voidcombineFilteredLocations(java.util.Collection<WarehouseModel> filteredResults, java.util.Set<WarehouseModel> locations)Combine a collection of filtered results and the sourcing locations according to theSourcingFilterResultOperatorvalue 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).voidfilterLocations(AbstractOrderModel order, java.util.Set<WarehouseModel> locations)Apply the filter on the order and returns a set of locations to be used for sourcing.protected SourcingFilterResultOperatorgetFilterResultOperator()voidsetFilterResultOperator(SourcingFilterResultOperator operator)Utility method used to decide whether the filtered result set should be a union (OR) or an intersection (AND).
-
-
-
Field Detail
-
filterResultOperator
protected SourcingFilterResultOperator filterResultOperator
-
-
Method Detail
-
applyFilter
public abstract java.util.Collection<WarehouseModel> applyFilter(AbstractOrderModel order, java.util.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 nulllocations- - Set of sourcing locations (output value); cannot be null
-
filterLocations
public void filterLocations(AbstractOrderModel order, java.util.Set<WarehouseModel> locations)
Description copied from interface:SourcingLocationFilterApply the filter on the order and returns a set of locations to be used for sourcing.- Specified by:
filterLocationsin interfaceSourcingLocationFilter- Parameters:
order- - Order to be sourced (input value); cannot be nulllocations- - Set of sourcing locations (output value); cannot be null
-
combineFilteredLocations
protected void combineFilteredLocations(java.util.Collection<WarehouseModel> filteredResults, java.util.Set<WarehouseModel> locations)
Combine a collection of filtered results and the sourcing locations according to theSourcingFilterResultOperatorvalue 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 nulllocations- - Current set of sourcing locations (output value); cannot be null
-
getFilterResultOperator
protected SourcingFilterResultOperator getFilterResultOperator()
-
setFilterResultOperator
public void setFilterResultOperator(SourcingFilterResultOperator operator)
Description copied from interface:SourcingLocationFilterUtility method used to decide whether the filtered result set should be a union (OR) or an intersection (AND).- Specified by:
setFilterResultOperatorin interfaceSourcingLocationFilter- Parameters:
operator- - AND or OR operator to apply on the result sets; cannot be null
-
-