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 boolean
checkSourceCompleted(SourcingContext sourcingContext)
Check if the order was sourced.protected java.lang.Long
getAvailabilityForProduct(ProductModel productModel, SourcingLocation sourcingLocation)
Retrieve the stock available from a sourcing locationprotected long
getQuantitySourced(java.util.Set<SourcingResult> sourcingResults, AbstractOrderEntryModel orderEntry)
Retrieve the quantity already sourcedprotected SourcingResultFactory
getSourcingResultFactory()
java.lang.Boolean
isTerminal()
Indicates whether this sourcing strategy will allow other sourcing strategies to attempt to source the same order entries.void
setSourcingResultFactory(SourcingResultFactory sourcingResultFactory)
void
setTerminal(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
- theProductModel
sourcingLocation
- theSourcingLocation
- Returns:
- the stock available
-
getQuantitySourced
protected long getQuantitySourced(java.util.Set<SourcingResult> sourcingResults, AbstractOrderEntryModel orderEntry)
Retrieve the quantity already sourced- Parameters:
sourcingResults
-SourcingContext
orderEntry
- 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:SourcingStrategy
Indicates whether this sourcing strategy will allow other sourcing strategies to attempt to source the same order entries.- Specified by:
isTerminal
in 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)
-
-