public class VendorJcrPlacedOrder extends java.lang.Object implements PlacedOrder
PlacedOrder
, for use in order administration.
NB: models vendor records in /var/commerce/orders/, not shopper records in ~/commerce/orders/.
For (read-only) access to shopper records, see DefaultJcrPlacedOrder
.Constructor and Description |
---|
VendorJcrPlacedOrder(AbstractJcrCommerceService commerceService,
java.lang.String orderId,
java.util.Locale locale)
Instantiate a new, writable 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.
|
void |
updateOrder(java.util.Map<java.lang.String,java.lang.Object> delta,
boolean autoSave)
Update a number of properties in the order record.
|
public VendorJcrPlacedOrder(AbstractJcrCommerceService commerceService, java.lang.String orderId, java.util.Locale locale)
commerceService
- The owning CommerceServiceorderId
- 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.)locale
- public java.lang.String getOrderId() throws CommerceException
PlacedOrder
getOrderId
in interface PlacedOrder
CommerceException
public java.util.Map<java.lang.String,java.lang.Object> getOrder() throws CommerceException
PlacedOrder
getOrder
in interface PlacedOrder
CommerceException
public void updateOrder(java.util.Map<java.lang.String,java.lang.Object> delta, boolean autoSave) throws CommerceException
delta
- The properties to update. Properties not in this set will NOT be removed;
to remove a property include it with a value of null.autoSave
- If true, the current session will be saved after updating the order.CommerceException
public java.util.List<PriceInfo> getCartPriceInfo(Predicate filter) throws CommerceException
PlacedOrder
getCartPriceInfo
in interface PlacedOrder
filter
- An optional predicate used for filtering the PriceInfo
s.PriceInfo
s.CommerceException
CommerceSession.getPriceInfo(com.adobe.cq.commerce.api.Product)
public java.lang.String getCartPrice(Predicate filter) throws CommerceException
PlacedOrder
getCartPrice
in interface PlacedOrder
filter
- An optional predicate used for filtering the PriceInfo
s.CommerceException
public java.util.List<CommerceSession.CartEntry> getCartEntries() throws CommerceException
PlacedOrder
getCartEntries
in interface PlacedOrder
CommerceException
public java.util.List<PromotionInfo> getPromotions() throws CommerceException
PlacedOrder
getPromotions
in interface PlacedOrder
CommerceException
public java.util.List<VoucherInfo> getVoucherInfos() throws CommerceException
PlacedOrder
getVoucherInfos
in interface PlacedOrder
CommerceException
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"