Class AbstractSourcingStrategy

java.lang.Object
de.hybris.platform.warehousing.sourcing.strategy.AbstractSourcingStrategy
All Implemented Interfaces:
SourcingStrategy
Direct Known Subclasses:
NoRestrictionsStrategy, NoSplittingStrategy, PickupStrategy

public abstract class AbstractSourcingStrategy extends Object implements SourcingStrategy
Abstract sourcing strategy. This will delegate the post-processing.
  • Constructor Details

    • AbstractSourcingStrategy

      public AbstractSourcingStrategy()
  • Method Details

    • getAvailabilityForProduct

      protected Long getAvailabilityForProduct(ProductModel productModel, SourcingLocation sourcingLocation)
      Retrieve the stock available from a sourcing location
      Parameters:
      productModel - the ProductModel
      sourcingLocation - the SourcingLocation
      Returns:
      the stock available
    • getQuantitySourced

      protected long getQuantitySourced(Set<SourcingResult> sourcingResults, AbstractOrderEntryModel orderEntry)
      Retrieve the quantity already sourced
      Parameters:
      sourcingResults - SourcingContext
      orderEntry - the AbstractOrderEntryModel
      Returns:
    • checkSourceCompleted

      protected boolean checkSourceCompleted(SourcingContext sourcingContext)
      Check if the order was sourced.
      Parameters:
      sourcingContext - SourcingContext
      Returns:
      true if the all order entries was fully sourced
    • isTerminal

      public Boolean isTerminal()
      Description copied from interface: SourcingStrategy
      Indicates whether this sourcing strategy will allow other sourcing strategies to attempt to source the same order entries.
      Specified by:
      isTerminal in interface SourcingStrategy
      Returns:
      true if the strategy is terminal; false otherwise
    • getSourcingResultFactory

      protected SourcingResultFactory getSourcingResultFactory()
    • setSourcingResultFactory

      public void setSourcingResultFactory(SourcingResultFactory sourcingResultFactory)
    • setTerminal

      public void setTerminal(Boolean terminal)