public class QueryHandler
extends java.lang.Object
implements java.io.Serializable
Provides query functionality for EDP Internal components and CSR support.
It uses information coming from three facades (Stateless Session Bean):
The parameter details when specified, will indicate that extra information is to be retrieved in a particular Activity Log Record (ALR) or list of ALRs.
In the current implementation, acquiring detailed information means querying the payment backend system for an explanatory message on a kryptic error key. Or it means querying for return code returned in a failed or pending operation. Operations that have successfully completed don't have the explanatory information because the results and return codes are trivial.
The parameter details might be used in the future for extra information that does not need to be retrieved in overall queries to the ALRs.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
QueryHandler(EDPServices localServices)
Creates a new QueryHandler service object.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection | getAvailablePaymentMethodsInStore(java.lang.String paymentGroupdId)
Obtains a list of payment methods associated to a store that are available for shoppers to use.
|
java.util.Collection | getAvailableRefundMethodsInStore(java.lang.String paymentGroupdId)
Method listRefundMethods .
|
PaymentDataAnalyzer | getBackendPaymentDataByAtomicPaymentId(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long policyId, java.lang.Long apId)
Queries payment backend system for the current payment state information associated to an Atomic Payment.
|
PaymentDataAnalyzer | getBackendPaymentDataByBackendId(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long policyId, java.lang.String backendPaymentId)
Queries payment backend system for the current payment state information.
|
PaymentInstruction | getBackendPaymentInstruction(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long policyId, java.lang.String backendPiId, java.lang.Boolean markSensitive)
Gets the PPC backend data for a given payment instruction.
|
java.util.Map | getBackendPaymentInstructionData(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long policyId, java.lang.String backendPiId)
Gets the PPC backend data for a given payment instruction.
|
java.util.List | getBackendPaymentInstructionInOrder(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long orderId, boolean maskSensitiveData)
Get the valid backend payment instructions in an order.
|
PaymentDataAnalyzer | getBackendRefundData(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long raId)
Queries payment backend system for the current payment state information associated to an Atomic Payment.
|
PaymentDataAnalyzer | getBackendRefundData(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.String paymentSystem, java.lang.String backendRefundInstructionId, java.lang.Long policyId, java.lang.String backendCreditId)
Queries payment backend system for the current credit/refund state information.
|
java.lang.String | getBackendRefundStatus(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long rmaId, java.lang.String backendRefundInstructionId, java.lang.String backendCreditId, boolean needGlobalized)
Queries payment backend system for the current credit/refund status.
|
java.util.Collection | getCompleteOrderActivityHistory(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long orderId, boolean details)
Finds a complete history of Activity log Records (ALRs) for an order.
|
java.util.Collection | getCompleteRmaActivityHistory(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long rmaId, boolean details)
Finds a complete history of Activity log Records (ALRs) for an RMA.
|
java.lang.String | getOverallEDPPaymentInstructionStatus(java.lang.Long piId, java.lang.Integer storeId, java.util.Locale locale, java.lang.Long orderId, boolean needGlobalized)
Obtains the overall EDPpaymentInstruction status for a given PI in an order.
|
java.lang.String | getOverallOrderPaymentStatus(java.lang.Integer storeId, java.util.Locale locale, CommandContext commandContext, java.lang.Long orderId, boolean needGlobalized)
Obtains the overall payment activity status in an order.
|
java.lang.String | getOverallPaymentInstructionStatus(java.lang.Integer storeId, java.util.Locale locale, java.lang.Long orderId, java.lang.String backendPaymentInstructionId, boolean needGlobalized)
Obtains the overall life-cycle status of a payment instruction.
|
java.lang.String | getOverallRefundInstructionStatus(java.lang.Integer storeId, java.util.Locale locale, java.lang.Long rmaId, java.lang.String backendRefundInstructionid, boolean needGlobalized)
Method getOverallRefundInstructionStatus.
|
java.lang.String | getOverallRmaRefundStatus(java.lang.Integer storeId, java.util.Locale locale, CommandContext commandContext, java.lang.Long rmaId, boolean needGlobalized)
Obtains the overall payment activity status in an RMA.
|
java.util.Collection | getPaymentActivityHistory(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long orderOrRmaId, boolean details)
Finds the payment activity history for an order.
|
java.util.Collection | getPaymentActivityHistoryByRelease(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long orderId, java.lang.Long releaseId, boolean details)
Method getPaymentActivityHistoryByRelease.
|
java.lang.String | getPaymentConfigurationId(java.lang.Long policyId)
get paymentConfigurationId from POLICY table by policy id
|
java.util.Collection | getPaymentInstructionActivityHistory(java.lang.Integer storeId, java.util.Locale locale, java.lang.Long orderId)
Finds the payment instruction activity history for an order.
|
java.util.Collection | getPaymentInstructionsInOrder(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long orderId, boolean maskSensitiveData)
Obtains a list of Payment Instructions associated to an order.
|
java.util.Collection | getRefundActivityHistory(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long rmaId, boolean details)
Method getRefundActivityHistory.
|
java.util.Collection | getRefundInstructionActivityHistory(java.lang.Integer storeId, java.util.Locale locale, java.lang.Long rmaId)
Finds the refunds instruction activity history for an RMA.
|
java.util.Collection | getRefundInstructionsInRma(java.lang.Integer storeId, java.lang.Long rmaId)
Obtains a list of Refund Instructions associated to an RMA.
|
java.util.Collection | getReleasesInOrder(java.lang.Integer storeId, java.lang.Long orderId)
Obtains a list of payment releases in the order.
|
java.util.Collection | getUnresolvedFailuresInOrder(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long orderId, boolean details)
Obtains a list of Activity Log Records (ALR) that contains unresolved failures for an order.
|
java.util.Collection | getUnresolvedFailuresInRma(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long rmaId, boolean details)
Obtains a list of Activity Log Records (ALR) that contains unresolved failures for an RMA.
|
java.util.Collection | orderRecordsByDecreasingTimestamp(java.util.Collection inputRecords)
Sorts a list of Activity Log Records (ALRs) keep the most recently created records first.
|
java.util.Collection | orderRecordsByDecreasingTimestamp(java.util.Collection inputRecords, java.lang.String payInsID)
Sorts a list of Activity Log Records (ALRs) of one PI keep the most recently created records first.
|
public static final java.lang.String COPYRIGHT
public QueryHandler(EDPServices localServices)
Creates a new QueryHandler service object.
public java.util.Collection getAvailablePaymentMethodsInStore(java.lang.String paymentGroupdId) throws CommunicationException, J2EEException
Obtains a list of payment methods associated to a store that are available for shoppers to use.
public java.util.Collection getAvailableRefundMethodsInStore(java.lang.String paymentGroupdId) throws CommunicationException, J2EEException
public PaymentDataAnalyzer getBackendPaymentDataByAtomicPaymentId(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long policyId, java.lang.Long apId) throws J2EEException, InputException, ECException
Queries payment backend system for the current payment state information associated to an Atomic Payment.
public PaymentDataAnalyzer getBackendPaymentDataByBackendId(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long policyId, java.lang.String backendPaymentId) throws ECException
Queries payment backend system for the current payment state information.
public java.util.Map getBackendPaymentInstructionData(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long policyId, java.lang.String backendPiId) throws J2EEException, BackendException, ECException
public PaymentInstruction getBackendPaymentInstruction(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long policyId, java.lang.String backendPiId, java.lang.Boolean markSensitive) throws J2EEException, BackendException, ECException
public PaymentDataAnalyzer getBackendRefundData(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long raId) throws J2EEException, InputException, CommunicationException
Queries payment backend system for the current payment state information associated to an Atomic Payment.
public PaymentDataAnalyzer getBackendRefundData(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.String paymentSystem, java.lang.String backendRefundInstructionId, java.lang.Long policyId, java.lang.String backendCreditId) throws CommunicationException, J2EEException
Queries payment backend system for the current credit/refund state information.
public java.lang.String getBackendRefundStatus(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long rmaId, java.lang.String backendRefundInstructionId, java.lang.String backendCreditId, boolean needGlobalized) throws InputException, J2EEException, CommunicationException
Queries payment backend system for the current credit/refund status.
public java.util.Collection getCompleteOrderActivityHistory(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long orderId, boolean details) throws InputException, J2EEException, InternalException, ECException
Finds a complete history of Activity log Records (ALRs) for an order.
public java.util.Collection getCompleteRmaActivityHistory(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long rmaId, boolean details) throws InputException, J2EEException, InternalException, ECException
Finds a complete history of Activity log Records (ALRs) for an RMA.
public java.lang.String getOverallEDPPaymentInstructionStatus(java.lang.Long piId, java.lang.Integer storeId, java.util.Locale locale, java.lang.Long orderId, boolean needGlobalized) throws J2EEException, InputException
Obtains the overall EDPpaymentInstruction status for a given PI in an order.
The rules to determine the overall EDPpaymentInstruction status is:
public java.lang.String getOverallOrderPaymentStatus(java.lang.Integer storeId, java.util.Locale locale, CommandContext commandContext, java.lang.Long orderId, boolean needGlobalized) throws J2EEException, InputException
Obtains the overall payment activity status in an order.
public java.lang.String getOverallPaymentInstructionStatus(java.lang.Integer storeId, java.util.Locale locale, java.lang.Long orderId, java.lang.String backendPaymentInstructionId, boolean needGlobalized) throws J2EEException, InputException
Obtains the overall life-cycle status of a payment instruction.
Life-cycle on Transaction Instructions (Payment Instructions or Refund Instructions) corresponds to the following operations: create, edit, cancel, remove
public java.lang.String getOverallRefundInstructionStatus(java.lang.Integer storeId, java.util.Locale locale, java.lang.Long rmaId, java.lang.String backendRefundInstructionid, boolean needGlobalized) throws J2EEException, InputException
public java.lang.String getOverallRmaRefundStatus(java.lang.Integer storeId, java.util.Locale locale, CommandContext commandContext, java.lang.Long rmaId, boolean needGlobalized) throws J2EEException, InputException
Obtains the overall payment activity status in an RMA.
public java.util.Collection getPaymentActivityHistory(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long orderOrRmaId, boolean details) throws InputException, J2EEException, InternalException, ECException
Finds the payment activity history for an order.
public java.util.Collection getPaymentActivityHistoryByRelease(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long orderId, java.lang.Long releaseId, boolean details) throws InputException, J2EEException, InternalException, ECException
public java.util.Collection getPaymentInstructionActivityHistory(java.lang.Integer storeId, java.util.Locale locale, java.lang.Long orderId) throws J2EEException, InputException
Finds the payment instruction activity history for an order.
public java.util.Collection getPaymentInstructionsInOrder(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long orderId, boolean maskSensitiveData) throws J2EEException, InputException, CommunicationException
Obtains a list of Payment Instructions associated to an order.
public java.util.List getBackendPaymentInstructionInOrder(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long orderId, boolean maskSensitiveData) throws J2EEException, InputException, CommunicationException
public java.util.Collection getRefundActivityHistory(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long rmaId, boolean details) throws InputException, J2EEException, InternalException, ECException
public java.util.Collection getRefundInstructionActivityHistory(java.lang.Integer storeId, java.util.Locale locale, java.lang.Long rmaId) throws J2EEException, InputException
Finds the refunds instruction activity history for an RMA.
public java.util.Collection getRefundInstructionsInRma(java.lang.Integer storeId, java.lang.Long rmaId) throws J2EEException, InputException
Obtains a list of Refund Instructions associated to an RMA.
public java.util.Collection getUnresolvedFailuresInOrder(java.lang.Integer storeId, java.util.Locale locale, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long orderId, boolean details) throws InputException, J2EEException, InternalException, ECException
Obtains a list of Activity Log Records (ALR) that contains unresolved failures for an order.
That last financial operation for each payment instruction is checked. If the operation is not successful, the record of this operation is added to the list of ALRs to be returned.
public java.util.Collection getUnresolvedFailuresInRma(java.lang.Integer storeId, java.util.Locale locale, java.lang.String paymentGroupId, java.lang.String orderChannel, CommandContext commandContext, java.lang.Long rmaId, boolean details) throws InputException, J2EEException, InternalException, ECException
Obtains a list of Activity Log Records (ALR) that contains unresolved failures for an RMA.
That last financial operation for each refund instruction is checked. If the operation is not successful, the record of this operation is added to the list of ALRs to be returned.
public java.util.Collection getReleasesInOrder(java.lang.Integer storeId, java.lang.Long orderId) throws InputException, J2EEException
Obtains a list of payment releases in the order.
public java.util.Collection orderRecordsByDecreasingTimestamp(java.util.Collection inputRecords)
Sorts a list of Activity Log Records (ALRs) keep the most recently created records first.
public java.util.Collection orderRecordsByDecreasingTimestamp(java.util.Collection inputRecords, java.lang.String payInsID)
Sorts a list of Activity Log Records (ALRs) of one PI keep the most recently created records first.
public java.lang.String getPaymentConfigurationId(java.lang.Long policyId)