Class SourcingLocationBuilder
java.lang.Object
de.hybris.platform.warehousing.sourcing.util.SourcingLocationBuilder
- All Implemented Interfaces:
Builder<SourcingLocation>
This is a Sourcing location builder implementation of the Builder interface
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SourcingLocationBuilderbuild()Builds an instance of type T (e.g., a SourcingLocation, a FitnessContext, ...)withAvailability(Map<ProductModel, Long> availability) withContext(SourcingContext context) withCustomAvailabilityProductQuantity(ProductModel productModel, Long quantity) Adds an existingProductModelof the specified quantity to the location to be builtwithCustomAvailabilitySkuQuantity(String SKUId, Long quantity) Adds a newProductModelof the specified SKU and quantity to the location to be builtwithDefaultAvailabilityQuantity(Long quantity) Adds a new Product of the default SKU and the specified quantity to the location to be builtwithDistance(Double distance) withPriority(Integer priority) withWarehouse(WarehouseModel warehouse) Creates a newWarehouseModelfrom the given id
-
Field Details
-
DEFAULT_DISTANCE
-
DEFAULT_PRIORITY
-
DEFAULT_INITIAL_ID
-
DEFAULT_SKU
- See Also:
-
DEFAULT_SKU_QUANTITY
-
-
Constructor Details
-
SourcingLocationBuilder
public SourcingLocationBuilder()
-
-
Method Details
-
aSourcingLocation
-
build
Description copied from interface:BuilderBuilds an instance of type T (e.g., a SourcingLocation, a FitnessContext, ...)- Specified by:
buildin interfaceBuilder<SourcingLocation>- Returns:
- the instance
-
withWarehouse
-
withDistance
-
withContext
-
withWarehouseCode
Creates a newWarehouseModelfrom the given id- Parameters:
id- - the String id of the warehouse to be created- Returns:
SourcingLocationBuilder
-
withAvailability
-
withPriority
-
withDefaultAvailabilityQuantity
Adds a new Product of the default SKU and the specified quantity to the location to be built- Parameters:
quantity- - the quantity of the the product- Returns:
- SourcingLocationBuilder
-
withCustomAvailabilitySkuQuantity
Adds a newProductModelof the specified SKU and quantity to the location to be built- Parameters:
SKUId- - SKU ID to be used as the product codequantity- - the quantity of the the product- Returns:
- SourcingLocationBuilder
-
withCustomAvailabilityProductQuantity
public SourcingLocationBuilder withCustomAvailabilityProductQuantity(ProductModel productModel, Long quantity) Adds an existingProductModelof the specified quantity to the location to be built- Parameters:
productModel-quantity-- Returns:
-