public class VendorJcrPlacedOrder extends Object implements PlacedOrder
PlacedOrder
, for use in order administration.
NB: models vendor records in /etc/commerce/orders/, not shopper records in ~/commerce/orders/.
For (read-only) access to shopper records, see DefaultJcrPlacedOrder
.Constructor and Description |
---|
VendorJcrPlacedOrder(AbstractJcrCommerceService commerceService,
String orderId,
Locale locale)
The orderId must uniquely identify the placed order, but can be either the orderId property, or the
path to the order node.
|
Modifier and Type | Method and Description |
---|---|
List<CommerceSession.CartEntry> |
getCartEntries()
Return the list of items from a previously-placed order.
|
String |
getCartPrice(Predicate filter)
Shortcut for getting a formatted string of the first applicable price, according to the filter.
|
List<PriceInfo> |
getCartPriceInfo(Predicate filter)
Get detailed price information.
|
Map<String,Object> |
getOrder()
Get the order details.
|
String |
getOrderId()
Get an invariant ID for the order.
|
List<PromotionInfo> |
getPromotions()
Return the list of promotions that were applied to a previously-placed order.
|
List<VoucherInfo> |
getVoucherInfos()
Return the list of vouchers from a previously-placed order.
|
void |
updateOrder(Map<String,Object> delta,
boolean autoSave)
Update a number of properties in the order record.
|
public VendorJcrPlacedOrder(AbstractJcrCommerceService commerceService, String orderId, Locale locale)
public String getOrderId() throws CommerceException
PlacedOrder
getOrderId
in interface PlacedOrder
CommerceException
public Map<String,Object> getOrder() throws CommerceException
PlacedOrder
getOrder
in interface PlacedOrder
CommerceException
public void updateOrder(Map<String,Object> delta, boolean autoSave) throws CommerceException
delta
- CommerceException
public 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 String getCartPrice(Predicate filter) throws CommerceException
PlacedOrder
getCartPrice
in interface PlacedOrder
filter
- An optional predicate used for filtering the PriceInfo
s.CommerceException
public List<CommerceSession.CartEntry> getCartEntries() throws CommerceException
PlacedOrder
getCartEntries
in interface PlacedOrder
CommerceException
public List<PromotionInfo> getPromotions() throws CommerceException
PlacedOrder
getPromotions
in interface PlacedOrder
CommerceException
public List<VoucherInfo> getVoucherInfos() throws CommerceException
PlacedOrder
getVoucherInfos
in interface PlacedOrder
CommerceException
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"