|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.commerce.command.AbstractECCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.command.BusinessPolicyCommandImpl | +--com.ibm.commerce.returns.commands.CalculateReturnItemAdjustmentPolicyCmdImpl
Calculate the adjustment for a return mechandise authorization (RMA) item. This is an abstract implementation which supplies some common infrastructure for concrete implementations.
Behaviour
Fields inherited from class com.ibm.commerce.command.BusinessPolicyCommandImpl |
policyId, requestProperties |
Fields inherited from class com.ibm.commerce.command.AbstractECCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.returns.commands.CalculateReturnItemAdjustmentPolicyCmd |
COPYRIGHT, defaultCommandClassName, NAME |
Constructor Summary | |
CalculateReturnItemAdjustmentPolicyCmdImpl()
ReturnItemCreditCalculateCmdImpl constructor comment. |
Method Summary | |
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 particluar timestamp value. |
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. |
Methods inherited from class com.ibm.commerce.command.BusinessPolicyCommandImpl |
getPolicyId, getRequestProperties, setPolicyId |
Methods inherited from class com.ibm.commerce.command.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.commerce.command.BusinessPolicyCommand |
getPolicyId, getRequestProperties, setPolicyId |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Constructor Detail |
public CalculateReturnItemAdjustmentPolicyCmdImpl()
Method Detail |
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 void createCharge(java.lang.String aChargeType, java.math.BigDecimal anAmount) throws ECSystemException
aChargeType
- charge type codeanAmount
- charge amountprotected int findBestDays(int aDaysSinceShipped, int[] theDays)
aDaysSinceShipped
- days since the item was shipped.theDays
- the days array.public java.math.BigDecimal getAdjustment()
getAdjustment
in interface CalculateReturnItemAdjustmentPolicyCmd
protected int getDaysSince(java.sql.Timestamp aTimestamp)
aTimestamp
- the timestamp to calculate the number of days since.protected OrderItemAccessBean getOrderItemAB()
protected RMAItemAccessBean getRMAItemAB()
protected java.math.BigDecimal getTotalToAdjust() throws ECSystemException
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.protected void removeExistingCharges() throws ECSystemException
public void reset()
reset
in class AbstractECCommand
public void setOrderItemAB(OrderItemAccessBean anOrderItemAB)
setOrderItemAB
in interface CalculateReturnItemAdjustmentPolicyCmd
anOrderItemAB
- the orderItem access bean.public void setRequestProperties(TypedProperty requestProperties)
setRequestProperties
in interface BusinessPolicyCommand
setRequestProperties
in class BusinessPolicyCommandImpl
requestProperties
- The request propertiespublic void setRMAItemAB(RMAItemAccessBean anRMAItemAB)
setRMAItemAB
in interface CalculateReturnItemAdjustmentPolicyCmd
anRMAItemAB
- RMA item access bean.public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
ECException.
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |