|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.commerce.ebusiness.price.quote.Quote
The Quote class provides a framework for building a price quote for a collection of LineItems. The LineItems may be adjusted within the framework such that any sub-quantity of a LineItem maybe assigned a new unit price. Each LineAdjustment represents a subquantity of a LineItem and include a new unit price. Each LineAdjustment must have exactly one AdjustmentDetail object describing the adjustment. The quantities of a set of LineAdjustments for a LineItem may not exceed the quantity of the LineItem. The subtotal of the quote is the sum of the values of the LineItems. OrderAdjustments may also be added to the Quote. The OrderAdjustments change the total for the Quote. The total is computed by adding any OrderAdjustments to the subtotal for the object.
LineItem
,
LineAdjustment
,
OrderAdjustment
,
AdjustmentDetail
,
AdjustmentType
,
QuoteFactory
,
Money
,
Serialized FormField Summary | |
static String |
INPUT
|
static double |
MIN_PRICE
|
static double |
ONE_HUNDRED
|
static String |
STATE
|
static int |
STATE_I_DISC
|
static int |
STATE_I_END
|
static int |
STATE_I_ERROR
|
static int |
STATE_I_NO_ADJ
|
static int |
STATE_I_SHIPPING
|
static int |
STATE_I_TAX
|
static String |
STATE_S_DISC
|
static String |
STATE_S_END
|
static String |
STATE_S_ERROR
|
static String |
STATE_S_NO_ADJ
|
static String |
STATE_S_SHIPPING
|
static String |
STATE_S_TAX
|
Constructor Summary | |
Quote()
Constructs a Quote object with no LineItems and no associated QuoteFactory. |
|
Quote(QuoteFactory factory,
List lineItems)
Constructs a Quote object with the specified QuoteFactory and LineItem objects. |
Method Summary | |
void |
addLineAdjustment(int itemNumber,
int qty,
AdjustmentDetail aDetail)
Add a new LineAdjustment based on the specified input values and with the specified AdjustmentDetail. |
void |
addLineAdjustment(LineItem item,
int qty,
AdjustmentDetail aDetail)
Add a new LineAdjustment based on the specified input values and with the specified AdjustmentDetail. |
void |
addOrderDetail(AdjustmentDetail aDetail)
Create a new OrderAdjustment object with the specified AdjustmentDetail object. |
static boolean |
checkMinPrice(Money value)
Returns true if the Money value is greater than or equal to the minimum price of zero. |
Money |
getBaseShipping()
Returns the Money value for the base shipping cost. |
String |
getCurrency()
Returns the currency for this Quote object. |
QuoteFactory |
getFactory()
Get the QuoteFactory used to create other Quote package objects as needed by this Quote object. |
int |
getLineCnt()
Return the number of LineItems in this Quote. |
LineItem |
getLineItem(int itemNumber)
Returns the LineItem associated with the index supplied. |
List |
getLineItems()
Returns an unmodifiable List of the LineItem objects of this object. |
List |
getOrderAdjustments()
Returns the full list of OrderAdjustment objects associated with this Quote. |
List |
getOrderDiscountAdjustments()
Returns only the list of order discount adjustments from the list of OrderAdjustments. |
List |
getShippingOrderAdjustments()
Returns only the list of shipping adjustments from the list of OrderAdjustments. |
Money |
getSubtotal()
Returns the current subtotal of the Quote. |
Money |
getTotal()
Returns the current total of the Quote. |
String |
getUID()
Return the unique string identifier for this Quote |
int |
incrementSeqNumber()
Used to order and associate adjustments made to the Quote object. |
static double |
round(double value)
Returns a new double that is equivalent to the value specified rounded to two digits to the right of the decimal point. |
static double |
round(Money value)
Returns a new double that is equivalent to the amount of Money specified rounded to two digits to the right of the decimal point. |
static MutableMoney |
round(MutableMoney value)
Rounds the amount of the MutableMoney specified to two digits and returns the modified MutableMoney |
void |
set(QuoteFactory factory,
List lineItems)
Use this method to reinitialize a Quote object for reuse. |
void |
setBaseShipping(Money shippingBase)
Sets the base shipping cost for the Quote. |
String |
toString()
Provides a view of the current state of the object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String INPUT
public static final double MIN_PRICE
public static final double ONE_HUNDRED
public static final String STATE
public static final int STATE_I_DISC
public static final int STATE_I_END
public static final int STATE_I_ERROR
public static final int STATE_I_NO_ADJ
public static final int STATE_I_SHIPPING
public static final int STATE_I_TAX
public static final String STATE_S_DISC
public static final String STATE_S_END
public static final String STATE_S_ERROR
public static final String STATE_S_NO_ADJ
public static final String STATE_S_SHIPPING
public static final String STATE_S_TAX
Constructor Detail |
public Quote()
public Quote(QuoteFactory factory, List lineItems) throws QuoteException, CurrencyMismatchException
QuoteException
CurrencyMismatchException
QuoteFactory
,
LineItem
Method Detail |
public void addLineAdjustment(int itemNumber, int qty, AdjustmentDetail aDetail) throws QuoteException
itemNumber
- the number of the LineItem to associate the
adjustment with.qty
- the quantity of objects of the specified LineItem
to adjust.aDetail
- the AdjustmentDetail to associate with the new
LineAdjustment.
QuoteException
LineAdjustment
,
LineItem
,
AdjustmentDetail
public void addLineAdjustment(LineItem item, int qty, AdjustmentDetail aDetail) throws QuoteException
item
- the LineItem to associate the adjustment with.qty
- the quantity of objects of the specified LineItem
to adjust.aDetail
- the AdjustmentDetail to associate with the new
LineAdjustment.
QuoteException
LineAdjustment
,
LineItem
,
AdjustmentDetail
public void addOrderDetail(AdjustmentDetail aDetail) throws QuoteException
aDetail
- an AdjustmentDetail object.
QuoteException
AdjustmentDetail
,
OrderAdjustment
,
LineAdjustment
public static final boolean checkMinPrice(Money value)
value
- the Money object to compare against the minimum pricepublic final Money getBaseShipping()
Money
public final String getCurrency()
Money
public final QuoteFactory getFactory()
QuoteFactory
public final int getLineCnt()
public LineItem getLineItem(int itemNumber)
LineItem
public List getLineItems()
LineItem
,
Collections
public List getOrderAdjustments()
OrderAdjustment
,
AdjustmentType
public List getOrderDiscountAdjustments()
OrderAdjustment
,
AdjustmentType
public List getShippingOrderAdjustments()
OrderAdjustment
,
AdjustmentType
public final Money getSubtotal()
LineItem
public final Money getTotal()
OrderAdjustment
public String getUID()
public final int incrementSeqNumber()
public static final double round(double value)
value
- a double value to roundpublic static final double round(Money value)
value
- a Money value to roundpublic static final MutableMoney round(MutableMoney value)
value
- a MutableMoney value to round.
public void set(QuoteFactory factory, List lineItems) throws QuoteException, CurrencyMismatchException
factory
- the QuoteFactory to use when generating
other objects from the Quote package.lineItems
- a List of LineItem objects
QuoteException
CurrencyMismatchException
QuoteFactory
,
LineItem
public final void setBaseShipping(Money shippingBase) throws QuoteException, CurrencyMismatchException
QuoteException
- if the value passed in is null.
CurrencyMismatchException
- if the currency of the
Money object specified does not match the Quotes currency.OrderAdjustment
public final String toString()
|
© 2005 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |