com.bankframe.ei.txnhandler
Class TransactionHandlerUtils

java.lang.Object
  extended bycom.bankframe.ei.txnhandler.TransactionHandlerUtils

public class TransactionHandlerUtils
extends java.lang.Object

This class provides methods for the TransactionHandler to check if caching of metadata and routes has been turned on and a helper method for retrieving metadata from an enumeration.


Constructor Summary
TransactionHandlerUtils()
           
 
Method Summary
static java.util.List generateTxnRequestFields(java.lang.String txnCode, java.lang.String txnType)
          This method generates the Transaction Request fields List for specified transaction code and type
static java.util.List generateTxnResponseErrorConditions(java.lang.String txnCode, java.lang.String txnType)
          This method gets the Transaction Response Error-Conditions.
static java.util.Map generateTxnResponseFields(java.util.List txnMetaDataList)
          This method generates a Map of the Response Transaction Fields from the field names that are specified in the Meta-data List.
static java.util.List generateTxnResponseMetaData(java.lang.String txnCode, java.lang.String txnType)
          This method generates the Transaction Response Meta-data List of entity mappings for specified transaction code and type
static Destination getDestination(TransactionRoute txnRoute)
          This method gets the Destination for a given transaction route.
static TransactionErrorCondition getErrorConditionFromList(java.util.Iterator iterator)
          This method returns the next TransactionErrorCondition entity from an Enumeration.
static Cache getHostCache(java.lang.String cacheName)
          This method returns a cache instance that has been intialized with the parameters from the BankframeResouce.properties file for the transaction handler host cache.
static MetaData getMetaDataFromIterator(java.util.Iterator txnMetaData)
          This method returns the remote interface of the next MetaData entity from a List This is used during the processing of a host response.
static MetaDataHome getMetaDataHome()
          This method returns a MetaDataHome interface.
static RequestTransactionFieldHome getRequestTransactionFieldHome()
          This method returns a RequestTransactionFieldHome object.
static ResponseTransactionFieldHome getResponseTransactionFieldHome()
          This method returns a ResponseTransactionFieldHome interface.
static TransactionErrorConditionHome getTxnErrorConditionHome()
          This method returns a TransactionErrorConditionHome interface.
static TransactionField getTxnFieldFromList(java.util.Iterator txnFields)
          This method returns the next TransactionField entity from a list.
static TransactionField getTxnResponseFieldFromName(ResponseTransactionFieldHome txnFieldHome, java.lang.String txnFieldName, boolean metaDataCached)
          This method finds the RowAccess interface to a transaction field entity from the transaction field name.
static TransactionRoute getTxnRoute(java.lang.String txnCode, java.lang.String txnType, int hostSequenceNumber)
          This method gets the Transaction Route for a given txnCode and txnType.
static boolean isMetaDataCached()
          This method checks the BankframeResource.properties file to see if cahcing of metadata has been turned on.
static boolean isRoutesCached()
          This method checks the BankframeResource.properties file to see if cahcing of routes has been turned on.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionHandlerUtils

public TransactionHandlerUtils()
Method Detail

generateTxnRequestFields

public static java.util.List generateTxnRequestFields(java.lang.String txnCode,
                                                      java.lang.String txnType)
                                               throws ProcessingErrorException
This method generates the Transaction Request fields List for specified transaction code and type

Parameters:
txnCode - String Transaction Code
txnType - String Transaction Type
Returns:
List of transaction request fields
Throws:
ProcessingErrorException - if an error occurred

generateTxnResponseErrorConditions

public static java.util.List generateTxnResponseErrorConditions(java.lang.String txnCode,
                                                                java.lang.String txnType)
                                                         throws ProcessingErrorException,
                                                                javax.ejb.FinderException
This method gets the Transaction Response Error-Conditions. This is called by the Data-Format class to determine Error-conditions for the specified txnCode and txnType.

Parameters:
txnCode - String Transaction Code
txnType - String Transaction Type
Returns:
List of Error-Condition entity remote interfaces.
Throws:
ProcessingErrorException - if an error occurred
javax.ejb.FinderException - if no entities found

generateTxnResponseFields

public static java.util.Map generateTxnResponseFields(java.util.List txnMetaDataList)
                                               throws ProcessingErrorException
This method generates a Map of the Response Transaction Fields from the field names that are specified in the Meta-data List.

Parameters:
txnMetaDataList - is List of txn Meta-data entity mappings
Returns:
Map of Response Transaction Fields
Throws:
ProcessingErrorException - if an error occurred

generateTxnResponseMetaData

