Basic Concepts of Processed Transaction Resource
Overview
The Processed Transaction Resource is a class that provides methods to handle processed transactions. It is annotated with the path /processedTransaction
Methods in Processed Transaction Resource
The class includes several methods to handle different types of transactions. These methods are designed to retrieve, process, and manipulate transaction data, and they produce JSON responses containing the transaction details.
getProcessedTransactionExternal
getProcessedTransactionExternal
The getProcessedTransactionExternal
getProcessedTransactionInternal
The getProcessedTransactionExternal
getProcessedTransactionInternal
@GET
@Produces(MediaType.APPLICATION_JSON)
public Response getProcessedTransactionExternal(
@QueryParam(LIMIT) Integer limit,
@QueryParam(OFFSET) Integer offset)
{
Response myResponse = getProcessedTransactionInternal(limit, offset);
HBankDataAccess myHBankDataAccess = new HBankDataAccess();
myHBankDataAccess.terminate();
return myResponse;
}
getProcessedTransactionInternal
getProcessedTransactionInternal
The getProcessedTransactionInternal
The getProcessedTransactionInternal
public Response getProcessedTransactionInternal(
@QueryParam(LIMIT) Integer limit,
@QueryParam(OFFSET) Integer offset)
{
if (offset == null)
{
offset = 0;
}
if (limit == null)
{
limit = 250000;
}
JSONObject response = new JSONObject();
JSONArray processedTransactionsJSON = null;
int numberOfProcessedTransactions = 0;
Integer sortCode = this.getSortCode();
com.ibm.cics.cip.bankliberty.web.db2.ProcessedTransaction myProcessedTransaction = new com.ibm.cics.cip.bankliberty.web.db2.ProcessedTransaction();
com.ibm.cics.cip.bankliberty.web.db2.ProcessedTransaction[] processedTransactions = null;
processTransfer
processTransfer
The processTransfer
The processTransfer
private JSONObject processTransfer(JSONObject proctran,
ProcessedTransaction processedTransaction)
{
// Process bank to bank transfer records
if (processedTransaction.getType()
.compareTo(PROCTRAN.PROC_TY_TRANSFER) == 0)
{
proctran.put(JSON_TARGET_ACCOUNT,
processedTransaction.getTargetAccountNumber());
proctran.put(JSON_TARGET_SORT_CODE,
processedTransaction.getTargetSortcode());
}
return proctran;
}
processDeleteCreateCustomer
processDeleteCreateCustomer
The processDeleteCreateCustomer
The processDeleteCreateCustomer
private JSONObject processDeleteCreateCustomer(JSONObject proctran,
ProcessedTransaction processedTransaction, DateFormat myDateFormat)
{
// Deal with create account and delete customer
if (processedTransaction.getType()
.compareTo(PROCTRAN.PROC_TY_BRANCH_DELETE_CUSTOMER) == 0
|| processedTransaction.getType()
.compareTo(PROCTRAN.PROC_TY_WEB_DELETE_CUSTOMER) == 0
|| (processedTransaction.getType()
.compareTo(PROCTRAN.PROC_TY_BRANCH_CREATE_CUSTOMER) == 0
|| processedTransaction.getType().compareTo(
PROCTRAN.PROC_TY_WEB_CREATE_CUSTOMER) == 0))
{
proctran.put(JSON_DATE_OF_BIRTH,
myDateFormat.format(processedTransaction.getDateOfBirth()));
proctran.put(JSON_CUSTOMER_NAME,
processedTransaction.getCustomerName());
proctran.put(JSON_CUSTOMER, processedTransaction.getCustomer());
}
return proctran;
}
processDeleteCreateAccount
processDeleteCreateAccount
The processDeleteCreateAccount
The processDeleteCreateAccount
private JSONObject processDeleteCreateAccount(JSONObject proctran,
ProcessedTransaction processedTransaction, DateFormat myDateFormat)
{
// Deal with create account and delete account
if (processedTransaction.getType()
.compareTo(PROCTRAN.PROC_TY_BRANCH_DELETE_ACCOUNT) == 0
|| processedTransaction.getType()
.compareTo(PROCTRAN.PROC_TY_WEB_DELETE_ACCOUNT) == 0
|| processedTransaction.getType()
.compareTo(PROCTRAN.PROC_TY_BRANCH_CREATE_ACCOUNT) == 0
|| processedTransaction.getType()
.compareTo(PROCTRAN.PROC_TY_WEB_CREATE_ACCOUNT) == 0)
{
proctran.put(JSON_ACCOUNT_TYPE,
processedTransaction.getAccountType());
proctran.put(JSON_LAST_STATEMENT, myDateFormat
.format(processedTransaction.getLastStatement()));
proctran.put(JSON_NEXT_STATEMENT, myDateFormat
.format(processedTransaction.getNextStatement()));
proctran.put(JSON_CUSTOMER, processedTransaction.getCustomer());
}
This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human