Class SourcingFilterProcessor

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean

    public class SourcingFilterProcessor
    extends java.lang.Object
    implements org.springframework.beans.factory.InitializingBean
    This is a utility class that filters locations according to a collection of filters.
    • Constructor Detail

      • SourcingFilterProcessor

        public SourcingFilterProcessor()
    • Method Detail

      • filterLocations

        public void filterLocations​(AbstractOrderModel order,
                                    java.util.Set<WarehouseModel> locations)
                             throws java.lang.IllegalArgumentException,
                                    java.lang.IllegalStateException
        Start the filter chain execution and returns a set of locations to be used for sourcing.
        Parameters:
        order - - Order to be sourced (input value); cannot be null
        locations - - Set of sourcing locations (output value); cannot be null
        Throws:
        java.lang.IllegalArgumentException - when order and/or locations parameters are null
        java.lang.IllegalStateException - when no filter is set
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • setFilters

        public void setFilters​(java.util.Collection<SourcingLocationFilter> filters)
        Set the list of filters to be processed (in FIFO order).
        Parameters:
        filters - - ordered list of filters to be processed; cannot be null or empty