Class PickupStrategy
- java.lang.Object
-
- de.hybris.platform.warehousing.sourcing.strategy.AbstractSourcingStrategy
-
- de.hybris.platform.warehousing.sourcing.strategy.impl.PickupStrategy
-
- All Implemented Interfaces:
SourcingStrategy
public class PickupStrategy extends AbstractSourcingStrategy
Strategy to apply when the order is to be picked up at a specific location.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCODE_PICKUP
-
Constructor Summary
Constructors Constructor Description PickupStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanSourceOrderEntry(AbstractOrderEntryModel entry, SourcingLocation location)Validates if the givenSourcingLocationcan be used to source the givenAbstractOrderEntryModelprotected voidcreatePickupSourcingResult(SourcingContext sourcingContext, SourcingLocation location)Create a sourcing result if the pickup location specified in the order has some stocks available for a given product and store it in the sourcing context.
When there is insufficient stock for a given product, the sourcing context is marked as not complete.
When there is no stock for a given product, no sourcing result is created.protected PosSelectionStrategygetPosSelectionStrategy()voidsetPosSelectionStrategy(PosSelectionStrategy posSelectionStrategy)voidsource(SourcingContext sourcingContext)Determine which order entries/order item quantities should be sourced from which sourcing locations.-
Methods inherited from class de.hybris.platform.warehousing.sourcing.strategy.AbstractSourcingStrategy
checkSourceCompleted, getAvailabilityForProduct, getQuantitySourced, getSourcingResultFactory, isTerminal, setSourcingResultFactory, setTerminal
-
-
-
-
Field Detail
-
CODE_PICKUP
protected static final java.lang.String CODE_PICKUP
- See Also:
- Constant Field Values
-
-
Method Detail
-
source
public void source(SourcingContext sourcingContext)
Description copied from interface:SourcingStrategyDetermine which order entries/order item quantities should be sourced from which sourcing locations.- Parameters:
sourcingContext- - the sourcing context; cannot be null
-
canSourceOrderEntry
protected boolean canSourceOrderEntry(AbstractOrderEntryModel entry, SourcingLocation location)
Validates if the givenSourcingLocationcan be used to source the givenAbstractOrderEntryModel- Parameters:
entry- givenAbstractOrderEntryModellocation- givenSourcingLocation- Returns:
- boolean to indicate if the given location is eligible to fulfill the order entry
-
createPickupSourcingResult
protected void createPickupSourcingResult(SourcingContext sourcingContext, SourcingLocation location)
Create a sourcing result if the pickup location specified in the order has some stocks available for a given product and store it in the sourcing context.
When there is insufficient stock for a given product, the sourcing context is marked as not complete.
When there is no stock for a given product, no sourcing result is created.- Parameters:
sourcingContext- - the sourcing contextlocation- - the location where we getting the product availability.
-
getPosSelectionStrategy
protected PosSelectionStrategy getPosSelectionStrategy()
-
setPosSelectionStrategy
public void setPosSelectionStrategy(PosSelectionStrategy posSelectionStrategy)
-
-