public class OrderShippingModeListDataBean extends java.lang.Object implements SmartDataBean, Delegator
This data bean lists the shipping modes available to a given order, and optionally calculates the shipping charge of each shipping mode.
Options:retrieve shipping modes allowed by the contracts | retrieve shipping modes with shipping charge | calculate shipping charge | calculate shipping charge with promotion adjustment | |
resolveFulfillmentCenter | true | true | true | |
calculateShippingCharge | true | true | true | |
calculateShippingAdjustment | true |
Notes: Flag-checkAppliedItems needs not to be set in default. Only if customer does not want to filter not-applicable shipping modes, they can set it to false.
<wcbase:useBean id="orderShippingModeList" classname="com.ibm.commerce.fulfillment.beans.OrderShippingModeListDataBean"> <c:set target="${orderShippingModeList}" property="order" value="${orderBean}"/> <c:set target="${orderShippingModeList}" property="calculateShippingCharge" value="true"/> <c:set target="${orderShippingModeList}" property="calculateShippingAdjustment" value="true"/> <c:set target="${orderShippingModeList}" property="resolveFulfillmentCenter" value="true"/> </wcbase:useBean> <table> <tr> <th>Shipping Mode</th> <th>Shipping Charge</th> </tr> <c:forEach items="${orderShippingModeList.shippingModes}" var="shippingMode" varStatus="status"> <tr> <td><c:out value="${shippingMode.description.description}"/></td> <td><c:out value="${orderShippingModeList.shippingCharges[status.index]}"/></td> </tr> </c:forEach> </table>
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The IBM copyright notice field.
|
Constructor and Description |
---|
OrderShippingModeListDataBean()
The OrderShippingModeListDataBean constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.math.BigDecimal | calculateShippingAdjustment(Item[] aItems)
This method calculates the shipping adjustment of the given items.
|
protected java.math.BigDecimal | calculateShippingCharge(Item[] aItems)
This method calculates the shipping charge of the given items.
|
protected FormattedMonetaryAmountDataBean | constructFormattedMonetaryAmountDataBean(java.math.BigDecimal adValue, java.lang.String astrCurrency)
This method constructs a FormattedMonetaryAmountDataBean from the given value and currency.
|
protected Item | constructItem(OrderItemDataBean adbOrderItem)
This method constructs an Item given an OrderItemDataBean.
|
CommandContext | getCommandContext()
This method returns the command context.
|
Protectable | getDelegate()
This method returns the delegate of this databean.
|
protected OrderDataBean | getOrder()
This method returns the order.
|
protected java.lang.Long | getOrderId()
This method returns the order ID.
|
TypedProperty | getRequestProperties()
This method returns the request properties.
|
FormattedMonetaryAmountDataBean[] | getShippingCharges()
This method returns the shipping charges corresponding to the available shipping modes.
|
ShippingModeDataBean[] | getShippingModes()
This method returns the shipping modes available to the order.
|
protected void | initializeShippingAdjustment(Item[] aItems)
This method initializes the shipping adjustment of the given items.
|
protected boolean | isCalculateShippingAdjustments()
This method returns whether to calculate the shipping adjustments of the shipping modes.
|
protected boolean | isCalculateShippingCharge()
This method returns whether to calculate the shipping charges of the shipping modes.
|
protected boolean | isCheckAppliedItems()
This method returns whether to filter not-applicable shipping modes.
|
protected boolean | isResolveFulfillmentCenter()
This method returns whether to resolve fulfillment center before calculating shipping charges.
|
void | populate()
This method is used to populate the XXXpopulateDataBean.
|
protected boolean | resolveFulfillmentCenters(Item[] aItems)
This method resolves the fulfillment centers of the given items.
|
protected ShippingModeAccessBean[] | retrieveAllowableShippingModes(Item[] aItems)
This method retrieves the shipping modes allowed by the contracts of the given items.
|
protected OrderDataBean | retrieveOrder(java.lang.Long anOrderId)
This method retrieves an order given its ID.
|
void | setCalculateShippingAdjustment(boolean abCalculateShippingAdjustment)
This method sets whether to calculate the shipping adjustments of the shipping modes.
|
void | setCalculateShippingCharge(boolean abCalculateShippingCharge)
This method sets whether to calculate the shipping charges of the shipping modes.
|
void | setCheckAppliedItems(boolean abCheckAppliedItems)
This method sets whether to filter shipping modes by checking applied items.
|
void | setCommandContext(CommandContext aCommandContext)
This method sets the command context.
|
void | setOrder(OrderDataBean adbOrder)
This method sets the order.
|
void | setOrderId(java.lang.Long anOrderId)
This method sets the order ID.
|
void | setRequestProperties(TypedProperty aRequestProperties)
This method sets the request properties.
|
void | setResolveFulfillmentCenter(boolean abResolveFulfillmentCenter)
This method sets whether to resolve fulfillment center before calculating shipping charges.
|
protected void | setShippingCharges(FormattedMonetaryAmountDataBean[] adbShippingCharges)
This method sets the shipping charges corresponding to the available shipping modes.
|
protected void | setShippingModes(ShippingModeDataBean[] adbShippingModes)
This method sets the shipping modes available to the order.
|
public static final java.lang.String COPYRIGHT
public OrderShippingModeListDataBean()
public CommandContext getCommandContext()
public void setCommandContext(CommandContext aCommandContext)
public TypedProperty getRequestProperties()
public void setRequestProperties(TypedProperty aRequestProperties) throws java.lang.Exception
public void setOrderId(java.lang.Long anOrderId)
protected java.lang.Long getOrderId()
public void setOrder(OrderDataBean adbOrder)
protected OrderDataBean getOrder()
public void setCalculateShippingCharge(boolean abCalculateShippingCharge)
public void setCalculateShippingAdjustment(boolean abCalculateShippingAdjustment)
protected boolean isCalculateShippingCharge()
protected boolean isCalculateShippingAdjustments()
public void setCheckAppliedItems(boolean abCheckAppliedItems)
protected boolean isCheckAppliedItems()
public void setResolveFulfillmentCenter(boolean abResolveFulfillmentCenter)
protected boolean isResolveFulfillmentCenter()
public ShippingModeDataBean[] getShippingModes()
protected void setShippingModes(ShippingModeDataBean[] adbShippingModes)
public FormattedMonetaryAmountDataBean[] getShippingCharges()
protected void setShippingCharges(FormattedMonetaryAmountDataBean[] adbShippingCharges)
protected OrderDataBean retrieveOrder(java.lang.Long anOrderId) throws ECException
public Protectable getDelegate() throws java.lang.Exception
protected Item constructItem(OrderItemDataBean adbOrderItem) throws ECException
protected ShippingModeAccessBean[] retrieveAllowableShippingModes(Item[] aItems) throws ECException
protected boolean resolveFulfillmentCenters(Item[] aItems) throws ECException
protected java.math.BigDecimal calculateShippingCharge(Item[] aItems) throws ECException
protected java.math.BigDecimal calculateShippingAdjustment(Item[] aItems) throws ECException
protected void initializeShippingAdjustment(Item[] aItems) throws ECException
protected FormattedMonetaryAmountDataBean constructFormattedMonetaryAmountDataBean(java.math.BigDecimal adValue, java.lang.String astrCurrency) throws ECException
public void populate() throws java.lang.Exception