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.
|
emptyString
Constructor and Description |
---|
OrderShippingModeListDataBean()
The OrderShippingModeListDataBean constructor.
|
Modifier and Type | Method and Description |
---|---|
CommandContext |
getCommandContext()
This method returns the command context.
|
Protectable |
getDelegate()
This method returns the delegate of this databean.
|
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.
|
void |
populate()
This method is used to populate the XXXpopulateDataBean.
|
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.
|
public static final java.lang.String COPYRIGHT
public OrderShippingModeListDataBean()
public CommandContext getCommandContext()
getCommandContext
in interface SmartDataBean
SmartDataBean.getCommandContext()
public void setCommandContext(CommandContext aCommandContext)
setCommandContext
in interface SmartDataBean
aCommandContext
- the command context.SmartDataBean.setCommandContext(com.ibm.commerce.command.CommandContext)
public TypedProperty getRequestProperties()
getRequestProperties
in interface InputDataBean
InputDataBean#getRequestProperties()
public void setRequestProperties(TypedProperty aRequestProperties) throws java.lang.Exception
orderId
- see setOrderId(Long)
calculateShippingCharge
- see setCalculateShippingCharge(boolean)
resolveFulfillmentCenter
- see setResolveFulfillmentCenter(boolean)
setRequestProperties
in interface InputDataBean
aRequestProperties
- the request properties.java.lang.Exception
- Thrown if there is a problem when setting the request properties. This
particular method should not throw any exception because it just stores the request properties.InputDataBean#setRequestProperties(com.ibm.commerce.datatype.TypedProperty)
public void setOrderId(java.lang.Long anOrderId)
anOrderId
- the order ID.public void setOrder(OrderDataBean adbOrder)
adbOrder
- the order.public void setCalculateShippingCharge(boolean abCalculateShippingCharge)
abCalculateShippingCharge
- true if the shipping charges are to be calculated.public void setCalculateShippingAdjustment(boolean abCalculateShippingAdjustment)
abCalculateShippingAdjustment
- true if the shipping charges are to be calculated.public void setCheckAppliedItems(boolean abCheckAppliedItems)
abCheckAppliedItems
- true if not-applicable shipping modes are to be filtered.public void setResolveFulfillmentCenter(boolean abResolveFulfillmentCenter)
ResolveFulfillmentCenterCmd
or GetEligibleFulfillmentCentersCmd
is called.
Should be set to true if fulfillment center affects shipping mode availability and/or shipping
charge. False by default.abResolveFulfillmentCenter
- true if fulfillment center is to be resolved.public ShippingModeDataBean[] getShippingModes()
public FormattedMonetaryAmountDataBean[] getShippingCharges()
getShippingModes()
public Protectable getDelegate() throws java.lang.Exception
getDelegate
in interface Delegator
java.lang.Exception
Delegator.getDelegate()
public void populate() throws java.lang.Exception
populate
in interface SmartDataBean
java.lang.Exception