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, setStoreId
getCurrency, getEdpException, getEDPOrderId, getEDPResults, getLanguageId, getLocale, getOrderChannel, getOrderId, getStatus, isIdempotent, isProcessBGTasksRequired, resetServices, setBGProcessFinished, setEdpException, setEDPOrderId, setEDPResults, setOrderChannel, setOrderId, setProcessBGTasksRequired, setStatus
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCurrency, getEDPResults, getLanguageId, getLocale, getOrderChannel, getOrderId, setEDPResults, setOrderId
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
public 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 EditCmd
localEditResults
- An EDPEditResults
that represents edit results to be set.public final EDPEditResults getEditResults()
getEditResults
in interface EditCmd
EDPEditResults
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 EditCmd
forcedChange
- 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 EditCmd
paramOrderAmount
- 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 EditCmd
sPONumber
- 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 EditCmd
paramPIs
- 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.Command
isReadyToCallExecute
in class AbstractECTargetableCommand
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
public void reset()
reset
in interface com.ibm.websphere.command.Command
reset
in class AEDPPaymentTaskCmdImpl
public void processBG() throws EDPException, ECException
executeHashOfListsOfActions(HashMap actionLists)
.EDPException
ECException
public 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.
EDPException
ECException
public 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 EditCmd
edpOrderId
- 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.EDPException
ECException
public java.lang.String toString()
toString
in class AEDPPaymentTaskCmdImpl
public void validateInsideProcessFG() throws EDPException
validateInsideProcessFG
in class AEDPPaymentTaskCmdImpl
EDPException
- This exception is thrown if some parameter is invalid.