public class PrimePaymentCmdImpl extends AEDPStoreTaskCmdImpl implements PrimePaymentCmd
PrimePaymentCmd
task command.
ProcessOrderCmdImpl
Task Command to prepare
an order for payment using payments rules component.
If unsuccessful, the command throws the ECSystemException
orderId |
A Long that indicates the id of the current order. |
inTotalAmount |
An int that indicates the total order amount. |
inInitialAmount |
An int that indicates the initial amount. |
itpPaymentAttributes |
A TypedProperty that the represents the paymentAttributes property of the command. |
commandContext |
The command context. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
The IBM Copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
PrimePaymentCmdImpl() |
Modifier and Type | Method and Description |
---|---|
void |
executePrimePaymentTCs()
Do nothing
|
AccountAccessBean |
getAccount()
This method returns the
AccountAccessBean representing the account if an account ID is
present. |
java.lang.Long |
getAccountId()
This method returns the common account ID if one is specified by the trading agreements used by the
order items of the order being processed.
|
java.lang.Long |
getBuyerPOId()
This method returns the internal ID of the BuyerPO record if a buyer purchase order number is specified.
|
java.lang.String |
getEDPWarning()
This method returns the payment rule warning information.
|
java.math.BigDecimal |
getInitialAmount()
This method returns the initial amount.
|
OrderAccessBean |
getOrderAccessBean()
This method returns a reference to the order access bean.
|
TypedProperty |
getPaymentAttributes()
This method returns the payment attributes, which are sometimes referred to as payment protocol data.
|
java.lang.String |
getPaymentMethodId()
This method returns the payment method ID to be used for the payment of the order.
|
java.lang.String |
getPONumber()
This method just returns null.
|
java.math.BigDecimal |
getTotalAmount()
This method returns the total order amount.
|
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 |
processFG()
This method processes the foreground tasks.
|
void |
reset()
This method resets the command fields.
|
void |
setAccountId(java.lang.Long n)
This method sets the account ID.
|
void |
setBuyerPOId(java.lang.Long n)
This method sets the buyerPO ID.
|
void |
setEDPWarning(java.lang.String warning)
This method sets the payment rule warning information.
|
void |
setInitialAmount(java.math.BigDecimal initialAmount)
This method sets the initial amount.
|
void |
setOrderAccessBean(OrderAccessBean abOrder)
This method sets a reference to the order access bean.
|
void |
setPaymentAttributes(TypedProperty paymentAttributes)
This method sets the paymentAttributes property of the command.
|
void |
setPaymentMethodId(java.lang.String nPayMthdId)
This method sets the payment method ID to be used with the payments rules subcomponent.
|
void |
setTotalAmount(java.math.BigDecimal totalAmount)
This method sets the total order amount.
|
void |
validateParameters()
This method extracts and validates the input parameters of this command implementation.
|
getCurrency, getOrderAmount, getPaymentInstructions, setCurrency, setOrderAmount, setPaymentInstructions, validateInsideProcessFG
getErrorMessageMap, getStoreId, insertActionListToActionDetailHash, insertActionListToEditActionDetailHash, isBgJobInWorking, isProcessBGExecutableInFG, setBgJobStatusInDb, setErrorMessageMap, setStoreId, toString
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
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
getErrorMessageMap
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
public static final java.lang.String COPYRIGHT
public AccountAccessBean getAccount()
This method returns the AccountAccessBean
representing the account if an account ID is
present.
If no account ID is set, null
is returned.
This method will first check if the local variable iabAccount is set. If not, it will attempt to retrieve the AccountAccessBean using the specified account ID.
AccountAccessBean
) if account ID is present;
null
otherwise .public void setAccountId(java.lang.Long n)
n
- A Long that specifies the account ID.public java.lang.Long getAccountId()
public void setBuyerPOId(java.lang.Long n)
n
- A Long that specifies the buyerPO ID.public java.lang.Long getBuyerPOId()
public void setEDPWarning(java.lang.String warning)
warning
- A String that specifies the payment rule warning information to set.public java.lang.String getEDPWarning()
getEDPWarning
in interface PrimePaymentCmd
public void setInitialAmount(java.math.BigDecimal initialAmount)
setInitialAmount
in interface PrimePaymentCmd
initialAmount
- A BigDecimal that specifies the initial amount to set.public java.math.BigDecimal getInitialAmount()
public void setOrderAccessBean(OrderAccessBean abOrder)
abOrder
- An OrderAccessBean that represents the reference to the order access bean.public OrderAccessBean getOrderAccessBean()
OrderAccessBean
that corresponds to the Order to paid for.public java.lang.String getPONumber()
public void setPaymentAttributes(TypedProperty paymentAttributes)
setPaymentAttributes
in interface PrimePaymentCmd
paymentAttributes
- A TypedProperty that represents the requestProperties object that
contains all the command parameters that are to be passed to this command.
It supports both wallet based and non-wallet based paymentspublic TypedProperty getPaymentAttributes()
getPaymentAttributes
in interface PrimePaymentCmd
TypedProperty
which contains the payment protocol data.public void setPaymentMethodId(java.lang.String nPayMthdId)
This method sets the payment method ID to be used with the payments rules subcomponent.
This method is to be used when there is only a single payment method for the entire order.
setPaymentMethodId
in interface PrimePaymentCmd
nPayMthdId
- A String that specifies the payments rules payment method ID.public java.lang.String getPaymentMethodId()
public boolean isReadyToCallExecute()
isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class AbstractECTargetableCommand
public void setTotalAmount(java.math.BigDecimal totalAmount)
setTotalAmount
in interface PrimePaymentCmd
totalAmount
- A BigDecimal that specifies the total order amount.public java.math.BigDecimal getTotalAmount()
null
may be returnedpublic void executePrimePaymentTCs() throws ECException
ECException
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()
This method resets the command fields.
After this method is invoked, and proper attributes are set, the command can be executed again.
reset
in interface com.ibm.websphere.command.Command
reset
in class AEDPPaymentTaskCmdImpl
public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException
- This exception is thrown in case of failures.public void processFG() throws EDPException, ECException
This method firstly updates the initial amount of the edp order. If current initial amount of the edp order is zero, we just set the request initial amount to it. And if current initial amount of the edp order is not zero, we should check if it is equal to the request initial amount.
Then it calculates the actions for PrimePayment business event through reading the Payment Rules Configuration.
EDPException
- This exception is thrown in case of failure.ECException
- This exception is thrown in case of failure.