org.broadleafcommerce.core.order.domain
Interface Order

All Superinterfaces:
Serializable
All Known Implementing Classes:
NullOrderImpl, OrderImpl

public interface Order
extends Serializable


Method Summary
 void addAddedOfferCode(OfferCode offerCode)
          Deprecated. 
 void addOfferCode(OfferCode addedOfferCode)
           
 void addOrderItem(OrderItem orderItem)
           
 void assignOrderItemsFinalPrice()
           
 Money calculateOrderItemsFinalPrice(boolean includeNonTaxableItems)
           
 boolean containsSku(Sku sku)
          Checks the DiscreteOrderItems in the cart and returns whether or not the given SKU was found.
 List<OfferCode> getAddedOfferCodes()
           
 Map<Offer,OfferInfo> getAdditionalOfferInformation()
           
 Auditable getAuditable()
           
 List<CandidateOrderOffer> getCandidateOrderOffers()
           
 Customer getCustomer()
           
 List<DiscreteOrderItem> getDiscreteOrderItems()
           
 String getEmailAddress()
           
 Money getFulfillmentGroupAdjustmentsValue()
           
 List<FulfillmentGroup> getFulfillmentGroups()
           
 String getFulfillmentStatus()
           
 Long getId()
           
 Money getItemAdjustmentsValue()
          Returns the discount value of all the applied item offers for this order.
 int getItemCount()
          This method returns the total number of items in this order.
 String getName()
           
 List<OrderAdjustment> getOrderAdjustments()
          Returns a unmodifiable List of OrderAdjustment.
 Money getOrderAdjustmentsValue()
          Returns the discount value of all the applied order offers.
 Map<String,OrderAttribute> getOrderAttributes()
          A list of arbitrary attributes added to this order.
 List<OrderItem> getOrderItems()
           
 String getOrderNumber()
           
 List<PaymentInfo> getPaymentInfos()
           
 Money getRemainingTotal()
           
 OrderStatus getStatus()
           
 Date getSubmitDate()
           
 Money getSubTotal()
          Returns the subtotal price for the order.
 Money getTotal()
           
 Money getTotalAdjustmentsValue()
          Returns the total discount value for all applied item and order offers in the order.
 Money getTotalShipping()
           
 Money getTotalTax()
          Gets the total tax for this order, which is the sum of the taxes on all fulfillment groups.
 boolean hasCategoryItem(String categoryName)
           
 void setAdditionalOfferInformation(Map<Offer,OfferInfo> additionalOfferInformation)
           
 void setAuditable(Auditable auditable)
           
 void setCandidateOrderOffers(List<CandidateOrderOffer> candidateOrderOffers)
           
 void setCustomer(Customer customer)
           
 void setEmailAddress(String emailAddress)
           
 void setFulfillmentGroups(List<FulfillmentGroup> fulfillmentGroups)
           
 void setId(Long id)
           
 void setName(String name)
           
 void setOrderAttributes(Map<String,OrderAttribute> orderAttributes)
          Sets the map of order attributes.
 void setOrderItems(List<OrderItem> orderItems)
           
 void setOrderNumber(String orderNumber)
           
 void setPaymentInfos(List<PaymentInfo> paymentInfos)
           
 void setStatus(OrderStatus status)
           
 void setSubmitDate(Date submitDate)
           
 void setSubTotal(Money subTotal)
          Sets the subtotal price for the order.
 void setTotal(Money orderTotal)
           
 void setTotalShipping(Money totalShipping)
           
 void setTotalTax(Money totalTax)
          Sets the total tax of this order, which is the sum of the taxes on all fulfillment groups.
 boolean updatePrices()
           
 

Method Detail

getId

Long getId()

setId

void setId(Long id)

getName

String getName()

setName

void setName(String name)

getAuditable

Auditable getAuditable()

setAuditable

void setAuditable(Auditable auditable)

getSubTotal

Money getSubTotal()
Returns the subtotal price for the order. The subtotal price is the price of all order items with item offers applied. The subtotal does not take into account the order offers or any taxes that apply to this order.

Returns:
the total item price with offers applied

setSubTotal

void setSubTotal(Money subTotal)
Sets the subtotal price for the order. The subtotal price is the price of all order items with item offers applied. The subtotal does not take into account the order offers or any taxes that apply to this order.

Parameters:
subTotal -

assignOrderItemsFinalPrice

void assignOrderItemsFinalPrice()

calculateOrderItemsFinalPrice

Money calculateOrderItemsFinalPrice(boolean includeNonTaxableItems)

getTotal

Money getTotal()

getRemainingTotal

Money getRemainingTotal()

setTotal

void setTotal(Money orderTotal)

