public class RuleReader
extends java.lang.Object
Class Responsibility: It provides a static function that is used to walk through a list actions to be taken against Backend. The action list having been provided by the payment actions rule. With the help of the dataadapter, it prepares and verifies the presence of all the necessary data elements to take the indicated action against Backend. There is another important responsibility of this class (specifically the static function it houses). It's to create new Atomic Payments if the payment actions rule indicate that it is necessary to do so. This class houses static variables and functions only, and thus would not be instantiated.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static java.lang.String | EDIT_EVENT_ADD_ORDER_AMOUNT
edit event to increase order amount
|
static java.lang.String | EDIT_EVENT_REDUCE_ORDER_AMOUNT
edit event to reduce to order amount
|
static java.lang.String | EDIT_EVENT_REPLACE_PMT_INSTR
edit event to replace a PI
|
static int | EDIT_RULES
phase for use readEditRuleAndProvideActions method
|
static int | REVERSAL_RULES
phase for use readReversalRuleAndProvideActions method
|
static int | UNHANDLE_AMOUNT_RULES
phase for use prepareActionListForUnhandledAmount method
|
Constructor and Description |
---|
RuleReader(EDPServices localServices)
This method creates a new RuleReader object.
|
Modifier and Type | Method and Description |
---|---|
void | prepareActionListForUnhandledAmount(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext context, java.lang.Long edpOrderId, java.math.BigDecimal amountToProcess, java.util.HashMap listOfActionLists, int phase, java.util.List releaseIds)
This method loops through all payment instructions and until the validation amount is completely allocated, performs each of the following steps for each payment instruction:
It gets list of Atomic Payments associated with the Payment Instruction. |
java.util.List | readEditRuleAndProvideActions(java.lang.String editEvent, java.lang.Long pdpPIId, java.lang.Long edpOrderId, java.util.List releaseIds)
This method reads the edit rules and provides the actions.
|
java.util.List | readReversalRuleAndProvideActions(java.lang.String ruleType, java.lang.Long edpOrderId, java.lang.Long pdpPIId, java.lang.Long atomicPaymentId)
This method reads the cancel order rule and picks actions to possibly move from current state of APPROVED to the desired state of DNE .
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String EDIT_EVENT_ADD_ORDER_AMOUNT
public static final java.lang.String EDIT_EVENT_REDUCE_ORDER_AMOUNT
public static final java.lang.String EDIT_EVENT_REPLACE_PMT_INSTR
public static final int UNHANDLE_AMOUNT_RULES
public static final int EDIT_RULES
public static final int REVERSAL_RULES
public RuleReader(EDPServices localServices)
public void prepareActionListForUnhandledAmount(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext context, java.lang.Long edpOrderId, java.math.BigDecimal amountToProcess, java.util.HashMap listOfActionLists, int phase, java.util.List releaseIds) throws EDPException, ECException
This method loops through all payment instructions and until the validation amount is completely allocated, performs each of the following steps for each payment instruction:
The method acts through side-effect by populating the listOfActionDetailLists object. This object can be accessed at the successful completion of this method and the Backend actions contained within it can be executed
public java.util.List readEditRuleAndProvideActions(java.lang.String editEvent, java.lang.Long pdpPIId, java.lang.Long edpOrderId, java.util.List releaseIds) throws InputException, J2EEException, RuleException
public java.util.List readReversalRuleAndProvideActions(java.lang.String ruleType, java.lang.Long edpOrderId, java.lang.Long pdpPIId, java.lang.Long atomicPaymentId) throws InputException, J2EEException, RuleException
This method reads the cancel order rule and picks actions to possibly move from current state of APPROVED to the desired state of DNE . However, the rule may often indicates no action required.