|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.ibm.etill.ldbcardcassette.LdbCardCassette
The Cassette object is responsible for managing the cassettes resources within the framework. The framework uses Cassette methods for initialization, creating new objects, resurrecting existing objects from the database, and for servicing merchant requests.
In many cases the Cassette object uses other objects to perform its responsiblities. For example, AcceptPayment requests are sent to the cassette's Order object for processing.
Inner Class Summary | |
static class |
LdbCardCassette.LuhnStringValidationItem
This class converts a parameter's value from a byte array into a string and then validates that the result passes the Luhn check. |
Field Summary | |
private static java.util.Hashtable |
clsValidationTable
This cassette class attribute contains the hashtable that defines the validation parameters for cassette dependent protocol data. |
private static java.lang.String |
COPYRIGHT
|
Constructor Summary | |
LdbCardCassette()
This constructor is used by the framework during initialization. |
Method Summary | |
(package private) static void |
|
java.util.Vector |
createComPoints()
This method is used by the framework during initialization. |
com.ibm.etill.framework.cassette.ProtocolRequest |
createProtocolRequest(com.ibm.etill.framework.io.ETillConnection argConnection)
This method is called by the framework when a ComPoint object receives a new message. |
void |
destroyComPoints()
This method is used by the framework when the cassette is stopped. |
java.util.Hashtable |
getParameterValidationTable()
This method is used by the framework to obtain a hashtable that contains an element for each cassette dependent protocol data keyword that is to be validated and converted into the proper] data type by the framework before it is passed to the cassette in a parameter table. |
void |
initializeCassette()
This method is used by the framework during initialization. |
com.ibm.etill.framework.cassette.CassetteBatch |
newCassetteBatch(com.ibm.etill.framework.payapi.Batch argFrameworkBatch,
com.ibm.etill.framework.payapi.ParameterTable argProtocolData)
This method is called by the framework when an OpenBatch request is received. |
com.ibm.etill.framework.cassette.CassetteTransaction |
newCassetteCredit(com.ibm.etill.framework.payapi.Credit argFrameworkCredit,
com.ibm.etill.framework.payapi.ParameterTable argProtocolData)
This method is called by the framework when a Refund request is received. |
com.ibm.etill.framework.cassette.CassetteOrder |
newCassetteOrder(com.ibm.etill.framework.payapi.Order argFrameworkOrder,
com.ibm.etill.framework.payapi.ParameterTable argProtocolData)
This method is called by the framework when an ReceivePayment or AcceptPayment request is received. |
com.ibm.etill.framework.cassette.CassetteTransaction |
newCassettePayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment,
com.ibm.etill.framework.payapi.ParameterTable argProtocolData)
This method is called by the framework when an Approve request is received. |
private void |
processAdminRequest(com.ibm.etill.framework.cassette.AdminRequest argRequest,
com.ibm.etill.framework.cassette.APIResponse argResponse)
This method is used by the cassette object to process any administration requests. |
void |
readCassetteConfig()
This method is used by the framework during initialization. |
com.ibm.etill.framework.cassette.CassetteBatch |
resurrectCassetteBatch(com.ibm.etill.framework.payapi.Batch argFrameworkBatch)
This method is called by the framework when a request is received for a batch that has not been found in the cache. |
com.ibm.etill.framework.cassette.CassetteTransaction |
resurrectCassetteCredit(com.ibm.etill.framework.payapi.Credit argFrameworkCredit)
This method is called by the framework when a request is received for a credit that has not been found in the cache. |
com.ibm.etill.framework.cassette.CassetteOrder |
resurrectCassetteOrder(com.ibm.etill.framework.payapi.Order argFrameworkOrder)
This method is called by the framework when a request is received for an order that has not been found in the cache. |
com.ibm.etill.framework.cassette.CassetteTransaction |
resurrectCassettePayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment)
This method is called by the framework when a request is received for a payment that has not been found in the cache. |
void |
service(com.ibm.etill.framework.cassette.CassetteRequest argRequest,
com.ibm.etill.framework.cassette.CassetteResponse argResponse)
This method is called by the framework to service administration requests, order requests, batch requests, and protocol requests. |
private void |
serviceAdminRequest(com.ibm.etill.framework.cassette.AdminRequest argRequest,
com.ibm.etill.framework.cassette.APIResponse argResponse)
This method is used by the cassette object to service administration requests. |
void |
setMessageID(java.lang.String argId)
This method is used by the framework to give the cassette its resource bundle identifier. |
void |
shutdown()
This method is called by the framework when a the cassette is being stopped. |
void |
start()
This method is used by the framework during initialization. |
private void |
traceParameters(com.ibm.etill.framework.cassette.CassetteRequest argRequest)
This method is used by the cassette to trace the protocol data keywords and values that were passed to the cassette. |
private void |
validateAdminRequest(com.ibm.etill.framework.cassette.AdminRequest argRequest,
com.ibm.etill.framework.cassette.APIResponse argResponse)
This method is used by the cassette object to validate the cassette dependent data for any administration request. |
void |
verifyConfig()
This method is used by the framework during initialization. |
Field Detail |
private static final java.lang.String COPYRIGHT
private static final java.util.Hashtable clsValidationTable
Constructor Detail |
public LdbCardCassette()
NOTE: The framework has not initialized the cassette when this constructor is called. This method cannot issue trace, log, or database commands at this point. All cassette initialization should be performed in subsequent initialization calls.
Method Detail |
static void()
public void setMessageID(java.lang.String argId)
The resource bundle for the cassette is automatically loaded by the framework before any other initialization is attempted. The name of the resource bundle is derived from the payment type defined for the cassette. For example, if you are implementing a cassette for payment type Xxxx, you must supply a default property file of the form Xxxx.properties. Additional property files can be provided for national languages other than your default language whenever required, without affecting any Java code in your package. See the JavaDoc for java.util.ResourceBundle for more information.
argResourceBundleId
- - an integer, assigned by the
framework, that represents the resource bundle that has been
loaded for this cassette.public void readCassetteConfig() throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, the account class reads the configuration and constructs an account object for each row in the account configuration table.
public void verifyConfig() throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, the cassette uses its account class to verify that the configuration is correct.
public void initializeCassette() throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, the cassette has each account object initialize.
public java.util.Vector createComPoints() throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, the data exchange between the cassette and the payment engine is synchronous. The thread processing the merchant request is held while waiting for a response from the payment engine. ComPoint objects are not used, so an empty Vector is returned.
public void start()
For this cassette, all the payment operations are synchronous. If the framework is shutdown in the middle of a transaction, it is as if the transaction was never performed. The merchant never receives confirmation and retries the operation. Therefore this method merely logs a message indicating that initializtion is complete.
public java.util.Hashtable getParameterValidationTable()
public com.ibm.etill.framework.cassette.CassetteOrder newCassetteOrder(com.ibm.etill.framework.payapi.Order argFrameworkOrder, com.ibm.etill.framework.payapi.ParameterTable argProtocolData) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, a cassette order object is constructed and returned.
argFrameworkOrder
- - a framework order object constructed
by the framework for a ReceivePayment or AcceptPayment request.argProtocolData
- - a hashtable containing the protocol
data values specified by the merchant.public com.ibm.etill.framework.cassette.CassetteOrder resurrectCassetteOrder(com.ibm.etill.framework.payapi.Order argFrameworkOrder) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, a new cassette order is constructed using the constructor that resurrects the order. This method reads the correct row from the cassette's order table and initializes the object with the values found there.
argFrameworkOrder
- - a framework order object that has
been resurrected from the ETORDER database table.public com.ibm.etill.framework.cassette.CassetteTransaction newCassettePayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment, com.ibm.etill.framework.payapi.ParameterTable argProtocolData) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, a cassette payment object is constructed and returned.
argFrameworkPayment
- - a framework payment object
constructed by the framework for an Approve request.argProtocolData
- - a hashtable containing the protocol
data values specified by the merchant.public com.ibm.etill.framework.cassette.CassetteTransaction resurrectCassettePayment(com.ibm.etill.framework.payapi.Payment argFrameworkPayment) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, a new cassette payment is constructed using the constructor that resurrects the payment. This method reads the correct row from the cassette's payment table and initializes the object with the values found there.
argFrameworkPayment
- - a framework payment object that
has been resurrected from the ETPAYMENT database table.public com.ibm.etill.framework.cassette.CassetteTransaction newCassetteCredit(com.ibm.etill.framework.payapi.Credit argFrameworkCredit, com.ibm.etill.framework.payapi.ParameterTable argProtocolData) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, a cassette credit object is constructed and returned.
argFrameworkCredit
- - a framework credit object
constructed the framework for a new Refund request.argProtocolData
- - a hashtable containing the protocol
data values specified by the merchant.public com.ibm.etill.framework.cassette.CassetteTransaction resurrectCassetteCredit(com.ibm.etill.framework.payapi.Credit argFrameworkCredit) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, a new cassette credit is constructed using the constructor that resurrects the credit. This method reads the correct row from the cassette's credit table and initializes the object with the values found there.
argFrameworkCredit
- - a framework credit object that
has been resurrected from the ETCREDIT database table.public com.ibm.etill.framework.cassette.CassetteBatch newCassetteBatch(com.ibm.etill.framework.payapi.Batch argFrameworkBatch, com.ibm.etill.framework.payapi.ParameterTable argProtocolData) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, a cassette batch object is constructed and returned.
argFrameworkBatch
- - a framework batch object
constructed by the framework for a BatchOpen request.argProtocolData
- - a hashtable containing the protocol
data values specified by the merchant.public com.ibm.etill.framework.cassette.CassetteBatch resurrectCassetteBatch(com.ibm.etill.framework.payapi.Batch argFrameworkBatch) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, a new cassette batch is constructed using the constructor that resurrects the batch. This method reads the correct row from the cassette's batch table and initializes the object with the values found there.
argFrameworkBatch
- - a framework batch object that
has been resurrected from the ETBATCH database table.public com.ibm.etill.framework.cassette.ProtocolRequest createProtocolRequest(com.ibm.etill.framework.io.ETillConnection argConnection) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, the cassette operations are always synchronous and ComPoints are never used. Therefore, if the framework calls this method, a serious defect is indicated and the cassette cannot continue.
argConnection
- - The connection for the ComPoint that
has received the new message.public void destroyComPoints() throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, ComPoint objects are not used so there is nothing to do but return sucessfully.
public void shutdown()
For this cassette, the cassette operations are all synchronous and nothing needs to be saved. It merely logs a message to indicate that the cassette has terminated.
public void service(com.ibm.etill.framework.cassette.CassetteRequest argRequest, com.ibm.etill.framework.cassette.CassetteResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, the cassette examines the type of the request using the instanceof operator. Administration requests are sent to the object affected by the request. Order requests are sent to the matching method in the cassette's order object. Batch requests are sent to the matching method in the cassette's batch object. Any unrecognized requests (like protocol requests, for example) will result in an exception.
argRequest
- - the request object to be servicedargResponse
- - the response object to be updated with
the result of the serviceprivate void traceParameters(com.ibm.etill.framework.cassette.CassetteRequest argRequest)
Only keywords recognized by this cassette are included in the trace. Furthermore, password values are not displayed and all but the first 4 and last 4 characters of the PAN are obscured for security reasons.
argRequest
- - The request containing protocol data to
be traced.private void serviceAdminRequest(com.ibm.etill.framework.cassette.AdminRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
In other words, there are two cassette calls for every administration request, one to validate the parameters and one to perform the request.
For this cassette, this method checks to see if the request is in validation mode and calls the correct method based on the result.
argRequest
- - the administration request to be
serviced.argResponse
- - the response object to be updated with
the result of the serviceprivate void validateAdminRequest(com.ibm.etill.framework.cassette.AdminRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, there are only two administration requests that could carry cassette dependent data:
argRequest
- - the administration request to be validated.argResponse
- - the response object to be updated with
the result of the serviceprivate void processAdminRequest(com.ibm.etill.framework.cassette.AdminRequest argRequest, com.ibm.etill.framework.cassette.APIResponse argResponse) throws com.ibm.etill.framework.payapi.ETillAbortOperation
For this cassette, there are only five administration requests that require special processing:
argRequest
- - the administration request to be processed.argResponse
- - the response object to be updated with
the result of the service.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |