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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Collection<WarehouseModel>applyFilter(AbstractOrderModel order, Set<WarehouseModel> locations) Method used to apply the filter on the order and return a set of sourcing locations.protected voidcombineFilteredLocations(Collection<WarehouseModel> filteredResults, 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, Set<WarehouseModel> locations) Apply the filter on the order and returns a set of locations to be used for sourcing.protected SourcingFilterResultOperatorvoidUtility method used to decide whether the filtered result set should be a union (OR) or an intersection (AND).
-
Field Details
-
filterResultOperator
-
-
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 nulllocations- - Set of sourcing locations (output value); cannot be null
-
filterLocations
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(Collection<WarehouseModel> filteredResults, 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
-
setFilterResultOperator
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
-