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 java.lang.Object implements SourcingStrategy
Abstract sourcing strategy. This will delegate the post-processing.
-
-
Constructor Summary
Constructors Constructor Description AbstractSourcingStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckSourceCompleted(SourcingContext sourcingContext)Check if the order was sourced.protected java.lang.LonggetAvailabilityForProduct(ProductModel productModel, SourcingLocation sourcingLocation)Retrieve the stock available from a sourcing locationprotected longgetQuantitySourced(java.util.Set<SourcingResult> sourcingResults, AbstractOrderEntryModel orderEntry)Retrieve the quantity already sourcedprotected SourcingResultFactorygetSourcingResultFactory()java.lang.BooleanisTerminal()Indicates whether this sourcing strategy will allow other sourcing strategies to attempt to source the same order entries.voidsetSourcingResultFactory(SourcingResultFactory sourcingResultFactory)voidsetTerminal(java.lang.Boolean terminal)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.warehousing.sourcing.strategy.SourcingStrategy
source
-
-
-
-
Method Detail
-
getAvailabilityForProduct
protected java.lang.Long getAvailabilityForProduct(ProductModel productModel, SourcingLocation sourcingLocation)
Retrieve the stock available from a sourcing location- Parameters:
productModel- theProductModelsourcingLocation- theSourcingLocation- Returns:
- the stock available
-
getQuantitySourced
protected long getQuantitySourced(java.util.Set<SourcingResult> sourcingResults, AbstractOrderEntryModel orderEntry)
Retrieve the quantity already sourced- Parameters:
sourcingResults-SourcingContextorderEntry- theAbstractOrderEntryModel- 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 java.lang.Boolean isTerminal()
Description copied from interface:SourcingStrategyIndicates whether this sourcing strategy will allow other sourcing strategies to attempt to source the same order entries.- Specified by:
isTerminalin interfaceSourcingStrategy- Returns:
- true if the strategy is terminal; false otherwise
-
getSourcingResultFactory
protected SourcingResultFactory getSourcingResultFactory()
-
setSourcingResultFactory
public void setSourcingResultFactory(SourcingResultFactory sourcingResultFactory)
-
setTerminal
public void setTerminal(java.lang.Boolean terminal)
-
-