public class DefaultJcrPlacedOrder extends java.lang.Object implements PlacedOrder
PlacedOrder stored in a JCR repository, as used by
AbstractJcrCommerceSession.
Implementations requiring customization should extend this class and override
AbstractJcrCommerceSession.newPlacedOrderImpl(String) to return said extension.
NB: models shopper records in ~/commerce/orders/, not vendor records in /var/commerce/orders/.
For access to vendor records, see VendorJcrPlacedOrder.| Constructor and Description |
|---|
DefaultJcrPlacedOrder(AbstractJcrCommerceSession abstractJcrCommerceSession,
java.lang.String orderId)
Instantiate a new, read-only PlacedOrder record.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<CommerceSession.CartEntry> |
getCartEntries()
Return the list of items from a previously-placed order.
|
java.lang.String |
getCartPrice(Predicate filter)
Shortcut for getting a formatted string of the first applicable price, according to the filter.
|
java.util.List<PriceInfo> |
getCartPriceInfo(Predicate filter)
Get detailed price information.
|
java.util.Map<java.lang.String,java.lang.Object> |
getOrder()
Get the order details.
|
java.lang.String |
getOrderId()
Get an invariant ID for the order.
|
java.util.List<PromotionInfo> |
getPromotions()
Return the list of promotions that were applied to a previously-placed order.
|
java.util.List<VoucherInfo> |
getVoucherInfos()
Return the list of vouchers from a previously-placed order.
|
public DefaultJcrPlacedOrder(AbstractJcrCommerceSession abstractJcrCommerceSession, java.lang.String orderId)
abstractJcrCommerceSession - The owning AbstractJcrCommerceSessionorderId - An ID uniquely identifying the placed order. Can either be the orderId property, or
the path to the order node. (The path is obviously quicker, but the orderId might
be used to track the order in external systems, such as fulfillment systems.)public java.lang.String getOrderId()
throws CommerceException
PlacedOrdergetOrderId in interface PlacedOrderCommerceExceptionpublic java.util.Map<java.lang.String,java.lang.Object> getOrder()
throws CommerceException
PlacedOrdergetOrder in interface PlacedOrderCommerceExceptionpublic java.util.List<PriceInfo> getCartPriceInfo(Predicate filter) throws CommerceException
PlacedOrdergetCartPriceInfo in interface PlacedOrderfilter - An optional predicate used for filtering the PriceInfos.PriceInfos.CommerceExceptionCommerceSession.getPriceInfo(com.adobe.cq.commerce.api.Product)public java.lang.String getCartPrice(Predicate filter) throws CommerceException
PlacedOrdergetCartPrice in interface PlacedOrderfilter - An optional predicate used for filtering the PriceInfos.CommerceExceptionpublic java.util.List<CommerceSession.CartEntry> getCartEntries() throws CommerceException
PlacedOrdergetCartEntries in interface PlacedOrderCommerceExceptionpublic java.util.List<PromotionInfo> getPromotions() throws CommerceException
PlacedOrdergetPromotions in interface PlacedOrderCommerceExceptionpublic java.util.List<VoucherInfo> getVoucherInfos() throws CommerceException
PlacedOrdergetVoucherInfos in interface PlacedOrderCommerceExceptionCopyright © 2010 - 2023 Adobe. All Rights Reserved