Class PriceableTargetPriceState
java.lang.Object
com.broadleafcommerce.pricing.service.state.PriceableTargetPriceState
Used to contain useful information while gathering prices for a list of PriceableTargets
.
Contains:
- Mappings between a price for a
PriceableTarget
and thePriceList
the provided that price for use in creatingPriceDetails
forPriceInfos
. SeestdPriceDetailByPriceListPrice
,salePriceDetailByPriceListPrice
,contractPriceDetailByPriceListPrice
. - Mapping between a
PriceableTarget
prices and the name of the price, e.g., standardPrice, salePrice, and contractPrice. Seeprices
- Mapping between
PriceLists
and thePriceLists
they represent. This can be useful for fetching all first-level price lists at once rather than piece-meal. SeepriceListIdPriceListMap
- Mapping between
PriceLists
andPriceableTargets
to thePriceData
matching them. SeepriceListAndTargetPriceDataMap
- Set of all price list types. See
priceListTypes
.
- Author:
- Nathan Moore (nathanmoore).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionComposite of all price list price mapsDeprecated, for removal: This API element is subject to removal in a future version.Deprecated.in favor ofcontractPriceDetailByPriceListPrice
protected Map<PriceList,
PriceListPriceDetail> Extension point for additional price list typesDeprecated, for removal: This API element is subject to removal in a future version.in favor ofgetOtherPriceListPriceDetailMapping(String)
Map<org.apache.commons.lang3.tuple.Pair<String,
com.broadleafcommerce.pricing.client.domain.PriceableTargetRef>, PriceData> All first-level price lists mapped to the price data they aggregate.All first-level price lists mapped to the price lists they represent.Gets the price list price mapping for the price list typeDeprecated, for removal: This API element is subject to removal in a future version.in favor ofgetPriceListPriceDetailMappingForType(String)
Map of price type (e.g., standardPrice, salePrice, contractPrice) to thePriceDetail
of the "best" price for that type.Deprecated.in favor ofsalePriceDetailByPriceListPrice
Deprecated.in favor ofstdPriceDetailByPriceListPrice
protected void
Extension point for additional price list typesprotected void
putOtherPriceListPriceMaps
(Map<PriceList, javax.money.MonetaryAmount> composite) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofputOtherPriceListPriceDetailMaps(Map)
void
putPriceListPriceDetailMapping
(PriceList priceList, PriceListPriceDetail priceListPriceDetail) Put a price list price mapping.void
putPriceListPriceMapping
(PriceList priceList, javax.money.MonetaryAmount price) Deprecated, for removal: This API element is subject to removal in a future version.withPriceListAndTargetPriceDataMap
(Map<org.apache.commons.lang3.tuple.Pair<String, com.broadleafcommerce.pricing.client.domain.PriceableTargetRef>, PriceData> priceListAndTargetPriceDataMap) withPriceListIdPriceListMap
(Map<String, PriceList> priceListIdPriceListMap) withPriceListTypes
(List<String> priceListTypes)
-
Constructor Details
-
PriceableTargetPriceState
public PriceableTargetPriceState()
-
-
Method Details
-
withPriceListTypes
-
withPriceListIdPriceListMap
public PriceableTargetPriceState withPriceListIdPriceListMap(Map<String, PriceList> priceListIdPriceListMap) -
withPriceListAndTargetPriceDataMap
public PriceableTargetPriceState withPriceListAndTargetPriceDataMap(Map<org.apache.commons.lang3.tuple.Pair<String, com.broadleafcommerce.pricing.client.domain.PriceableTargetRef>, PriceData> priceListAndTargetPriceDataMap) -
getCompositePriceListPriceMap
@Deprecated(forRemoval=true, since="1.7.14, 2.0.1") public Map<PriceList,javax.money.MonetaryAmount> getCompositePriceListPriceMap()Deprecated, for removal: This API element is subject to removal in a future version.in favor ofgetCompositePriceListPriceDetailMap()
-
getCompositePriceListPriceDetailMap
Composite of all price list price maps -
putOtherPriceListPriceMaps
@Deprecated(forRemoval=true, since="1.7.14, 2.0.1") protected void putOtherPriceListPriceMaps(Map<PriceList, javax.money.MonetaryAmount> composite) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofputOtherPriceListPriceDetailMaps(Map)
-
putOtherPriceListPriceDetailMaps
Extension point for additional price list types -
getPriceListPriceMappingForType
@Deprecated(forRemoval=true, since="1.7.14, 2.0.1") public Map<PriceList,javax.money.MonetaryAmount> getPriceListPriceMappingForType(String type) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofgetPriceListPriceDetailMappingForType(String)
-
getPriceListPriceDetailMappingForType
Gets the price list price mapping for the price list type -
getOtherPriceListPriceMapping
@Deprecated(forRemoval=true, since="1.7.14, 2.0.1") protected Map<PriceList,javax.money.MonetaryAmount> getOtherPriceListPriceMapping(String type) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofgetOtherPriceListPriceDetailMapping(String)
-
getOtherPriceListPriceDetailMapping
Extension point for additional price list types -
putPriceListPriceMapping
@Deprecated(forRemoval=true, since="1.7.14, 2.0.1") public void putPriceListPriceMapping(PriceList priceList, javax.money.MonetaryAmount price) Deprecated, for removal: This API element is subject to removal in a future version. -
putPriceListPriceDetailMapping
public void putPriceListPriceDetailMapping(PriceList priceList, PriceListPriceDetail priceListPriceDetail) Put a price list price mapping. This will automatically resolve the correct price list type. -
getStdPriceListPriceMap
Deprecated.in favor ofstdPriceDetailByPriceListPrice
-
getSalePriceListPriceMap
Deprecated.in favor ofsalePriceDetailByPriceListPrice
-
getContractPriceListPriceMap
Deprecated.in favor ofcontractPriceDetailByPriceListPrice
-
getStdPriceDetailByPriceListPrice
- Since:
- 1.7.14, 2.0.1
-
getSalePriceDetailByPriceListPrice
- Since:
- 1.7.14, 2.0.1
-
getContractPriceDetailByPriceListPrice
- Since:
- 1.7.14, 2.0.1
-
getPrices
Map of price type (e.g., standardPrice, salePrice, contractPrice) to thePriceDetail
of the "best" price for that type. -
getPriceListTypes
-
getPriceTiers
-
getPriceListIdPriceListMap
All first-level price lists mapped to the price lists they represent. First-level means that we aren't traversing the price list hierarchy to fetch the whole tree. That can be done as needed. -
getPriceListAndTargetPriceDataMap
public Map<org.apache.commons.lang3.tuple.Pair<String,com.broadleafcommerce.pricing.client.domain.PriceableTargetRef>, getPriceListAndTargetPriceDataMap()PriceData> All first-level price lists mapped to the price data they aggregate. First-level means that we aren't traversing the price list hierarchy to fetch the whole tree. That can be done as needed.
-
getCompositePriceListPriceDetailMap()