public class EditPaymentInstructionPolicyCmdImpl extends BusinessPolicyCommandImpl implements EditPaymentInstructionPolicyCmd
EditPaymentInstructionPolicyCmd
implementation class when
new payment processing component is used. This command edit payment instruction
stored in payment processing component tables. When payment rules component edits
the payment instruction in payment rules related tables. It then calls this command
to edit the payment instruction in payment processing related tables.
This class is used with new payment processing component.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, ERR_CODE_BAD_XDATE, ERRTASK_NAME, NAME
Constructor and Description |
---|
EditPaymentInstructionPolicyCmdImpl() |
Modifier and Type | Method and Description |
---|---|
ActionResults |
cancelPaymentInstruction()
This method cancels a payment instruction in payment processing
component.
|
ActionResults |
getActionResults()
This method gets the action results after the corresponding edit action
is executed.
|
java.util.Locale |
getLocale()
This method gets the locale from the
CommandContext to be used in the action. |
java.lang.String |
getOrderChannel()
This method gets the current order channel, which will be put into
payment context where there is a corresponding attribute.
|
PaymentActionData |
getPaymentActionData()
This method gets the payment action data that contains the necessary
information for the payment instruction edit action.
|
java.lang.String |
getPaymentGroupId()
This method gets the current payment group id, which will be put into
payment context where there is a corresponding attribute.
|
java.lang.Integer |
getStoreId()
This method gets the store id, which will be put into
payment context where there is a corresponding attribute.
|
static boolean |
isCardExpiryDateValid(int expiryMonth,
int expiryYear)
This method checks if the specified expiry date (expiryMonth and expiryYear) is valid.
|
void |
performExecute()
This method performs the actions edit payment instruction through
calling the edit API of payment processing component by per action data type.
|
static java.lang.String |
removeSpaceAndHyphenFromString(java.lang.String aCardNumber)
The method returns a new string that is free of any spaces and hyphenated characters.
|
void |
reset()
This method is called after a command has been executed.
|
void |
setLocale(java.util.Locale localLocal)
This method sets the current locale, which will be put into payment
context where there is a corresponding attribute.
|
void |
setOrderChannel(java.lang.String string)
This method sets the current order channel, which will be put into
payment context where there is a corresponding attribute.
|
void |
setPaymentActionData(PaymentActionData ac)
This method sets the payment action data that contains the necessary
information for the payment instruction edit action.
|
void |
setPaymentGroupId(java.lang.String string)
This method sets the payment group id, which will be put into
payment context where there is a corresponding attribute.
|
void |
setStoreId(java.lang.Integer integer)
This method gets the store id, which will be put into
payment context where there is a corresponding attribute.
|
void |
updateActionStatusFromBackendResult(PaymentActionResults actionResult,
Result ppcBackendResult)
This method determines action result status based on the status in
backend result returned from payment processing component, which set from
Plugin financial transaction status.
|
void |
validate()
This method validates if the edit action is valid.
|
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getUser, getUserId, isReadyToCallExecute, 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, toString, wait, wait, wait
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties
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, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
public static final java.lang.String COPYRIGHT
public final java.util.Locale getLocale()
CommandContext
to be used in the action.public void setPaymentActionData(PaymentActionData ac)
setPaymentActionData
in interface EditPaymentInstructionPolicyCmd
ac
- The payment action data to be used in
the edit payment action.public PaymentActionData getPaymentActionData()
public void performExecute() throws ECException
This method is called by the commands of payment rules component. It's called when they decide to execute the actions edit the payment instructions in payment processing component.
There is the payment action data contains the necessary information for the payment instruction edit action that is passed to this command. Then this command execute the create/update/cancel operation according to the action name in the payment action data.
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
- If something goes wrongpublic void updateActionStatusFromBackendResult(PaymentActionResults actionResult, Result ppcBackendResult) throws CommunicationException
actionResult
- The results of the actionppcBackendResult
- The backend result coming from PPCCommunicationException
public void validate() throws EDPException
EDPException
is thrown.EDPException
- Thrown if payment id is nullpublic ActionResults cancelPaymentInstruction() throws EDPException, ECException, PluginException
Regardless of the results of the cancel action, this execution will be stored in the database to record the history the payment instruction action.
EDPException
- Thrown in the event of any failurePluginException
ECException
public ActionResults getActionResults()
getActionResults
in interface EditPaymentInstructionPolicyCmd
public java.lang.String getOrderChannel()
public java.lang.String getPaymentGroupId()
public void setLocale(java.util.Locale localLocal)
setLocale
in interface EditPaymentInstructionPolicyCmd
localLocal
- The current locale.public void setOrderChannel(java.lang.String string)
setOrderChannel
in interface EditPaymentInstructionPolicyCmd
string
- The current order channel.public void setPaymentGroupId(java.lang.String string)
setPaymentGroupId
in interface EditPaymentInstructionPolicyCmd
string
- The current payment group id.public java.lang.Integer getStoreId()
getStoreId
in interface ECCommand
getStoreId
in class AbstractECTargetableCommand
public void setStoreId(java.lang.Integer integer)
setStoreId
in interface EditPaymentInstructionPolicyCmd
integer
- The current payment store id.public static boolean isCardExpiryDateValid(int expiryMonth, int expiryYear)
expiryMonth
- The calender month of the expiry date (1 for January, 2 for February, and so on.)expiryYear
- The calender year of the expiry datepublic static java.lang.String removeSpaceAndHyphenFromString(java.lang.String aCardNumber)
aCardNumber
- The card number to be examined and strippedpublic void reset()
AbstractECTargetableCommand
reset
in interface com.ibm.websphere.command.Command
reset
in class AbstractECTargetableCommand
Command.reset()