public class EditPaymentInstructionCompatiblePolicyCmdImpl extends BusinessPolicyCommandImpl implements EditPaymentInstructionPolicyCmd
EditPaymentInstructionPolicyCmd
implementation class for existing policy commands in classical payments.
The existing payment policy commands are not allowed to use together with payment plug-in controller or other payment
processing system for the same order. The reason is that these payment policies commands are always designed with the
assumption that only one payment instruction is allowed for one order. And every payment actions are executed against
the order total amount.
This command edit payment instruction stored in the table ORDPAYINFO and ORDPAYMTHD. When payment rules component edits the payment instruction in payment rules related tables. It then calls this command to edit the payment instruction in the two tables above.
This class is used with Classical Payments.
defaultCommandClassName, ERR_CODE_BAD_XDATE, ERRTASK_NAME, NAME
Constructor and Description |
---|
EditPaymentInstructionCompatiblePolicyCmdImpl() |
Modifier and Type | Method and Description |
---|---|
ActionResults |
getActionResults()
This method gets the action results after the corresponding edit action
is executed.
|
java.lang.String |
getOrderChannel()
This method gets the current order channel.
|
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.
|
java.lang.Integer |
getStoreId()
This method gets the current store id.
|
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 commands that edit the records in ORDPAYINFO and ORDPAYMETHOD by per
action data type.
|
static java.lang.String |
removeSpaceAndHyphenFromString(java.lang.String aCardNumber)
This 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 localLocale)
This method sets the current locale.
|
void |
setOrderChannel(java.lang.String string)
This method sets the current order channel.
|
void |
setPaymentActionData(PaymentActionData data)
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 current payment group id.
|
void |
setStoreId(java.lang.Integer integer)
This method sets the current store id.
|
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 EditPaymentInstructionCompatiblePolicyCmdImpl()
public PaymentActionData getPaymentActionData()
public ActionResults getActionResults()
getActionResults
in interface EditPaymentInstructionPolicyCmd
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 the table ORDPAYINFO and ORDPAYMETHOD.
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 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 void setPaymentActionData(PaymentActionData data)
setPaymentActionData
in interface EditPaymentInstructionPolicyCmd
data
- The payment action data to be used in
the edit payment action.public java.lang.String getOrderChannel()
public java.lang.String getPaymentGroupId()
public void setLocale(java.util.Locale localLocale)
setLocale
in interface EditPaymentInstructionPolicyCmd
localLocale
- 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 store id.public 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()