public class OrderItemShippingModeListDataBean extends SmartDataBeanImpl implements SmartDataBean, Delegator
This OrderItemShippingModeListDataBean databean filters the allowable shipping modes and gives the estimated shipping charge for the given orderItems.
Inputs:
Output:
Use shippingModes to get a list of filtered shipping mode databeans.
Use shippingCharges to get a list of estimated shipping charges for each shipping mode.
<c:remove var="orderItemShippingModeList"/> <wcbase:useBean id="orderItemShippingModeList" classname="com.ibm.commerce.fulfillment.beans.OrderItemShippingModeListDataBean"> <c:set target="${orderItemShippingModeList}" property="orderItemIds" value="${orderItemIds}"/> <c:set target="${orderItemShippingModeList}" property="resolveFulfillmentCenter" value="true"/> <c:set target="${orderItemShippingModeList}" property="calculateShippingCharge" value="true"/> <c:set target="${orderItemShippingModeList}" property="calculateShippingAdjustment" value="true"/> </wcbase:useBean> <table> <tr> <th>Shipping Mode ID</th> <th>Shipping Mode Description</th> <th>Shipping Charge</th> </tr> <c:forEach items="${orderItemShippingModeList.shippingModes}" var="shippingMode" varStatus="status"> <tr> <td><c:out value="${shippingMode.shippingModeId}"/></td> <td><c:out value="${shippingMode.description.description}"/></td> <td><c:out value="${orderItemShippingModeList.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 |
---|
OrderItemShippingModeListDataBean() |
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)
Calculates the shipping charge of the given orderItem based on the resolved fulfillment center and shipping modes.
|
protected FormattedMonetaryAmountDataBean | constructFormattedMonetaryAmountDataBean(java.math.BigDecimal adValue, java.lang.String astrCurrency)
Constructs a FormattedMonetaryAmountDataBean from the given value and currency.
|
CommandContext | getCommandContext()
Returns the command context.
|
Protectable | getDelegate()
This method gets the delegate.
|
protected Item[] | getItems(java.lang.Long[] nOrderItemIds)
This method constructs Items from the given orderItemIds.
|
protected java.lang.Long[] | getOrderItemIds()
Returns the orderItem IDs.
|
FormattedMonetaryAmountDataBean[] | getShippingCharges()
Returns the shipping charges corresponding to the available shipping modes.
|
ShippingModeDataBean[] | getShippingModes()
Returns the shipping modes available to the order.
|
protected ShippingModeAccessBean[] | getShippingModes(java.lang.Integer[] anShippingModeIds)
This method gets ShippingModeAccessBeans from the given shippingModeIds.
|
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()
Returns whether to calculate the shipping charges of the shipping modes.
|
protected boolean | isCheckAppliedItems()
This method returns whether to filter non-applicable shipping modes.
|
protected boolean | isResolveFulfillmentCenter()
Returns whether to resolve fulfillment center before calculating shipping charges.
|
void | populate()
This method populates the data bean according to the passed parameters.
|
protected boolean | resolveFulfillmentCenters(Item[] aItems)
This method resolves the fulfillment centers of the given items.
|
protected ShippingModeAccessBean[] | retrieveAllowalbeShippingModes(Item aItem)
This method retrieves the allowable shipping modes for the orderItem based on the store, contract, and member information of the order item.
|
protected ShippingModeAccessBean[] | retrieveAllowalbeShippingModes(Item[] items)
This method retrieves the allowable shipping modes for the specified items.
|
void | setAllowableShippingModeIds(java.lang.Integer[] anAllowableShippingModeIds)
Sets the inAllowableShippingModeIds.
|
void | setCalculateShippingAdjustment(boolean abCalculateShippingAdjustment)
This method sets whether to calculate the shipping adjustments of the shipping modes.
|
void | setCalculateShippingCharge(boolean abCalculateShippingCharge)
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)
Sets the command context.
|
void | setOrderItemId(java.lang.Long anOrderItemId)
Sets the orderItem ID.
|
void | setOrderItemIds(java.lang.Long[] aOrderItemIds)
Sets the orderItem IDs.
|
void | setRequestProperties(TypedProperty aRequestProperties)
Sets the request properties.
|
void | setResolveFulfillmentCenter(boolean abResolveFulfillmentCenter)
Sets whether to resolve a fulfillment center before calculating shipping charges.
|
protected void | setShippingCharges(FormattedMonetaryAmountDataBean[] adbShippingCharges)
Sets the shipping charges corresponding to the available shipping modes.
|
protected void | setShippingModes(ShippingModeDataBean[] adbShippingModes)
Sets the shipping modes available to the order.
|
public static final java.lang.String COPYRIGHT
public Protectable getDelegate() throws java.lang.Exception
public void populate() throws java.lang.Exception
This method populates the data bean according to the passed parameters.
protected ShippingModeAccessBean[] getShippingModes(java.lang.Integer[] anShippingModeIds)
protected Item[] getItems(java.lang.Long[] nOrderItemIds) throws ECException
protected FormattedMonetaryAmountDataBean constructFormattedMonetaryAmountDataBean(java.math.BigDecimal adValue, java.lang.String astrCurrency) 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 boolean resolveFulfillmentCenters(Item[] aItems) throws ECException
protected ShippingModeAccessBean[] retrieveAllowalbeShippingModes(Item aItem) throws ECException, java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
protected ShippingModeAccessBean[] retrieveAllowalbeShippingModes(Item[] items) throws ECException, java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException
public void setOrderItemId(java.lang.Long anOrderItemId)
public void setOrderItemIds(java.lang.Long[] aOrderItemIds)
public void setAllowableShippingModeIds(java.lang.Integer[] anAllowableShippingModeIds)
protected java.lang.Long[] getOrderItemIds()
public void setCalculateShippingCharge(boolean abCalculateShippingCharge)
protected boolean isCalculateShippingCharge()
public void setCalculateShippingAdjustment(boolean abCalculateShippingAdjustment)
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)
public void setRequestProperties(TypedProperty aRequestProperties) throws java.lang.Exception
public CommandContext getCommandContext()
public void setCommandContext(CommandContext aCommandContext)