getCustomer

Customer getCustomer()

setCustomer

void setCustomer(Customer customer)

getStatus

OrderStatus getStatus()

setStatus

void setStatus(OrderStatus status)

getOrderItems

List<OrderItem> getOrderItems()

setOrderItems

void setOrderItems(List<OrderItem> orderItems)

addOrderItem

void addOrderItem(OrderItem orderItem)

getFulfillmentGroups

List<FulfillmentGroup> getFulfillmentGroups()

setFulfillmentGroups

void setFulfillmentGroups(List<FulfillmentGroup> fulfillmentGroups)

setCandidateOrderOffers

void setCandidateOrderOffers(List<CandidateOrderOffer> candidateOrderOffers)

getCandidateOrderOffers

List<CandidateOrderOffer> getCandidateOrderOffers()

getSubmitDate

Date getSubmitDate()

setSubmitDate

void setSubmitDate(Date submitDate)

getTotalTax

Money getTotalTax()
Gets the total tax for this order, which is the sum of the taxes on all fulfillment groups. This total is calculated in the TotalActivity stage of the pricing workflow.

Returns:
the total tax for the order

setTotalTax

void setTotalTax(Money totalTax)
Sets the total tax of this order, which is the sum of the taxes on all fulfillment groups. This total should only be set during the TotalActivity stage of the pricing workflow.

Parameters:
the - total tax for this order

getTotalShipping

Money getTotalShipping()

setTotalShipping

void setTotalShipping(Money totalShipping)

getPaymentInfos

List<PaymentInfo> getPaymentInfos()

setPaymentInfos

void setPaymentInfos(List<PaymentInfo> paymentInfos)

hasCategoryItem

boolean hasCategoryItem(String categoryName)

getOrderAdjustments

List<OrderAdjustment> getOrderAdjustments()
Returns a unmodifiable List of OrderAdjustment. To modify the List of OrderAdjustment, please use the addOrderAdjustments or removeAllOrderAdjustments methods.

Returns:
a unmodifiable List of OrderItemAdjustment

getDiscreteOrderItems

List<DiscreteOrderItem> getDiscreteOrderItems()

containsSku

boolean containsSku(Sku sku)
Checks the DiscreteOrderItems in the cart and returns whether or not the given SKU was found. The equality of the SKUs is based on the .equals() method in SkuImpl

Parameters:
sku - The sku to check for
Returns:
whether or not the given SKU exists in the cart

getAddedOfferCodes

List<OfferCode> getAddedOfferCodes()

getFulfillmentStatus

String getFulfillmentStatus()

getOrderNumber

String getOrderNumber()

setOrderNumber

void setOrderNumber(String orderNumber)

getEmailAddress

String getEmailAddress()

setEmailAddress

void setEmailAddress(String emailAddress)

getAdditionalOfferInformation

Map<Offer,OfferInfo> getAdditionalOfferInformation()

setAdditionalOfferInformation

void setAdditionalOfferInformation(Map<Offer,OfferInfo> additionalOfferInformation)

getItemAdjustmentsValue

Money getItemAdjustmentsValue()
Returns the discount value of all the applied item offers for this order. The value is already deducted from the order subTotal.

Returns:
the discount value of all the applied item offers for this order

getOrderAdjustmentsValue

Money getOrderAdjustmentsValue()
Returns the discount value of all the applied order offers. The value returned from this method should be subtracted from the getSubTotal() to get the order price with all item and order offers applied.

Returns:
the discount value of all applied order offers.

getTotalAdjustmentsValue

Money getTotalAdjustmentsValue()
Returns the total discount value for all applied item and order offers in the order. The return value should not be used with getSubTotal() to calculate the final price, since getSubTotal() already takes into account the applied item offers.

Returns:
the total discount of all applied item and order offers

updatePrices

boolean updatePrices()

getFulfillmentGroupAdjustmentsValue

Money getFulfillmentGroupAdjustmentsValue()

addOfferCode

void addOfferCode(OfferCode addedOfferCode)

addAddedOfferCode

@Deprecated
void addAddedOfferCode(OfferCode offerCode)
Deprecated. 


getOrderAttributes

Map<String,OrderAttribute> getOrderAttributes()
A list of arbitrary attributes added to this order.


setOrderAttributes

void setOrderAttributes(Map<String,OrderAttribute> orderAttributes)
Sets the map of order attributes.

Parameters:
orderAttributes -

getItemCount

int getItemCount()
This method returns the total number of items in this order. It iterates through all of the discrete order items and sums up the quantity. This method is useful for display to the customer the current number of "physical" items in the cart

Returns:
the number of items in the order


Copyright © 2012. All Rights Reserved.