public static java.util.List generateTxnResponseMetaData(java.lang.String txnCode,
                                                         java.lang.String txnType)
                                                  throws ProcessingErrorException
This method generates the Transaction Response Meta-data List of entity mappings for specified transaction code and type

Parameters:
txnCode - String Transaction Code
txnType - String Transaction Type
Returns:
List of Transaction Response meta-data
Throws:
ProcessingErrorException - if an error occurred

getDestination

public static Destination getDestination(TransactionRoute txnRoute)
                                  throws ProcessingErrorException
This method gets the Destination for a given transaction route. This Destination determines the Connector JNDI and properties

Returns:
Destination interface
Throws:
ProcessingErrorException - if an error occurs

getErrorConditionFromList

public static TransactionErrorCondition getErrorConditionFromList(java.util.Iterator iterator)
This method returns the next TransactionErrorCondition entity from an Enumeration.

Parameters:
iterator - is an iterator to a List of Transaction Error-Conditions
Returns:
TransactionErrorCondition is the remote interface to a Transaction Error-Condition

getMetaDataFromIterator

public static MetaData getMetaDataFromIterator(java.util.Iterator txnMetaData)
This method returns the remote interface of the next MetaData entity from a List This is used during the processing of a host response.

Parameters:
txnMetaData - is Iterator of Meta-Data entities
Returns:
the remote MetaData interface to a Meta-Data object

getMetaDataHome

public static MetaDataHome getMetaDataHome()
                                    throws ProcessingErrorException
This method returns a MetaDataHome interface.

Returns:
the MetaDataHome interface
Throws:
ProcessingErrorException

getRequestTransactionFieldHome

public static RequestTransactionFieldHome getRequestTransactionFieldHome()
                                                                  throws ProcessingErrorException
This method returns a RequestTransactionFieldHome object.

Returns:
the RequestTransactionFieldHome object.
Throws:
ProcessingErrorException

getResponseTransactionFieldHome

public static ResponseTransactionFieldHome getResponseTransactionFieldHome()
                                                                    throws ProcessingErrorException
This method returns a ResponseTransactionFieldHome interface.

Returns:
the ResponseTransactionFieldHome interface
Throws:
ProcessingErrorException

getTxnErrorConditionHome

public static TransactionErrorConditionHome getTxnErrorConditionHome()
                                                              throws ProcessingErrorException
This method returns a TransactionErrorConditionHome interface.

Returns:
the MetaDataHome interface
Throws:
ProcessingErrorException

getTxnFieldFromList

public static TransactionField getTxnFieldFromList(java.util.Iterator txnFields)
This method returns the next TransactionField entity from a list. This is called by the Data-Format class to process the host request.

Parameters:
txnFields - is Iterator of transaction field List
Returns:
TransactionField is the remote interface to a txn field

getTxnResponseFieldFromName

public static TransactionField getTxnResponseFieldFromName(ResponseTransactionFieldHome txnFieldHome,
                                                           java.lang.String txnFieldName,
                                                           boolean metaDataCached)
                                                    throws javax.ejb.FinderException,
                                                           java.rmi.RemoteException,
                                                           ProcessingErrorException
This method finds the RowAccess interface to a transaction field entity from the transaction field name. This is used during the processing of a host response.

Returns:
the remote TransactionField interface to a Response Txn Field object
Throws:
ProcessingErrorException - if an error occurred
javax.ejb.FinderException - if failed to find fields for given txnCode and txnType
java.rmi.RemoteException - if error occured getting a field value

getTxnRoute

public static TransactionRoute getTxnRoute(java.lang.String txnCode,
                                           java.lang.String txnType,
                                           int hostSequenceNumber)
                                    throws ProcessingErrorException
This method gets the Transaction Route for a given txnCode and txnType.

Parameters:
txnCode - Transaction Code
hostSequenceNumber - the host Sequence number of the transaction route
Returns:
TransactionRoute for give transaction code and type
Throws:
ProcessingErrorException - if an error occurs

isMetaDataCached

public static boolean isMetaDataCached()
This method checks the BankframeResource.properties file to see if cahcing of metadata has been turned on.

Returns:
boolean true/false

isRoutesCached

public static boolean isRoutesCached()
This method checks the BankframeResource.properties file to see if cahcing of routes has been turned on.

Returns:
boolean true/false

getHostCache

public static Cache getHostCache(java.lang.String cacheName)
This method returns a cache instance that has been intialized with the parameters from the BankframeResouce.properties file for the transaction handler host cache.

Parameters:
cacheName - the name of this cache


Copyright © 2005, 2007, Oracle. All rights reserved.