public class PaymentHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
PaymentHelper()
PaymentHelper default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean | checkAccountAndCreditLineAreActive_AB(AccountAccessBean abAccount, CreditLineAccessBean abCreditLine)
Checks if both the specified Account and CreditLine are active.
|
boolean | checkAccountAndCreditLineAreActive(java.lang.String sAccountId, java.lang.String sCreditLineId)
Checks if both the specified Account and CreditLine are active.
|
void | checkCardExpiryYearAndMonth(TypedProperty requestProperties, java.lang.String errorViewName, CommandContext cmdCtx)
Checks the cardExpiryMonth and cardExpiryYear parameters if present.
|
void | checkCardNumberAndBrand(TypedProperty requestProperties, java.lang.String errorViewName, CommandContext cmdCtx)
Checks the cardNumber and cardBrand parameters if present.
|
java.lang.Long | checkFromOrdPayMthdIfAllCreditLineAreActive(java.lang.Long nOrderId)
Checks if the Account & Creditline associated with the OrdPayMthd entries of the specified order are both active.
|
void | checkPaymentInfoForDelayedProcess(TypedProperty requestProperties, OrderAccessBean abOrder, java.lang.String errorViewName, CommandContext cmdCtx)
Checks several payment related parameters before scheduling an Order or holding the Order for Approval by the Buyer Approver.
|
boolean | checkPaymentPolicyAccess(OrderAccessBean abOrder, java.lang.Long nPolicyId)
Deprecated.
- This method is obsolete. It always returns true.
|
boolean | checkPaymentPolicyAccess(OrderAccessBean abOrder, OrderItemAccessBean[] abOrderItemArray, java.lang.Long nPolicyId)
Deprecated.
- This method is obsolete. It always returns true.
|
java.lang.Long[] | findTAsWithCompatiblePaymentTC(java.lang.Long[] nTAIds, OrderAccessBean abOrder, CommandContext cmdCtx)
From the array of input TradingIds find all the Trading Agreements that have compatible PaymentTC.
|
java.lang.Long[] | findTAsWithCompatiblePaymentTC(java.lang.Long[] nTAIds, java.util.Set setOfExistingTAIds, CommandContext cmdCtx)
Deprecated.
|
java.util.Set | findTAsWithCompatiblePaymentTC(java.lang.Long nMemberId, java.util.List lstTAIds, CommandContext cmdCtx)
Find the biggest set of Trading Agreement IDs from the List of Trading Agreement IDs that have compatible Payment Terms and Conditions.
|
java.lang.Long[] | findTAsWithCompatiblePaymentTC(java.lang.Long nMemberId, java.lang.Long[] nTAIds, java.util.Set setOfExistingTAIds, CommandContext cmdCtx)
From the array of input TradingIds find all the Trading Agreements that have compatible PaymentTC that the specified customer is entiyled to.
|
java.lang.Long | getBillToAddressIdFromTC(TypedProperty requestProperties)
Checks if a tcId parameter is specified in the input TypedProperty object.
|
static PaymentHelper | getInstance()
Returns the PaymentHelper instance that can be used to invoke the instance helper methods.
|
boolean | isCardExpiryDateValid(int expiryMonth, int expiryYear)
Checks if the specified expiry date (expiryMonth and expiryYear) is valid.
|
boolean | isPaymentPolicyValid(OrderAccessBean abOrder, java.lang.String strPolicyId, java.lang.String strTCId, CommandContext commandContext)
This one basically initialized the TermConditionAccessBean from the given strTCId And all the other isPaymentPolicyValid that takes TermConditionAccessBean.
|
boolean | isPaymentPolicyValid(OrderAccessBean abOrder, java.lang.String strPolicyId, TermConditionAccessBean abPayTC, CommandContext commandContext)
Checks if the Payment Policy ID specified is valid for the Order.
|
java.lang.String | removeSpaceAndHyphenFromString(java.lang.String aCardNumber)
Returns a new string that is free of any spaces and hyphenated characters.
|
public static final java.lang.String COPYRIGHT
public boolean checkAccountAndCreditLineAreActive(java.lang.String sAccountId, java.lang.String sCreditLineId) throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException
public boolean checkAccountAndCreditLineAreActive_AB(AccountAccessBean abAccount, CreditLineAccessBean abCreditLine) throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException
public void checkCardExpiryYearAndMonth(TypedProperty requestProperties, java.lang.String errorViewName, CommandContext cmdCtx) throws ECException
public void checkCardNumberAndBrand(TypedProperty requestProperties, java.lang.String errorViewName, CommandContext cmdCtx) throws ECException
This helper method calls the CheckCCNumber Task Command to do the actual checking.
public java.lang.Long checkFromOrdPayMthdIfAllCreditLineAreActive(java.lang.Long nOrderId) throws javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException, java.rmi.RemoteException
public void checkPaymentInfoForDelayedProcess(TypedProperty requestProperties, OrderAccessBean abOrder, java.lang.String errorViewName, CommandContext cmdCtx) throws ECException
This method may call other Task Commands to do the actual checking of the parameters. The CheckCCNumber and DoLuhnCheck.
public boolean checkPaymentPolicyAccess(OrderAccessBean abOrder, OrderItemAccessBean[] abOrderItemArray, java.lang.Long nPolicyId)
public boolean checkPaymentPolicyAccess(OrderAccessBean abOrder, java.lang.Long nPolicyId)
public java.lang.Long[] findTAsWithCompatiblePaymentTC(java.lang.Long[] nTAIds, OrderAccessBean abOrder, CommandContext cmdCtx) throws ECException
public java.lang.Long[] findTAsWithCompatiblePaymentTC(java.lang.Long[] nTAIds, java.util.Set setOfExistingTAIds, CommandContext cmdCtx) throws ECException
public java.lang.Long[] findTAsWithCompatiblePaymentTC(java.lang.Long nMemberId, java.lang.Long[] nTAIds, java.util.Set setOfExistingTAIds, CommandContext cmdCtx) throws ECException
public java.util.Set findTAsWithCompatiblePaymentTC(java.lang.Long nMemberId, java.util.List lstTAIds, CommandContext cmdCtx) throws ECException
public java.lang.Long getBillToAddressIdFromTC(TypedProperty requestProperties) throws ECException
public static PaymentHelper getInstance()
public boolean isCardExpiryDateValid(int expiryMonth, int expiryYear)
public boolean isPaymentPolicyValid(OrderAccessBean abOrder, java.lang.String strPolicyId, TermConditionAccessBean abPayTC, CommandContext commandContext) throws ECException
public boolean isPaymentPolicyValid(OrderAccessBean abOrder, java.lang.String strPolicyId, java.lang.String strTCId, CommandContext commandContext) throws ECException
public java.lang.String removeSpaceAndHyphenFromString(java.lang.String aCardNumber)