public abstract class CalculateReturnItemAdjustmentPolicyCmdImpl extends BusinessPolicyCommandImpl implements CalculateReturnItemAdjustmentPolicyCmd
Behaviour
Constructor and Description |
---|
CalculateReturnItemAdjustmentPolicyCmdImpl()
ReturnItemCreditCalculateCmdImpl constructor comment.
|
Modifier and Type | Method and Description |
---|---|
protected abstract java.math.BigDecimal | calcAdjustment()
Calculate the RMA item adjustment (charge).
|
protected java.sql.Timestamp | calcTimestampShipped()
Calculate the timestamp when the item was shipped.
|
protected void | createCharge(java.lang.String aChargeType, java.math.BigDecimal anAmount)
Create a charge against the RMA item.
|
protected int | findBestDays(int aDaysSinceShipped, int[] theDays)
Find the smallest days value that is >= number of days since the item was shipped.
|
java.math.BigDecimal | getAdjustment()
Get the automatically calculated adjustment for the returned/refunded item.
|
protected int | getDaysSince(java.sql.Timestamp aTimestamp)
Get the number of days since a particular timestamp value.
|
protected java.sql.Timestamp | getItemShippedTime(RMAItemAccessBean rmaItemAB)
This method gets the shipped time of item.
|
protected OrderItemAccessBean | getOrderItemAB()
Get the order item access bean.
|
protected RMAItemAccessBean | getRMAItemAB()
Get the RMA item access bean.
|
protected java.math.BigDecimal | getTotalToAdjust()
Get the amount to be used to calculate the adjustment.
|
void | performExecute()
Execute the command.
|
protected void | removeExistingCharges()
Remove existing charges.
|
void | reset()
reset the command.
|
void | setOrderItemAB(OrderItemAccessBean anOrderItemAB)
(Optional) Set the orderItem being returned/refunded.
|
void | setRequestProperties(TypedProperty requestProperties)
Set the request properties for the policy.
|
void | setRMAItemAB(RMAItemAccessBean anRMAItemAB)
Set the RMA Item access bean which will have its adjustment updated.
|
void | validateParameters()
Check mandatory parameters.
|
public CalculateReturnItemAdjustmentPolicyCmdImpl()
protected abstract java.math.BigDecimal calcAdjustment() throws ECException
protected java.sql.Timestamp calcTimestampShipped() throws javax.ejb.FinderException, java.rmi.RemoteException, javax.naming.NamingException, javax.ejb.CreateException, ECException
protected java.sql.Timestamp getItemShippedTime(RMAItemAccessBean rmaItemAB) throws ECException
protected void createCharge(java.lang.String aChargeType, java.math.BigDecimal anAmount) throws ECSystemException
protected int findBestDays(int aDaysSinceShipped, int[] theDays)
public java.math.BigDecimal getAdjustment()
protected int getDaysSince(java.sql.Timestamp aTimestamp)
protected OrderItemAccessBean getOrderItemAB()
protected RMAItemAccessBean getRMAItemAB()
protected java.math.BigDecimal getTotalToAdjust() throws ECSystemException
public void performExecute() throws ECException
protected void removeExistingCharges() throws ECSystemException
public void reset()
public void setOrderItemAB(OrderItemAccessBean anOrderItemAB)
public void setRequestProperties(TypedProperty requestProperties)
public void setRMAItemAB(RMAItemAccessBean anRMAItemAB)
public void validateParameters() throws ECException