Class DefaultSourcingContextFactory

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

    public class DefaultSourcingContextFactory
    extends java.lang.Object
    implements SourcingContextFactory, org.springframework.beans.factory.InitializingBean
    Factory used for creating a SourcingContext.
    • Constructor Detail

      • DefaultSourcingContextFactory

        public DefaultSourcingContextFactory()
    • Method Detail

      • create

        public java.util.Collection<SourcingContext> create​(java.util.Collection<OrderEntryGroup> groups,
                                                            java.util.Collection<WarehouseModel> locations)
                                                     throws java.lang.IllegalArgumentException
        Description copied from interface: SourcingContextFactory
        Create a new sourcing context.
        Specified by:
        create in interface SourcingContextFactory
        Parameters:
        groups - - the order entries grouped by one or more OrderEntryMatcher strategies
        locations - - the sourcing locations to be populated; cannot be null or empty
        Returns:
        collection of sourcing context; never null
        Throws:
        java.lang.IllegalArgumentException
      • createSourcingLocation

        protected SourcingLocation createSourcingLocation​(SourcingContext context,
                                                          WarehouseModel location)
        Create a new sourcing location and populate it.
        Parameters:
        context - - the sourcing context
        location - - the warehouse model
        Returns:
        the sourcing location; never null
      • afterPropertiesSet

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

        public void setSourcingLocationPopulators​(java.util.Set<SourcingLocationPopulator> populators)