public class EditCmdImpl extends AEDPPaymentTaskCmdImpl implements EditCmd
EditCmd task command.
edit API.commandContext |
The command context. |
orderId |
The order id. |
orderAmount |
The order amount. |
pis |
The payment instructions. |
defaultCommandClassName, NAME| Constructor and Description |
|---|
EditCmdImpl() |
| Modifier and Type | Method and Description |
|---|---|
AccountAccessBean |
getAccount()
This method returns the AccountAccessBean representing the business account if an
account ID is present.
|
java.lang.Long |
getAccountId()
This method returns the business account ID if one is specified by the trading agreements used by the
order items of the order being processed.
|
java.lang.Long |
getBuyerPOId()
Do nothing
|
EDPEditResults |
getEditResults()
This method returns the edit results.
|
OrderAccessBean |
getOrderAccessBean()
This method returns the order access bean associated with this command.
|
java.math.BigDecimal |
getOrderAmount()
This method returns the total order amount.
|
java.util.ArrayList |
getPaymentInstructions()
This method returns the list of payment instructions affected by this
payment instruction edit operation.
|
java.lang.String |
getPONumber()
This method returns null
|
boolean |
isReadyToCallExecute()
This method is called by the Command Framework to check if all basic mandatory parameters
have been set for this command.
|
void |
performExecute()
This method executes the business logic of this command implementation.
|
void |
processBG()
This command executes a list of lists of payment actions by invoking
executeHashOfListsOfActions(HashMap actionLists). |
void |
processFG()
This method is the main method to process the current payment instruction
edit operation.
|
void |
reset()
This command resets the command fields.
|
void |
setAccountId(java.lang.Long n)
This method sets the business account ID.
|
void |
setBuyerPOId(java.lang.Long n)
Do nothing
|
void |
setEditResults(EDPEditResults localEditResults)
This method sets the edit results.
|
void |
setForcedPaymentInstructionChangeFlag(boolean forcedChange)
This method sets the forced flag indicating if the payment instruction
edit operation will be forced or not.
|
void |
setOrderAmount(java.math.BigDecimal paramOrderAmount)
This method sets the total order amount.
|
void |
setPaymentInstructions(java.util.ArrayList paramPIs)
This method sets the payment instructions affected by this payment
instruction edit operation.
|
void |
setPONumber(java.lang.String sPONumber)
This method sets the purchase order number.
|
void |
systemEditableAddOrderAmount(java.lang.Long edpOrderId,
java.math.BigDecimal addToPIAmount)
This method increases a payment instruction amount as a systemEditable operation.
|
java.lang.String |
toString()
This method converts this payment instruction edit operation data into a human-readable string.
|
void |
validateInsideProcessFG()
This method validates all parameters for this payment instruction edit operation.
|
getErrorMessageMap, getStoreId, insertActionListToActionDetailHash, insertActionListToEditActionDetailHash, isBgJobInWorking, isProcessBGExecutableInFG, setBgJobStatusInDb, setErrorMessageMap, setStoreIdgetCurrency, getEdpException, getEDPOrderId, getEDPResults, getLanguageId, getLocale, getOrderChannel, getOrderId, getStatus, isIdempotent, isProcessBGTasksRequired, resetServices, setBGProcessFinished, setEdpException, setEDPOrderId, setEDPResults, setOrderChannel, setOrderId, setProcessBGTasksRequired, setStatusaccessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParametersexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCachegetCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicyequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCurrency, getEDPResults, getLanguageId, getLocale, getOrderChannel, getOrderId, setEDPResults, setOrderIdexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCachegetCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputPropertiescheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameterspublic AccountAccessBean getAccount()
null otherwise.
This method will first check if the local variable iabAccount is set.
If not set, it will attempt to retrieve the AccountAccessBean
using the specified business account ID.AccountAccessBean if it can be retrieved; null otherwise.public void setAccountId(java.lang.Long n)
n - A Long that specifies the Account ID.public java.lang.Long getAccountId()
null is returned.null otherwise.public final void setEditResults(EDPEditResults localEditResults)
setEditResults in interface EditCmdlocalEditResults - An EDPEditResults that represents edit results to be set.public final EDPEditResults getEditResults()
getEditResults in interface EditCmdEDPEditResults that represents edit results.public void setBuyerPOId(java.lang.Long n)
n - A Long that specifies the buyerPO ID.public java.lang.Long getBuyerPOId()
public void setForcedPaymentInstructionChangeFlag(boolean forcedChange)
forceFlag whether they
want to do the a forced operation or not.setForcedPaymentInstructionChangeFlag in interface EditCmdforcedChange - A boolean that indicates if the payment instruction edit operation
is forced or not.public OrderAccessBean getOrderAccessBean()
OrderAccessBean that corresponds to the order associated with this
request.public void setOrderAmount(java.math.BigDecimal paramOrderAmount)
setOrderAmount in interface EditCmdparamOrderAmount - A BigDecimal that specifies the total order amount.public java.math.BigDecimal getOrderAmount()
null may be returned.public void setPONumber(java.lang.String sPONumber)
setPONumber in interface EditCmdsPONumber - A String that specifies the purchase order number specified by the buyer.public java.lang.String getPONumber()
public void setPaymentInstructions(java.util.ArrayList paramPIs)
setPaymentInstructions in interface EditCmdparamPIs - An ArrayList that represents the payment instructions (EDPPaymentInstruction).public java.util.ArrayList getPaymentInstructions()
EDPPaymentInstruction) affected by this payment
instruction edit operation.public boolean isReadyToCallExecute()
isReadyToCallExecute in interface com.ibm.websphere.command.CommandisReadyToCallExecute in class AbstractECTargetableCommandpublic void performExecute()
throws ECException
performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandECExceptionpublic void reset()
reset in interface com.ibm.websphere.command.Commandreset in class AEDPPaymentTaskCmdImplpublic void processBG()
throws EDPException,
ECException
executeHashOfListsOfActions(HashMap actionLists).EDPExceptionECExceptionpublic void processFG()
throws EDPException,
ECException
This method is the main method to process the current payment instruction edit operation.
It not only edits the payment instructions in payment rules, but also
edits the payment instructions in payment processing. Also, it edits the
EDP order.
EDPExceptionECExceptionpublic void systemEditableAddOrderAmount(java.lang.Long edpOrderId,
java.math.BigDecimal addToPIAmount)
throws EDPException,
ECException
This method increases a payment instruction amount as a systemEditable operation.
This is a public method to be invoked for ReservePayment. This seems a hack but it is working so far. This has a good potential for refactoring in the future...
A wrapper for editAddOrderAmount. Invokes editAddOrderAmount if the systemEditable flag is true, throws an exception otherwise.
systemEditableAddOrderAmount in interface EditCmdedpOrderId - A Long that specifies the Order Data Access Bean on which action is to be takenaddToPIAmount - A BigDecimal that specifies the new amount associated with the PI.EDPExceptionECExceptionpublic java.lang.String toString()
toString in class AEDPPaymentTaskCmdImplpublic void validateInsideProcessFG()
throws EDPException
validateInsideProcessFG in class AEDPPaymentTaskCmdImplEDPException - This exception is thrown if some parameter is invalid.